Running WebLogic as a service on Windows

sashton

sashton

Reputable Poster
List, I am new to using WebLogic and I have successfully installed it and have E1 up and running on it. My confusion now is how to get the adminserver/console/service or whatever to autostart and not require me to login to the server and run the startWebLogic.cmd Isn't there a windows service or something that will autostart on a reboot? I have found all kinds of documentation but I am wading in an ocean of stuff. If someone can point me in the right direction that would be great? Thanks.
 
Bruno,
Another question. In the second half of your document, it talks about setting up the service for PD for example. I am trying to do the same and I am running into problems. The first half worked great and I am now able to see the server without having to start anything but I can't start the containers, ie dvj2ee, pyj2ee, pdj2ee etc. Attached is my stdout log. The error I see is: <Jan 3, 2011 3:20:21 PM MST> <Emergency> <Management> <BEA-141151> <The admin server could not be reached at http://wc-mrl-vmjas2.missoula.local:7001. Am I missing something?
 

Attachments

  • 165329-CVj2eeServer-stdout.txt
    10.6 KB · Views: 960
I'm sorry, i don't know where errors comes.
I'm sure other people can suggest the solution.
 
Thanks. I am really amazed that they make it this difficult to auto start the servers unless I am just missing something basic. Anyone else setup to auto start with services their WebLogic HTML server?
 
Just be happy that you aren't in the Linux realm with Clustering. There are not scripts provided to stop the NodeManager (they do give you one to start it). When I took the advanced admin class, I asked about this, and the instructor said it was recommended to run it as an interactive application, which is rediculous for an enterprise application. Their reason for this, so you could see the errors right on your screen... I guess it's too hard to look through logs.... Needless to say, I've had to develop some additional start/stop scripts.
 
I was able to run the startManagedWebLogic.cmd in the Windows startup script but it turns out, I received JAS errors when I tried to login and the logs showed that the AS/400 driver was not loaded. So I still ended up having to restart all the instances individually anyway so that got me no where. Still looking for a way to auto start those servers.
 
It can be done, obviously, they just haven't documented the process for E1 (at last check.)

What I had to do to get this working for the JAS instances is to add a CLASSPATH option to the install service script and add the full path to the location of the JDBC driver. This is in the JDE_HOME target location.

So if you didn't have that, you'll need to remove the services you've added and start over.

Also, for the admin server, make sure you're using the JDK from the WebLogic home (usually JRockit 1.6) in place of the JDK that ships with Server Manager (Sun JDK 1.5). Without that, you may not be able to properly manage the E1 instance from within Server Manager.

I can send you something via email if interested.
 
Charles,

The link the Bruno gave me worked great for setting up the Admin Server itself as a service and is working. If you can send me something on what you described for the individual instances, that would be great. [email protected]
 
Hi Steven,

What I have done to automate the start of the Admin Server and its managed instance in Windows are as follows:

1. Since my WLS is running in Production mode, I have set my user ID and password in the WLS_USER and WLS_PW variables in the setDomainEnv.cmd file in <my domain>\bin directory, so that it no longer prompts for user id and password on WLS startup.

2. I set the startWebLogic.cmd as a startup script in Windows Task Scheduler, which automates start of Admin Server.

3. For the managed instances, I have used Weblogic Scripting to automate the starting of instances using the Weblogic console. I have piggy backed this weblogic script to run behind the Admin Server Script, so that the managed instances start only after the Admin Server. I have attached the sample script for starting one instance as a reference. You need to invoke this script by using the following executable in <wlserver_10.3 install dir>\common\bin:

wlst <WLST script name>
for e.g. wlst startserver.py.

This will start your script automatically, as if you logged into the Admin console and manually started the managed server instance.

Hope this and the attached file helps you in your objective. I have also mailed these to you on your email ID. Please get back to me if you have queries.

Regards,
Renga

E1 9.0 8.98.3.2
Windows Server 2008 64 bit, SQL Server 2008 64 bit, Oracle WLS 10.3.2.0 64 bit
 

Attachments

  • 165621-startserver.txt
    241 bytes · Views: 203
Hello all, a follow up question on this I hope someone can answer. I do have all my E1 instances starting through Windows services now. That all is good. My problem now is that I can't access the Enterprise Manager because it is not started. Unless I use the "Start the Admin Server for WebLogic" option in Windows, Enterprise Manager does not start up automatically. Is there a need/way to setup a service so that Enterprise Manager starts on boot up too? Trying to get to http://<servername>:7001/em without having to login to the server and manually start it up.
 
Hi Bruno,

The link you provided no longer opens. Can you send it again.

I was able to create a service for the Admin server which works as desired. The service for managed instance shows status as Started however it has an error - "java.io.IOException: Unable to find the configure file jdelog.properties". Have you seen this before ?
 
All - we have dramatically changed the process in how we autostart our WebLogic environments. Essentially we run a serverstart.cmd that calls a Python script to start the console along with any environments we choose. I have attached a detailed document outlining the entire procedure of installing a new weblogic server and setting up the autostart process from scratch. It assumes you have already setup your JAS instances within server mananger. That process is not explained in the document.
 
The correct Oracle way to set up Weblogic on Windows, or on any other platform, is to utilize the nodemanager.

After installing the Admin Server and the E1 logic servers, you need to change the nodemanager.properties to auto-restart any failed service - then you need to register the admin server to the node manager, and tell the nodemanager to start the admin server.

When done correctly - using the Weblogic Administration Guide on the Oracle Website - when the nodemanager service starts (under windows services) - it will start the admin server, then automatically restart any instances underneath it.

I've got many Weblogic server installs under my belt - both under Linux and Windows - and I have all my services start using the nodemanager. That way, I have full control over all the weblogic servers and the nodemanager can provide lots of feedback to me on how the services are running.
 
Jon,

Will the below steps work in WebLogic 12.1.3 as well to configure the managed servers to start automatically?

1. Install Nodemanager as a service (look for "installNodeMgrSvc.cmd")
2. Modify the Nodemanager.properties and set
CrashRecoveryEnabled=true
StartScriptEnabled=true
3. Make sure Nodemanager is running
4. Start the Adminserver manually
5. Connect to the AdminServer using WLST
6. NMEnroll the AdminServer to the Nodemanager Home
7. Kill the manually started AdminServer
8. Stop the Nodemanager
9. Start the Nodemanager
10. Connect using WLST to the Nodemanager
11. Perform start the AdminServer under the Nodemanager using "nmStart ('AdminServer')"

If yes how do I Enroll the "the AdminServer to the Nodemanager Home"?

Considering my Domain Dir is "C:\Oracle\Middleware\user_projects\domains\E1_Apps", what should be my Nodemanager home?

C:\Oracle\Middleware\user_projects\domains\E1_Apps\nodemanager

or

C:\Oracle\Middleware\oracle_common\common\nodemanager

I don't have a C:\Oracle\Middleware\wlserver/common/nodemanager folder in my installation.

Thanks.
 
Back
Top