Topic
  • 2 replies
  • Latest Post - ‏2013-08-01T10:28:32Z by MichaelThompson
C7YC_David_Westerman
12 Posts

Pinned topic Problems with startServer.py on Windows

‏2013-07-31T18:34:42Z |

I was trying to follow the WASdev Lab "Build and Administer Your Own Liberty Application Cluster" (https://www.ibmdw.net/wasdev/docs/lab-build-and-administer-your-own-liberty-application-cluster/).

Should this lab work on Windows 7? I think I've translated everything correctly between Linux and Windows, but I'm getting the following error, when I try to start or stop a server (those are the only two commands I've tried so far):

C:\IBM\WLPND855>jython %LAB_MATERIALS%\sample_scripts\stopServer.py --serverHost=localhost --serverUsrdir=%WLP_INSTALL_DIR%\usr --serverName=myMember1 --host=localhost --port=9443 --user=admin --password=adminpswd --truststore=usr\servers\myController\resources\security\trust.jks --truststorePassword=password
Connecting to the server...
Successfully connected to the server "localhost:9443"
Server did not stop: return code = 2

Is there some trace I can turn on to see some details about what might be going wrong?

And yes, the server is running when I try to stop it, and not running when I try to start it.

 

  • MichaelThompson
    MichaelThompson
    4 Posts

    Re: Problems with startServer.py on Windows

    ‏2013-08-01T09:39:52Z  

    Hi,

    I suspect the issue is that the issue is that the host name specified to --serverHost  may need to be something other than localhost. Look in your server.xm and see what it has configured for <variable name="defaultHostName" value="xyz" />. You should use whatever xyz is as the argument to --serverHost.

    Btw, the return code of 2 means "server not found". That script really should be improved because that's frankly a crap error message. I'll look at improving it.

    Thanks,
    Mike

     

  • MichaelThompson
    MichaelThompson
    4 Posts

    Re: Problems with startServer.py on Windows

    ‏2013-08-01T10:28:32Z  

    Hi,

    I suspect the issue is that the issue is that the host name specified to --serverHost  may need to be something other than localhost. Look in your server.xm and see what it has configured for <variable name="defaultHostName" value="xyz" />. You should use whatever xyz is as the argument to --serverHost.

    Btw, the return code of 2 means "server not found". That script really should be improved because that's frankly a crap error message. I'll look at improving it.

    Thanks,
    Mike

     

    Give this a shot and tell me what you think:
     

    in stopServer.py, change these lines:
        else:
            print "Server did not stop: return code = "+str(returnCode)

     

    to this:
        elif (returnCode == 2):
            print "Server could not be found."
            print "Check your --serverHost, --serverUsrdir and --serverName values."
            print "--serverHost must match the value of the defaultHostName set in the server.xml"
        else:
            print "Server could not be stopped: return code = "+str(returnCode)

     

    That should be a much more useful error message.

    Thanks,
    Mike