IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only
Expand all | Collapse all

IWS - qshell command listWebServicesServers.sh

  • 1.  IWS - qshell command listWebServicesServers.sh

    Posted Wed April 09, 2025 04:20 PM

    Hi all,

    The qshell command  listWebServicesServers.sh answers with junk characters :

     @    K       @        @   @        @  @     K@  @        @  @    @  @      @    @   @   @  @      @  @   @              K%XXXIWSASRV

    YYYIWSASRV (Running)          

    Do you have any idea why those junk characters appear only for the 1st IWS server ?

    Thanks in advance for your help



    ------------------------------
    Guillaume NGUYEN
    ------------------------------


  • 2.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Thu April 10, 2025 05:17 AM

    Hi Guillaume NGUYEN, 

    Do you know perhaps if your IBM i is a non standard CCSID ? 

    Perhaps check with system value on QCCSID ? 

    That could possibly have an impact.

    The other investigation could be that someone altered your QSHELL environment to work on the IBM i OSS Bash Shell, that normally corrupts characters in 5250 green screen. (you can test by logging in SSH , cd to that directory where the shell script is located, and then run the same command to confirm if the characters also show similar). 

    Hope this helps. 

    Marius



    ------------------------------
    Marius le Roux theIBMiGuy
    Owner , IBM i Consultant & Technology Strategist
    MLR Consulting
    Port Alfred
    ------------------------------



  • 3.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Thu April 10, 2025 07:37 AM

    Hi Marius,

    It was also my original thought. So I ran this command to avoid CCSID issue :

    /QIBM/ProdData/OS/WebServices/bin/listWebServicesServers.sh | iconv -f UTF-8 -t IBM-037

    And I still have the same answer.

    In addition to that, we have 2 IWS server on the same IBMi and the result looks fine : YYYIWSASRV (Running) 

    This is why I think the issue is coming from the IWS server configuration and maybe about the Java version.

    Do you think it will have an issue on the listWebServicesServers.sh command ?

    Thanks again Marius for your feeback.

    Guillaume NGUYEN

     



    ------------------------------
    Guillaume NGUYEN
    ------------------------------



  • 4.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Thu April 10, 2025 08:52 AM

    Alright, let's begin with a few investigative points. 


    What is the system's default CCSID ?

    Please specify both the system value and possibly the job from which you've executed this command.

    Are you operating from a 5250 session ? (I assume so.)

    Additionally, which version of Java are you using, and are you on the current PTFs group or the latest -1 for that system? 



    ------------------------------
    Marius le Roux theIBMiGuy
    Owner , IBM i Consultant & Technology Strategist
    MLR Consulting
    Port Alfred
    ------------------------------



  • 5.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Thu April 10, 2025 09:34 AM

    Are you using bash?  What happens when you are in QShell?



    ------------------------------
    Nadir K Amra
    ------------------------------



  • 6.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Thu April 10, 2025 09:55 AM

    Hi Nadir,

    I run the shell command by batch with the command QCMDEXC to generate a spool file.

    Nevertheless when I used the same shell command on the QSH prompt (by 5250), I also have the same issue.



    ------------------------------
    Guillaume NGUYEN
    ------------------------------



  • 7.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Fri April 11, 2025 03:25 AM

    Hi Guillaume , 

    Can you give me the exact command that you use for QCMDEXC? (Are you also running this from a green screen or from a GUI interface?).

    Thanks



    ------------------------------
    Marius le Roux theIBMiGuy
    Owner , IBM i Consultant & Technology Strategist
    MLR Consulting
    ------------------------------



  • 8.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Fri April 11, 2025 03:29 AM

    You can also try doing this as a troubleshooting exercise to know more about what is running : 

    Steps I took to see additional Information : 

    1. EDTF to this file : /QIBM/ProdData/OS/WebServices/bin/listWebServicesServers.sh  
     
    2. then update that file temporarily for Debug information: 
    IWS_JAVA_FLAGS="\                    
     -Dcom.ibm.iws.servicetrace=true \   
     -Dfile.encoding=UTF-8 \             
     -Djava.ext.dirs=${JAVA_EXT_DIRS}"   
    3. Run the command again with this option on. 
    4. then go to /tmp/qiws_trace.log 
     
    5. search for or find something of concern there in that output file log:  
    (check if the service actually outputs that odd string, if so , it might slightly like work on Java to be causing the trouble ) 
    ( sample here  from my system )  
    2025-04-10T14:59:15.647 107919@xxxxxx.yyyyyyyyyy.co.za 000001  >ListWebServicesServersCommandHandler:   
    SERVICE1 (Stopped)                                                                                      
    SERVICE2 (Stopped)                                                                                      
    SERVICE3 (Stopped) 
    *( if there exists those funny charachters, then that means likely the java handling is off and that might require IBM's involvement to diagnose further) .                                                                                     


    6. just remember to remove that  -Dcom.ibm.iws.servicetrace=true \    when you are done. 



    ------------------------------
    Marius le Roux theIBMiGuy
    Owner , IBM i Consultant & Technology Strategist
    MLR Consulting
    ------------------------------



  • 9.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Mon April 14, 2025 03:13 AM
    Edited by Guillaume NGUYEN Mon April 14, 2025 04:20 AM

    Hi Marius,

    The trace information didn't show any junk characters as you can see below.

    More over, unexpectedly, I use another user and the junk characters did not appear when I ran the shell command listWebServicesServers.sh on 5250.

    So I am going to follow this track and to try to find what are the difference between those 2 users. Nevertheless with DSPUSRPRF command I compare those users and I didn't found any difference between them yet.

    Thanks again for your help Marius

    *********************

    User that displayed junk characters :

    2025-04-11T15:19:06.592 320463@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >ScriptProcessor: Arguments=[/qibm/proddata/os/webservices/bin/listwebservicesservers.sh]
    2025-04-11T15:19:06.592 320463@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >ScriptProcessor: Running command.
    2025-04-11T15:19:06.692 320463@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >ScriptProcessor: CanonicalPath=[/qibm/proddata/os/webservices/bin/listwebservicesservers.sh]
    2025-04-11T15:19:07.478 320463@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >hasAllObjectAuthority: user=QSECOFR specialAuthority=[*ALLOBJ, *SECADM, *JOBCTL, *SPLCTL, *SAVSYS, *SERVICE, *AUDIT, *IOSYSCFG]
    2025-04-11T15:19:07.479 320463@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >hasAllObjectAuthority: user=QSECOFR, hasAllObject=true
    2025-04-11T15:19:09.026 320463@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >ListWebServicesServersCommandHandler: 
    XXXIWSASRV (Running)
    YYYIWSASRV (Running)

    **************************************

    Uzer that don't diplay junk characters :

    2025-04-11T14:32:07.852 319209@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >ScriptProcessor: Arguments=[/QIBM/ProdData/OS/WebServices/bin/listWebServicesServers.sh]
    2025-04-11T14:32:07.854 319209@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >ScriptProcessor: Running command.
    2025-04-11T14:32:07.971 319209@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >ScriptProcessor: CanonicalPath=[/qibm/proddata/os/webservices/bin/listwebservicesservers.sh]
    2025-04-11T14:32:09.097 319209@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >hasAllObjectAuthority: user=AAABBBBEMG9 specialAuthority=[*ALLOBJ, *SAVSYS, *SERVICE]
    2025-04-11T14:32:09.098 319209@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >hasAllObjectAuthority: user=AAABBBEMG9, hasAllObject=true
    2025-04-11T14:32:10.833 319209@XXXXXX.YYYYYYYY.ZZ.AAAA 000001  >ListWebServicesServersCommandHandler: 
    XXXIWSASRV (Running)
    YYYIWSASRV (Running)



    ------------------------------
    Guillaume NGUYEN
    ------------------------------



  • 10.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Mon April 14, 2025 04:58 AM

    Ok, great! It seems that at least this is stable in that call.

    Regarding the user profiles , perhaps check the initial programs ? (Those PGMs might have something off with them.) Also, consider their JOBDs(any Request Data inside of the JOBD might have a strange command there)  / CCSIDs between two profiles ; if one works and the other does not, that is most likely the case there. 

    May I ask why you want to call this? Is this perhaps for monitoring purposes to see if these servers are running or active?



    ------------------------------
    Marius le Roux theIBMiGuy
    Owner , IBM i Consultant & Technology Strategist
    MLR Consulting
    ------------------------------



  • 11.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Mon April 14, 2025 08:29 AM
    Edited by Krister Karlsson Mon April 14, 2025 08:31 AM

    Hi Guillaume,

    If only a few users expirence this, you should investigate if those users have setup to automatically switch to the bash shell using the .profile.
    In that case, they will invoke the bash shell even if the use STRQSH, CALL QP2TERM or execute QSH with QCMDEXC. Using bash shell with 5250 is not recommended as you can get unexpected results.

    Instead of automatically switching to bash shell using the .profile, use this approach: https://ibmi-oss-docs.readthedocs.io/en/latest/troubleshooting/SETTING_BASH.html 



    ------------------------------
    Krister Karlsson
    IBM i System Administrator
    Crosskey
    Stockholm
    ------------------------------



  • 12.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Mon April 14, 2025 09:47 AM

    Yes, the purpose of this command is to monitor the IWS servers. 

    We also use the shell command listWebServices.sh to monitore the webservices status.

    The goal is to be proactive on the IWS server and Webservice status to fix the issue if it occurs before the consumer raise an alert.



    ------------------------------
    Guillaume NGUYEN
    ------------------------------



  • 13.  RE: IWS - qshell command listWebServicesServers.sh

    Posted Thu April 24, 2025 06:55 AM

    Hi Guillaume, 

    Ok I might have found a way for you to make life way easier, 

    Install QSHONI:  https://github.com/richardschoen/QshOni BIG Shoutout to @RichardShoen here for providing this utility. 

    Then what you are able to do is run the command, something I played with last night: 

    (this I ran in the GUI RUNSQL Statement) 

    CL: ADDLIBLE QSHONI; --- ADD QSHONI to library List for the commands to operate in 
    CL: QSHEXEC CMDLINE('/QIBM/ProdData/OS/WebServices/bin/listWebServicesServers.sh')                            
            DSPSTDOUT(*NO)                                       
            LOGSTDOUT(*NO)                                        
            PRTSTDOUT(*NO)                                        
            DLTSTDOUT(*YES)                                       
            IFSSTDOUT(*NO)                                        
            IFSFILE('/tmp/log.txt')                               
            IFSOPT(*REPLACE)                                      
            PRTSPLF(QSHEXECLOG)                                   
            PRTUSRDTA(*NONE)                                      
            PRTTXT(*NONE);
    
    
    -- this is where the output from the above command gets populated. 
    SELECT * FROM QTEMP/STDOUTQSH;



    Give it a go and let us know. 



    ------------------------------
    Marius le Roux theIBMiGuy
    Owner , IBM i Consultant & Technology Strategist
    MLR Consulting
    ------------------------------