{"id":2851,"date":"2012-10-08T12:27:33","date_gmt":"2012-10-08T16:27:33","guid":{"rendered":"https:\/\/pitss.org\/us\/2012\/10\/08\/installing-windows-services-for-starting-weblogic-servers\/"},"modified":"2017-06-27T15:43:52","modified_gmt":"2017-06-27T19:43:52","slug":"windows-services-for-weblogic-servers","status":"publish","type":"post","link":"https:\/\/pitss.org\/us\/2012\/10\/08\/windows-services-for-weblogic-servers\/","title":{"rendered":"Installing Windows Services for starting WebLogic Servers"},"content":{"rendered":"<p>Oracle WebLogic servers can be started up as MS Windows Services upon system startup. NOTE: Configuring Node Manager is still the preferred method as Node Manager also is able to restart a Weblogic server if a server crashes. To install Windows services to start up the servers, you can follow these steps:<\/p>\n<ol>\n<li>Make sure each Weblogic server has boot.properties consisting of the Weblogic username and password in the %DOMAIN_HOME%\\servers\\server_name\\security folder.<\/li>\n<li>For the Admin Server, create a file called installAdmServer_Service.cmd (the name of the file can be different).<\/li>\n<li>Edit the file using a text editor. Add in the following lines:\n<ul>\n<li><em>SETLOCAL<br \/>\nset DOMAIN_NAME=FormsDomain<br \/>\nset USERDOMAIN_HOME=C:\\Oracle\\Middleware\\user_projects\\domains\\FormsDomain<br \/>\nset SERVER_NAME=AdminServer<br \/>\nset PRODUCTION_MODE=true<br \/>\ncd %USERDOMAIN_HOME%<br \/>\ncall %USERDOMAIN_HOME%\\bin\\setDomainEnv.cmd<br \/>\ncall &#8220;C:\\Oracle\\Middleware\\wlserver_10.3\\server\\bin\\installSvc.cmd&#8221;<br \/>\nENDLOCAL<\/em><\/li>\n<\/ul>\n<\/li>\n<li>Run installAdmServer_Service.cmd. A service called &#8220;beasvc FormsDomain_AdminServer&#8221; should be created.<\/li>\n<li>In &#8220;Services&#8221;, start the &#8220;beasvc FormsDomain_AdminServer&#8221; service. After waiting about 2-3 minutes, check to see if the server is running.<\/li>\n<li>For the WLS_FORMS server, create a file called installWLSFORMS_Service.cmd (the name of the file can be different).<\/li>\n<li>Edit the file using a text editor. Add in the following lines:\n<ul>\n<li><em>SETLOCAL<br \/>\nset DOMAIN_NAME=FormsDomain<br \/>\nset USERDOMAIN_HOME=C:\\Oracle\\Middleware\\user_projects\\domains\\FormsDomain<br \/>\nset SERVER_NAME=WLS_FORMS<br \/>\nset PRODUCTION_MODE=true<br \/>\nset ADMIN_URL=http:\/\/name_of_machine:7001<br \/>\ncd %USERDOMAIN_HOME%<br \/>\ncall %USERDOMAIN_HOME%\\bin\\setDomainEnv.cmd<br \/>\ncall &#8220;C:\\Oracle\\Middleware\\wlserver_10.3\\server\\bin\\installSvc.cmd&#8221;<br \/>\nENDLOCAL<\/em><\/li>\n<\/ul>\n<\/li>\n<li>Run installWLSFORMS_Service.cmd. A service called &#8220;beasvc FormsDomain_WLS_FORMS&#8221; should be created.<\/li>\n<li>In &#8220;Services&#8221;, start the &#8220;beasvc FormsDomain_WLS_FORMS&#8221; service. After waiting about 2-3 minutes, check to see if the server is running.<\/li>\n<li>Repeat steps 6-9 using WLS_REPORTS. Make sure all three services are set to &#8220;Automatic&#8221;.<\/li>\n<li>Test to see if the servers automatically start up by performing a system reboot. NOTE: After the system reboots, the services may start up to five minutes later.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><strong>ALERT FOR SOME WEBLOGIC ENVIRONMENTS (All sections below added November 22, 2013)<\/strong><\/p>\n<p>There have been reports that when creating the WebLogic startup services that the WebLogic servers fail to start up due to the errors presented in %WLS_SERVER%.log:<\/p>\n<p>java.lang.OutOfMemoryError: PermGen space<\/p>\n<p>Caused by: java.lang.OutOfMemoryError: PermGen space<\/p>\n<p>To fix the problem, open up installSvc.cmd located in %MW_HOME%\\wlserver_10.3\\server\\bin (make a backup first) and make the following changes:<\/p>\n<p>Comment out: call \u201c%WL_HOME%\\common\\bin\\commEnv.cmd\u201d<\/p>\n<p>and add:<\/p>\n<ul>\n<li>set MW_HOME=LOCATION_TO_MIDDLEWARE_HOME<\/li>\n<li>call %MW_HOME%\\user_projects\\domains\\NAME_OF_DOMAIN\\bin\\setDomainEnv.cmd (where NAME_OF_DOMAIN is the name of your WebLogic domain)<\/li>\n<\/ul>\n<p><a class=\"thickbox\" href=\"https:\/\/pitss.org\/files\/2013\/11\/image4.png\"><img loading=\"lazy\" decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" src=\"https:\/\/pitss.org\/files\/2013\/11\/image_thumb4.png\" alt=\"image\" width=\"700\" height=\"195\" border=\"0\" \/><\/a><\/p>\n<p>Save and close the file.<\/p>\n<p><strong>IMPORTANT: When editing installSvc.cmd, be sure that Word Wrap is turned off to avoid file corruption! Also, it is important to have a backup of this file at all times!<\/strong><\/p>\n<p>Uninstall any existing Windows Services that you created for WebLogic. You should be able to successfully create the services and start up the WebLogic servers without failure.<\/p>\n<p><strong>Source: Oracle Support Note 1312573.1<\/strong><\/p>\n<p><strong>NOTE: If you encounter an error saying \u201cThe input line is too long\u201d, this may indicate that the CLASSPATH variable is too long to be used in installSvc.cmd. To fix this issue, please follow the steps below:<\/strong><\/p>\n<ol>\n<li>Open up Command Prompt and cd to %DOMAIN_HOME%\\bin<\/li>\n<li>For starting up:\n<ul>\n<li>AdminServer \u2013 Run:\n<ul>\n<li>setDomainEnv.cmd<\/li>\n<\/ul>\n<\/li>\n<li>WLS_FORMS, WLS_REPORTS, WLS_DISCO \u2013 Run:\n<ul>\n<li>set SERVER_NAME=WLS_SERVER_NAME<\/li>\n<li>setDomainEnv.cmd<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>cd bin<\/li>\n<li>Run:\n<ul>\n<li>echo %CLASSPATH% &gt; classpath.txt<\/li>\n<\/ul>\n<\/li>\n<li>Open up installSvc.cmd from before.<\/li>\n<li>Scroll to the bottom of the file. Look for two lines which start with \u201cset CMDLINE\u2026\u201d Notice an environment variable CLASSPATH after the \u2013classpath flag. Replace the variable with the full path to the classpath.txt file.\n<ul>\n<li>Example: \u2013classpath @c:\\Oracle\\Middleware\\user_projects\\domains\\FormsDomain\\bin\\classpath.txt<\/li>\n<li><a class=\"thickbox\" href=\"https:\/\/pitss.org\/files\/2013\/11\/image5.png\"><img loading=\"lazy\" decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" src=\"https:\/\/pitss.org\/files\/2013\/11\/image_thumb5.png\" alt=\"image\" width=\"795\" height=\"185\" border=\"0\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Save and close the file.<\/li>\n<li>Run the cmd script you originally created to create the Windows services and run one of them at a time.<\/li>\n<li>Repeat steps 1-8 for other WebLogic servers you wish to create Windows Services for.<\/li>\n<\/ol>\n<p><strong>Sources: Oracle Support note 1312573.1 and <\/strong><a title=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/web.1111\/e13708\/winservice.htm#i1188175\" href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/web.1111\/e13708\/winservice.htm#i1188175\"><strong>http:\/\/docs.oracle.com\/cd\/E17904_01\/web.1111\/e13708\/winservice.htm#i1188175<\/strong><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Alert for WLS_REPORTS (Added November 26, 2013):<\/strong><\/p>\n<p>There is a known issue where even with the above fix that WLS_REPORTS will fail to come up 100% after a server reboot. For example, in WLS_REPORTS.log, an error may appear showing:<\/p>\n<p>&lt;Error&gt; &lt;Deployer&gt; &lt;ams-fp-wlsp02&gt; &lt;WLS_REPORTS&gt; &lt;[ACTIVE] ExecuteThread: &#8216;9&#8217; for queue: &#8216;weblogic.kernel.Default (self-tuning)&#8217;&gt; &lt;&lt;WLS Kernel&gt;&gt; &lt;&gt; &lt;&gt; &lt;1385156762247&gt; &lt;BEA-149205&gt; &lt;Failed to initialize the application &#8216;reports [Version=11.1.1.2.0]&#8217; due to error weblogic.management.DeploymentException: .<\/p>\n<p>To fix the issue, you may follow these steps below:<\/p>\n<ol>\n<li>Uninstall the Windows service for starting up WLS_REPORTS (Shut down WLS_REPORTS first as it is running in a failed state)<\/li>\n<li>Start WLS_REPORTS manually.<\/li>\n<li>Check in WLS_REPORTS.log (%DOMAIN_HOME%\\servers\\WLS_REPORTS\\logs) and search for \u201cjava.class.path\u201d in the file (check near the very end of the log file to obtain the most recent value).<\/li>\n<li>Copy the value of java.class.path and paste it into the classpath.txt file.<\/li>\n<li>Recreate the Windows service for WLS_REPORTS and test.<\/li>\n<\/ol>\n<p>After applying the steps above, WLS_REPORTS should be able to start normally including after a server reboot.<\/p>\n<p><strong>Source: Oracle Support note 1339871.1<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle WebLogic servers can be started up as MS Windows Services upon system startup. NOTE: Configuring Node Manager is still the preferred method as Node Manager also is able to restart a Weblogic server if a server crashes. To install Windows services to start up the servers, you can follow these steps: Make sure each [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[4,71,10],"tags":[11,25,23,13,40,24],"class_list":["post-2851","post","type-post","status-publish","format-standard","hentry","category-install-config","category-weblogic-software","category-windows","tag-11g","tag-customer-support-request","tag-forms","tag-installation-setup","tag-weblogic","tag-windows"],"_links":{"self":[{"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/posts\/2851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/comments?post=2851"}],"version-history":[{"count":5,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/posts\/2851\/revisions"}],"predecessor-version":[{"id":9018,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/posts\/2851\/revisions\/9018"}],"wp:attachment":[{"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/media?parent=2851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/categories?post=2851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/tags?post=2851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}