WebSphere Application Server

Expand all | Collapse all

WAS 9.0 : stopServer and starServer command

  • 1.  WAS 9.0 : stopServer and starServer command

    Posted 10-03-2018 10:10 AM

    Hello everyone,

    In WAS 8.5.5, the stopServer.sh or startServer.sh command works fine to start/stop a Web Server but in WAS 9.0 it doesn't work anymore...

    I tried the script serverStatus.sh and this one return the good state for the Application Server (server1) and the Web Server

    So why stopServer (or start) works in WAS 8.5.5 and not in WAS 9.0 ? Do you have this problem ?

    I have installed the WAS 9.0.0.9 so the latest available...

    Thanks for your help



    ------------------------------
    Cédric A
    ------------------------------


  • 2.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-03-2018 11:52 AM
    Hi Cédric,

    What kind of error do you see when the command failed?

    Maybe you can enable the trace using the following trace string, to see if any clues can be found in the trace.log.

    *=info:com.ibm.ws.*=all

    Regards,
    Eric


  • 3.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-04-2018 01:18 PM
    Are you running them on the same host in another profile?  If so, you may be having port conflicts.  Can you please provide more information and your log file?   What is the exact command you are running?  The syntax may be mistyped... the command did not change.

    ------------------------------
    Rene
    ------------------------------



  • 4.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-04-2018 03:00 AM
    Hello Cédric,
    be assured that the stopServer.sh / startServer.sh are working in WAS v9.0. In you case that seems to be something wrong with your environment. Would be helpful if you could post some details about the the environment (ND cell?, Single Server? etc.) and about the error you get. Both commands provide a '-trace' switch which collects additional trace data. Try to run the commands using -trace and attach the output with the logs (startServer.log, stopServer.log, SystemOut*.log (if they contain relevant information)).

    Thanks - Hermann

    ------------------------------
    Hermann Huebler
    ------------------------------



  • 5.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-04-2018 03:13 AM
      |   view attached
    Hello Hermann and Eric ,

    Thanks for trying to help me.

    You will find in attachment (hwo60_HelloWorld_Hello_Hello_ws.zip) the logs of the stopServer and startServer command with the -trace option

    Note : the file /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf exist well and rights are OK...

    > Stop Server :

     (mzpwas01@yval1b60) $ ./stopServer.sh hwo60_HelloWorld_Hello_ws -trace

    ADMU0116I: Tool information is being logged in file

               /users/was90/profiles/node01/logs/hwo60_HelloWorld_Hello_ws/stopServer.log

    IBMJGSSProvider Build-Level: -20180404

    [JGSS_DBG_PROV]  main IBMJGSSProvider (version 8.0) loaded

    ADMU0128I: Starting tool with the node01 profile

    ADMU3100I: Reading configuration for server: hwo60_HelloWorld_Hello_ws

    httpd: Could not open configuration file /soft/was90/HTTPServer/ /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k stop: No such file or directory

    ADMU7772I: Generic Server: hwo60_HelloWorld_Hello_ws STOPPED successfully.

     

     >  Start Server :

     (mzpwas01@yval1b60) $ ./startServer.sh hwo60_HelloWorld_Hello_ws -trace

    ADMU0116I: Tool information is being logged in file

               /users/was90/profiles/node01/logs/hwo60_HelloWorld_Hello_ws/startServer.log

    IBMJGSSProvider Build-Level: -20180404

    [JGSS_DBG_PROV]  main IBMJGSSProvider (version 8.0) loaded

    ADMU0128I: Starting tool with the node01 profile

    ADMU3100I: Reading configuration for server: hwo60_HelloWorld_Hello_ws

    ADMU3400I: Server launched. No initialization status. Process id is: 41481

    httpd: Could not open configuration file /soft/was90/HTTPServer/ /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k start: No such file or directory



    ------------------------------
    Cédric A
    ------------------------------

    Attachment(s)



  • 6.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-04-2018 08:32 AM
    What is the name of your WAS server instance? You seem to be providing this name hwo60_HelloWorld_Hello_ws

    Once a WAS server instance is created it can be started from the <profile>/bin directory where <profile> is whatever WAS profile the server instance was created under.

    ------------------------------
    Sunit Patke
    ------------------------------



  • 7.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-04-2018 09:47 AM
    Hello,

    Yes the name of the instance is : hwo60_HelloWorld_Hello_ws
    In <profiles>/node01/servers, I have this list :
    - hwo60_HelloWorld_Hello_as (=> Application Server)
    - hwo60_HelloWorld_Hello_ws (=> Web Server)
    - nodeagent

    ...And there is no problem to use <profiles>/node01/bin/stopServer.sh (or startServer) with hwo60_HelloWorld_Hello_as , the issue is only with the Web Server

    ------------------------------
    Cédric A
    ------------------------------



  • 8.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-04-2018 01:26 PM
    Check your file permissions.  Can't open file indicates maybe something is owned by user and need to be resolved.  A second issue I saw is also discussed from an old V7 issue documented here:
    https://developer.ibm.com/answers/questions/301683/why-is-starting-of-the-websphere-portal-server-fai/

    ------------------------------
    Rene Summers
    ------------------------------



  • 9.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-05-2018 04:14 AM
    Edited by Cédric A 10-05-2018 04:15 AM
    Hi Rene,

    I think it's not a permission file issue.
    In comparaison with my WAS 8.5 server, I have the same rights on httpd.conf file which is in /users/... or with apachectl which is in /soft/was90/HTTPServer/bin .
    The only difference with my WAS8.5 is the server.xml file rights which are in 644 in WAS9.0 and 664 in WAS8.5 (the file content is exactly the same).

    Error with stopServer or startServer command :
    httpd: Could not open configuration file /soft/was90/HTTPServer/ /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k stop: No such file or directory

    I would also like to specify that it is not possible to make a stop/start from the administration console

    ------------------------------
    Cédric A
    ------------------------------



  • 10.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-05-2018 10:06 AM
    Edited by Sunit Patke 10-05-2018 10:21 AM
    Please verify that the httpd.conf file does not have any issues. You can do this by manually running the apachectl -t command.

    Also verify that the directories for ihs have 755 permissions and httpd.conf has read permission for the ID that runs the process.

    --Sunit

    ------------------------------



  • 11.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-05-2018 12:25 PM
    Hello Cédric,
    thanks for the date. So you are facing problems starting the Web Server. From the trace it looks like that it is a Web Server (IHS) on a managed node - right?

    From the startServer trace it seems that the server is started using the following command:
    --- snip ---
    [10/4/18 8:47:20:481 CEST] 00000001 UnixProcessIm 3 Creation params are: [executable:] /soft/was90/HTTPServer/bin/apachectl [command line
    args:] -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k start [environment:] [working directory:] /soft/was90/HTTPServ
    er [umask:] 22 [Standard out/err filenames:] null null null [priority:] 20 [process group:] 0 [process name:] hwo60_HelloWorld_Hello_ws [inh
    eritParentStreams:] true[detachProcess:] false
    --- snip ---

    i.e. the command is: "/soft/was90/HTTPServer/bin/apachectl -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k start" which looks OK to me.
    And in the logs we can also see:
    ADMU3400I: Server launched. No initialization status. Process id is: 41481

    Is it possible that the HTTP Server started but failed due to any configuration problems? Note, that IHS v9 is based on Apache 2.4 and you might need to update you configuration if you copied it over from the older version.

    So I'm wondering if:
    •  the server was started when you collected the trace?
    •  you can  start the server from the command line using this command above?
    • you have any entries in the Web Server log files (error_log)?


    P.S: the stopServer log you attached also contains the following line at the end:
    ADMU7772I: Generic Server: hwo60_HelloWorld_Hello_ws STOPPED successfully - so that looks ok as well.




    ------------------------------
    Hermann Huebler
    ------------------------------



  • 12.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-08-2018 09:49 AM
      |   view attached
    Hello Hermann,

    Yes my problem is to start or stop the Web Server using startServer or stopServer command (which works fine in WAS 8.5)

    -->>  My error.log contains this :
    [Mon Oct 08 15:16:25.194517 2018] [was_ap24:notice] [pid 56770:tid 139666661410560] ---------------------------------------------------
    [Mon Oct 08 15:16:25.195577 2018] [was_ap24:notice] [pid 56770:tid 139666661410560] WebSphere Plugins loaded.
    [Mon Oct 08 15:16:25.195588 2018] [was_ap24:notice] [pid 56770:tid 139666661410560] Bld version: 9.0.0.9
    [Mon Oct 08 15:16:25.195596 2018] [was_ap24:notice] [pid 56770:tid 139666661410560] Bld date: Aug 15 2018, 16:56:12
    [Mon Oct 08 15:16:25.195604 2018] [was_ap24:notice] [pid 56770:tid 139666661410560] Webserver: IBM_HTTP_Server/9.0.0.9 (Unix)
    [Mon Oct 08 15:16:25.195611 2018] [was_ap24:notice] [pid 56770:tid 139666661410560] ---------------------------------------------------
    [Mon Oct 08 15:16:25.195662 2018] [:notice] [pid 56770:tid 139666661410560] Using config file /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf
    [Mon Oct 08 15:16:25.199510 2018] [mpm_event:notice] [pid 56770:tid 139666661410560] AH00489: IBM_HTTP_Server/9.0.0.9 (Unix) configured -- resuming normal operations
    [Mon Oct 08 15:16:25.199510 2018] [core:notice] [pid 56770:tid 139666661410560] AH00094: Command line: '/soft/was90/HTTPServer/bin/httpd -d /soft/was90/HTTPServer -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf'

    -->> You can find my httpd.conf file in attachment if you need to see this file too.

    -->>  And the command below works fine ...
    (mzpwas01@yval1b60) $ /soft/was90/HTTPServer/bin/apachectl -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k stop
    (mzpwas01@yval1b60) $ ps -ef | grep httpd
    mzpwas01 8403 58705 0 15:45 pts/1 00:00:00 grep httpd

    (mzpwas01@yval1b60) $ /soft/was90/HTTPServer/bin/apachectl -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k start
    (mzpwas01@yval1b60) $ ps -ef | grep httpd
    mzpwas01 8503 1 11 15:45 ? 00:00:00 /soft/was90/HTTPServer/bin/httpd -d /soft/was90/HTTPServer -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k start
    mzpwas01 8508 8503 0 15:45 ? 00:00:00 /soft/was90/HTTPServer/bin/httpd -d /soft/was90/HTTPServer -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k start
    mzpwas01 8511 8503 0 15:45 ? 00:00:00 /soft/was90/HTTPServer/bin/httpd -d /soft/was90/HTTPServer -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k start
    mzpwas01 8512 8503 0 15:45 ? 00:00:00 /soft/was90/HTTPServer/bin/httpd -d /soft/was90/HTTPServer -f /users/hwo60/was90/data/ihs/hwo60_HelloWorld_Hello_ws/httpd.conf -k start
    mzpwas01 8616 58705 0 15:45 pts/1 00:00:00 grep httpd

    Thanks for your help
    Cedric

    ------------------------------
    Cédric A
    ------------------------------

    Attachment(s)

    zip
    httpd.zip   10K 1 version


  • 13.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-08-2018 11:06 AM
    Cedric,

    I notice from your conf file that your server is listening on port 82. This means that the server start command has to be executed by root. On unix any process listening on ports (binding to) <= 1024 has to be started by root.

    You also have defined User and Group in httpd.conf, make sure that the user/group has read access to all the content files and WebSphere plugin config and it has execute permissions on the directories in the directory tree.

    If all of this is in place then after starting the server check your IHS error log for any error messages as well as /var/log/messages or equivalent.

    --Sunit

    ------------------------------
    Sunit
    ------------------------------



  • 14.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-11-2018 11:27 PM
    Hi Cedric,

    Pardon me if I have misunderstood this post. From what I can see, looks like you are trying to start and stop an IBM HTTP WebServer using the WebSphere startServer and stopServer commands.
    The startServer and stopServer commands as shipped in all versions of WebSphere can only be used to start and stop the WebSphere Application server JVMs. They can not be used to stop the IBM HTTP WebServer. If you are saying you could do that in WAS 8.5.5, then someone must have customised those script commands in your WAS 8.5.5 installation.

    Best regards, Zoran.

    ------------------------------
    ZORAN ISIJANOVSKI
    ------------------------------



  • 15.  RE: WAS 9.0 : stopServer and starServer command

    Posted 10-12-2018 06:36 AM
    I was actually wondering that startServer.sh starts WebServers too but I never tried and did not read the docs before. And surprisingly when I read the logs the WebServer was actually started (see the the previous updated).

    But of course Zoran is right .. as per https://www.ibm.com/support/knowledgecenter/en/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/rxml_startserver.html the start Server command ony starts:
    • an application server
    • a DMZ Secure Proxy Server for IBM® WebSphere® Application Server.
    • an administrative agent.
    • a job manager.


    ------------------------------
    Hermann Huebler
    ------------------------------



  • 16.  RE: WAS 9.0 : stopServer and starServer command

    Posted 2 days ago
    The problem was seen because the Web server was defined with all the arguments in one entry. The server.xml shows:
      <startCommandArgs>-f /users/user1/was9000/data/ihs/webervername/httpd. conf -k start</startCommandArgs> 
    The problem is resolved by separating the arguments in different <startCommandArgs> entries, as so:
     <startCommandArgs>-k</startCommandArgs>
       <startCommandArgs>start</startCommandArgs>
       <startCommandArgs>-n</startCommandArgs>
       <startCommandArgs>webervername</startCommandArgs>
       <startCommandArgs>-f</start CommandArgs> 
      <startCommandArgs>${WEB_INSTALL_ROOT}/httpd.conf</startCommandArgs>

    ------------------------------
    Michael Shenhouse
    ------------------------------