WASSERVICE to create a windows service for 8.12

cnc__guy

cnc__guy

Well Known Member
Friends,

I am attempting to create my JAS Services as Windows Services using WASSERVICE and I am having a "dilly" (yes, that is a technical term) of a time.

I am using the following command from my \websphere\appserver\bin directory and having no luck:

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles\appsrv01" -serverName AS_JS_81

or

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles" -serverName AS_JS_81

or

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles" -serverName jdeweb01

none of the above allow my windows service to stay running. When I start the service after entering the above commands the service will die and no logs get created in the logs directory. I have done this before but I am missing something now.

All services load and run successfully using the batch files but this creates issues when the user that logs in and runs the batch files logs out.

Thanks,
James
 
Hi James,

It seems that you are missing userid/pwd while using WASSERVICE. Just enter WASSERVICE on console window to know complete syntax of it.



cnc__guy <[email protected]> wrote:
Friends,

I am attempting to create my JAS Services as Windows Services using WASSERVICE and I am having a "dilly" (yes, that is a technical term) of a time.

I am using the following command from my \websphere\appserver\bin directory and having no luck:

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles\appsrv01" -serverName AS_JS_81

or

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles" -serverName AS_JS_81

or

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles" -serverName jdeweb01

none of the above allow my windows service to stay running. When I start the service after entering the above commands the service will die and no logs get created in the logs directory. I have done this before but I am missing something now.

All services load and run successfully using the batch files but this creates issues when the us! er that logs in and runs the batch files logs out.

Thanks,
James
 
Thank you very much for your reply.

I believe when you create a windows service without specifying the userid and password it just uses a windows services account. You can then change it to an account of your choice - either domain or local.

I don't believe this is my problem as my windows serices account has adequate security to start this service.

Thanks,
James
 
This sequence works for me. Before defining the service, ensure it can be started in the Admin Console. This will create the required log folders. Change port # and profile, as needed.

· Open up a DOS command window
· D:\
· cd WebSphere\AppServer\bin
· setupCmdLine.bat
· wasservice –add AS_JS_8250 -serverName AS_JS_8250 -profilePath “D:\WebSphere\AppServer\profiles\AppSrvQ821” -wasHome “D:\WebSphere\AppServer” –userid xxxxxxxx –password xxxxxxxx –logFile “D:\WebSphere\AppServer\profiles\AppSrvQ821\logs\AS_JS_8250\start_service.log” –startType automatic
· Start the Windows service.
 
[ QUOTE ]
Friends,

I am attempting to create my JAS Services as Windows Services using WASSERVICE and I am having a "dilly" (yes, that is a technical term) of a time.

I am using the following command from my \websphere\appserver\bin directory and having no luck:

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles\appsrv01" -serverName AS_JS_81

or

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles" -serverName AS_JS_81

or

wasservice -add AS_JS_81 -profilePath "d:\websphere\appserver\profiles" -serverName jdeweb01

none of the above allow my windows service to stay running. When I start the service after entering the above commands the service will die and no logs get created in the logs directory. I have done this before but I am missing something now.

All services load and run successfully using the batch files but this creates issues when the user that logs in and runs the batch files logs out.

Thanks,
James

[/ QUOTE ]


WASService -add DV -servername AS_JS_Development -wasHome "D:\Program Files\IBM\WebSphere\AppServer" -profilePath "D:\Program Files\IBM\WebSphere\AppServer\profiles\default"


All one line of course.

If you are using Network Deployment to manage your system this is unnecessary.
 
Also creating a service account. It's always wise to create a local account named something like SERVERNAME\JDESERVICE or a domain YOURDOMAIN\JDESERVICE account and per JDE, give it the following rights.
1. make it an administrator
2. allow to operate as a service
3. allow it to add tokens

NEVER use your own foreign account or the service might stop after you log out. Also remember to edit that setupCmdLine.bat to include the correct JAS server name. I'd also probably put in the same folder \websphere\bin or the same folder where the installed app has been created so that it runs correctly. That setupCmdLine.bat will put in the correct path statements, correct "set blahblah=blahblah" and create all the correct environmental variable. More info on this, of course is in the Installing WEB server for your particular release of JDE.
 
wasservice -add AS_JS_81_JAS1 -washome "D:\Program Files\WebSphere\AppServer" -servername AS_JS_81_JAS1 -logRoot "D:\Program Files\WebSphere\AppServer\logs\AS_JS_81_JAS1"
 
Back
Top