You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "McDermott, Becky" <bm...@sandia.gov> on 2016/01/12 17:04:31 UTC

RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

I used the Java options provided by IBM.  Since Tomcat will successfully start using the startup batch files, I assume that these settings are fine.  I've tried playing with the settings and cannot get it to work either.  I seems like it's some sort of weird Windows thing.

I have successfully configured these services before with prior version of IBM's CLM.  The difference in those previous versions was that Tomcat came bundled with t heir product.  For this latest IBM version, Tomcat was not bundled and they provided instructions for downloading it from Apache and instructions for where to install it.

I have escalated the issue with IBM's support and since they are providing the JVM, it is probably their issue but wanted to put it out to the larger community to see if anyone has ever had this issue before.  A user on the user forums said that the memory error in the Tomcat log file is a red herring and that it is giving that memory allocation error because the JVM didn't actually start.  So, the issue seems more connected to the error in the Windows Event viewer ("cannot open file").

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Tuesday, January 12, 2016 8:59 AM
To: Tomcat Users List
Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

Becky,

On 1/12/16 10:42 AM, McDermott, Becky wrote:
> I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's installation instructions, I downloaded and extracted Tomcat 7.0.59 to my server.
> 
> I am successfully able to start the Tomcat server from the command line using the batch files provided by the IBM application (C:\Program Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well as all of the IBM CLM applications.
> 
> The problem I'm having is when I try to configure tomcat to run as a Windows service.  I have followed the instructions provided by IBM:
> 
> 
> 1.       Set the environment variable CATALINA_HOME to C:\Program Files\IBM\JazzTeamServer_601\server\tomcat
> 
> 2.       Deleted existing tomcat7 services using:  sc delete tomcat7
> 
> 3.       Re-booted the machine

Note that, depending upon how you set the CATALINA_HOME environment variable, rebooting will lose this value. I'm not sure the reboot was necessary.

> 4.       Installed the new tomcat service from the Tomcat bin directory:  service.bat install tomcat7
> 
> 5.       Configured the service using:  tomcat7w.exe
> 
> 1.       Clicked "Java" tab
> 
> 2.       Cleared "Use default" checkbox
> 
> 3.       Added the following path to the Java Virtual machine:  C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll
> 
> 4.       Added the following lines to the end of the java Options text field:
> -DJAZZ_HOME=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
> -Djava.awt.headless=true
> -Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=tr
> ue -Dcom.ibm.team.repository.tempDir=C:\Program 
> Files\IBM\JazzTeamServer_601\server\tomcat\temp
> -Djazz.connector.sslEnabledProtocols=TLSv1.2
> -Djazz.connector.algorithm=IbmX509
> -Dlog4j.configuration=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/serve
> r/conf/startup_log4j.properties
> -Xgcpolicy:gencon
> -Xcompressedrefs
> -Xgc:preferredHeapBase=0x100000000
> -XX:MaxDirectMemorySize=1G

That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing application?

> -Xmx4G
> -Xms4G
> -Xmn1g

What is -Xmn? It's probably not a problem, but I thought I'd point-out something that looks weird.

> -DORACLE_JDBC_DRIVER_FILE=C:\Program 
> Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar
> 
> 5.       Cleared the following fields:
> 
> *         Initial memory pool
> 
> *         Maximum memory pool
> 
> *         Thread stack size
> 
> 6.       In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the "Mode" setting
> 
> When I try to start the service from Windows Services, I receive the following error:
> 
> Services
> Windows could not start the Apache Tomcat 7.0 tomcat7 on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.
> 
> When I look at the Windows Event Viewer, there is an error that corresponds to the time I tried to start the service:
> 
> The Apache Tomcat 7.0 tomcat7 service terminated with the following service-specific error:
> The system cannot open the file.
> 
> The tomcat log file:  tomcat7-stderr.2016-01-12.log contains:
> 2016-01-12 08:35:10 Commons Daemon procrun stderr initialized 
> JVMJ9VM015W Initialization error for library j9gc27(2): Failed to 
> instantiate heap; 4G requested
> 
> I have contacted IBM support but they have not provided me a solution at this point.  I thought I would submit here to see if it could be a Tomcat service issue specific to Windows.  Here is my host information:
> Windows Server 2012 Standard
> Processor:  Siz-Core AMD Opteron(tm) Processor 8431 2.41 GHz Installed 
> Memory (RAM):  10.0 GB System Type:  64-bit Operating System, 
> x64-based processor
> 
> I also submitted a question to an IBM Jazz user forum and was told that the Windows Event viewer is indicating that the JVM cannot be started because it cannot find a file that is needed.  The user suggested that since my Tomcat and jvm are installed in "C:\Program Files" that perhaps it is a path issue.  I have checked all paths and have even changed all references to "PROGRA~1".  When I installed the service, I ran the install from a Windows Command Prompt that I opened using "Run as Administrator".
> 
> Since Tomcat will start fine from the command line batch files, this is perplexing.  Has anyone ever run into this?

Is it possible that you have the 32-bit service runner? That would cause the JVM to run in 32-bit mode when you launch as a service. Selecting the JVM DLL directly should definitely select the right JVM (and
architecture!) but I'm not an expert on Windows and Windows Services.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

Posted by "Terence M. Bandoian" <te...@tmbsw.com>.
On 1/13/2016 12:18 PM, McDermott, Becky wrote:
> My problem has been solved.  In the tomcat7w.exe, I had to add the following to the Java Options:
>
> -Djava.library.path=\PROGRA~1\IBM\JazzTeamServer_601\server\tomcat\lib
>
> I also had to remove:
> -Xgc:preferredHeapBase=100000000
>
> With the removal of -Xgc and the addition of the -Djava.library.path, the service successfully started.

Nice work!

-Terence

>
> -----Original Message-----
> From: Terence M. Bandoian [mailto:terence@tmbsw.com]
> Sent: Tuesday, January 12, 2016 6:46 PM
> To: Tomcat Users List
> Subject: RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service
>
> On 1/12/2016 10:04 AM, McDermott, Becky wrote:
>> I used the Java options provided by IBM.  Since Tomcat will successfully start using the startup batch files, I assume that these settings are fine.  I've tried playing with the settings and cannot get it to work either.  I seems like it's some sort of weird Windows thing.
>>
>> I have successfully configured these services before with prior version of IBM's CLM.  The difference in those previous versions was that Tomcat came bundled with t heir product.  For this latest IBM version, Tomcat was not bundled and they provided instructions for downloading it from Apache and instructions for where to install it.
>>
>> I have escalated the issue with IBM's support and since they are providing the JVM, it is probably their issue but wanted to put it out to the larger community to see if anyone has ever had this issue before.  A user on the user forums said that the memory error in the Tomcat log file is a red herring and that it is giving that memory allocation error because the JVM didn't actually start.  So, the issue seems more connected to the error in the Windows Event viewer ("cannot open file").
>
> Hi, Becky-
>
> Have you tried the Tomcat Windows Service Installer available on the download page (http://tomcat.apache.org/download-70.cgi)?  In my experience, it makes it much easier to get Tomcat up and running as a Windows service.  In addition, a configuration app is included which further simplifies the process.
>
> With your current setup, I'd start by checking the Log On settings of the service and the permissions of the Tomcat files and folders.
>
> -Terence Bandoian
>
>
>> -----Original Message-----
>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Sent: Tuesday, January 12, 2016 8:59 AM
>> To: Tomcat Users List
>> Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows
>> Service
>>
>> Becky,
>>
>> On 1/12/16 10:42 AM, McDermott, Becky wrote:
>>>> I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's installation instructions, I downloaded and extracted Tomcat 7.0.59 to my server.
>>>>
>>>> I am successfully able to start the Tomcat server from the command line using the batch files provided by the IBM application (C:\Program Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well as all of the IBM CLM applications.
>>>>
>>>> The problem I'm having is when I try to configure tomcat to run as a Windows service.  I have followed the instructions provided by IBM:
>>>>
>>>>
>>>> 1.       Set the environment variable CATALINA_HOME to C:\Program Files\IBM\JazzTeamServer_601\server\tomcat
>>>>
>>>> 2.       Deleted existing tomcat7 services using:  sc delete tomcat7
>>>>
>>>> 3.       Re-booted the machine
>> Note that, depending upon how you set the CATALINA_HOME environment variable, rebooting will lose this value. I'm not sure the reboot was necessary.
>>
>>>> 4.       Installed the new tomcat service from the Tomcat bin directory:  service.bat install tomcat7
>>>>
>>>> 5.       Configured the service using:  tomcat7w.exe
>>>>
>>>> 1.       Clicked "Java" tab
>>>>
>>>> 2.       Cleared "Use default" checkbox
>>>>
>>>> 3.       Added the following path to the Java Virtual machine:  C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll
>>>>
>>>> 4.       Added the following lines to the end of the java Options text field:
>>>> -DJAZZ_HOME=le:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
>>>> -Djava.awt.headless=ue
>>>> -Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin>> >tr ue -Dcom.ibm.team.repository.tempDir=C:\Program
>>>> Files\IBM\JazzTeamServer_601\server\tomcat\temp
>>>> -Djazz.connector.sslEnabledProtocols=Sv1.2
>>>> -Djazz.connector.algorithm=mX509
>>>> -Dlog4j.configuration=le:///C:/PROGRA~1/IBM/JazzTeamServer_601/ser
>>>> ve
>>>> r/conf/startup_log4j.properties
>>>> -Xgcpolicy:gencon
>>>> -Xcompressedrefs
>>>> -Xgc:preferredHeapBase=100000000
>>>> -XX:MaxDirectMemorySize=
>> That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing application?
>>
>>>> -Xmx4G
>>>> -Xms4G
>>>> -Xmn1g
>> What is -Xmn? It's probably not a problem, but I thought I'd point-out something that looks weird.
>>
>>>> -DORACLE_JDBC_DRIVER_FILE=\Program
>>>> Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar
>>>>
>>>> 5.       Cleared the following fields:
>>>>
>>>> *         Initial memory pool
>>>>
>>>> *         Maximum memory pool
>>>>
>>>> *         Thread stack size
>>>>
>>>> 6.       In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the "Mode" setting
>>>>
>>>> When I try to start the service from Windows Services, I receive the following error:
>>>>
>>>> Services
>>>> Windows could not start the Apache Tomcat 7.0 tomcat7 on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.
>>>>
>>>> When I look at the Windows Event Viewer, there is an error that corresponds to the time I tried to start the service:
>>>>
>>>> The Apache Tomcat 7.0 tomcat7 service terminated with the following service-specific error:
>>>> The system cannot open the file.
>>>>
>>>> The tomcat log file:  tomcat7-stderr.2016-01-12.log contains:
>>>> 2016-01-12 08:35:10 Commons Daemon procrun stderr initialized
>>>> JVMJ9VM015W Initialization error for library j9gc27(2): Failed to
>>>> instantiate heap; 4G requested
>>>>
>>>> I have contacted IBM support but they have not provided me a solution at this point.  I thought I would submit here to see if it could be a Tomcat service issue specific to Windows.  Here is my host information:
>>>> Windows Server 2012 Standard
>>>> Processor:  Siz-Core AMD Opteron(tm) Processor 8431 2.41 GHz
>>>> Installed Memory (RAM):  10.0 GB System Type:  64-bit Operating
>>>> System, x64-based processor
>>>>
>>>> I also submitted a question to an IBM Jazz user forum and was told that the Windows Event viewer is indicating that the JVM cannot be started because it cannot find a file that is needed.  The user suggested that since my Tomcat and jvm are installed in "C:\Program Files" that perhaps it is a path issue.  I have checked all paths and have even changed all references to "PROGRA~1".  When I installed the service, I ran the install from a Windows Command Prompt that I opened using "Run as Administrator".
>>>>
>>>> Since Tomcat will start fine from the command line batch files, this is perplexing.  Has anyone ever run into this?
>> Is it possible that you have the 32-bit service runner? That would
>> cause the JVM to run in 32-bit mode when you launch as a service.
>> Selecting the JVM DLL directly should definitely select the right JVM
>> (and
>> architecture!) but I'm not an expert on Windows and Windows Services.
>>
>> -chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail:users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

Posted by "McDermott, Becky" <bm...@sandia.gov>.
My problem has been solved.  In the tomcat7w.exe, I had to add the following to the Java Options:

-Djava.library.path=C:\PROGRA~1\IBM\JazzTeamServer_601\server\tomcat\lib

I also had to remove:
-Xgc:preferredHeapBase=0x100000000

With the removal of -Xgc and the addition of the -Djava.library.path, the service successfully started.

-----Original Message-----
From: Terence M. Bandoian [mailto:terence@tmbsw.com] 
Sent: Tuesday, January 12, 2016 6:46 PM
To: Tomcat Users List
Subject: RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

On 1/12/2016 10:04 AM, McDermott, Becky wrote:
> I used the Java options provided by IBM.  Since Tomcat will successfully start using the startup batch files, I assume that these settings are fine.  I've tried playing with the settings and cannot get it to work either.  I seems like it's some sort of weird Windows thing.
>
> I have successfully configured these services before with prior version of IBM's CLM.  The difference in those previous versions was that Tomcat came bundled with t heir product.  For this latest IBM version, Tomcat was not bundled and they provided instructions for downloading it from Apache and instructions for where to install it.
>
> I have escalated the issue with IBM's support and since they are providing the JVM, it is probably their issue but wanted to put it out to the larger community to see if anyone has ever had this issue before.  A user on the user forums said that the memory error in the Tomcat log file is a red herring and that it is giving that memory allocation error because the JVM didn't actually start.  So, the issue seems more connected to the error in the Windows Event viewer ("cannot open file").


Hi, Becky-

Have you tried the Tomcat Windows Service Installer available on the download page (http://tomcat.apache.org/download-70.cgi)?  In my experience, it makes it much easier to get Tomcat up and running as a Windows service.  In addition, a configuration app is included which further simplifies the process.

With your current setup, I'd start by checking the Log On settings of the service and the permissions of the Tomcat files and folders.

-Terence Bandoian


>
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Sent: Tuesday, January 12, 2016 8:59 AM
> To: Tomcat Users List
> Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows 
> Service
>
> Becky,
>
> On 1/12/16 10:42 AM, McDermott, Becky wrote:
>> >I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's installation instructions, I downloaded and extracted Tomcat 7.0.59 to my server.
>> >
>> >I am successfully able to start the Tomcat server from the command line using the batch files provided by the IBM application (C:\Program Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well as all of the IBM CLM applications.
>> >
>> >The problem I'm having is when I try to configure tomcat to run as a Windows service.  I have followed the instructions provided by IBM:
>> >
>> >
>> >1.       Set the environment variable CATALINA_HOME to C:\Program Files\IBM\JazzTeamServer_601\server\tomcat
>> >
>> >2.       Deleted existing tomcat7 services using:  sc delete tomcat7
>> >
>> >3.       Re-booted the machine
> Note that, depending upon how you set the CATALINA_HOME environment variable, rebooting will lose this value. I'm not sure the reboot was necessary.
>
>> >4.       Installed the new tomcat service from the Tomcat bin directory:  service.bat install tomcat7
>> >
>> >5.       Configured the service using:  tomcat7w.exe
>> >
>> >1.       Clicked "Java" tab
>> >
>> >2.       Cleared "Use default" checkbox
>> >
>> >3.       Added the following path to the Java Virtual machine:  C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll
>> >
>> >4.       Added the following lines to the end of the java Options text field:
>> >-DJAZZ_HOME=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
>> >-Djava.awt.headless=true
>> >-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=
>> >tr ue -Dcom.ibm.team.repository.tempDir=C:\Program
>> >Files\IBM\JazzTeamServer_601\server\tomcat\temp
>> >-Djazz.connector.sslEnabledProtocols=TLSv1.2
>> >-Djazz.connector.algorithm=IbmX509
>> >-Dlog4j.configuration=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/ser
>> >ve
>> >r/conf/startup_log4j.properties
>> >-Xgcpolicy:gencon
>> >-Xcompressedrefs
>> >-Xgc:preferredHeapBase=0x100000000
>> >-XX:MaxDirectMemorySize=1G
> That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing application?
>
>> >-Xmx4G
>> >-Xms4G
>> >-Xmn1g
> What is -Xmn? It's probably not a problem, but I thought I'd point-out something that looks weird.
>
>> >-DORACLE_JDBC_DRIVER_FILE=C:\Program
>> >Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar
>> >
>> >5.       Cleared the following fields:
>> >
>> >*         Initial memory pool
>> >
>> >*         Maximum memory pool
>> >
>> >*         Thread stack size
>> >
>> >6.       In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the "Mode" setting
>> >
>> >When I try to start the service from Windows Services, I receive the following error:
>> >
>> >Services
>> >Windows could not start the Apache Tomcat 7.0 tomcat7 on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.
>> >
>> >When I look at the Windows Event Viewer, there is an error that corresponds to the time I tried to start the service:
>> >
>> >The Apache Tomcat 7.0 tomcat7 service terminated with the following service-specific error:
>> >The system cannot open the file.
>> >
>> >The tomcat log file:  tomcat7-stderr.2016-01-12.log contains:
>> >2016-01-12 08:35:10 Commons Daemon procrun stderr initialized 
>> >JVMJ9VM015W Initialization error for library j9gc27(2): Failed to 
>> >instantiate heap; 4G requested
>> >
>> >I have contacted IBM support but they have not provided me a solution at this point.  I thought I would submit here to see if it could be a Tomcat service issue specific to Windows.  Here is my host information:
>> >Windows Server 2012 Standard
>> >Processor:  Siz-Core AMD Opteron(tm) Processor 8431 2.41 GHz 
>> >Installed Memory (RAM):  10.0 GB System Type:  64-bit Operating 
>> >System, x64-based processor
>> >
>> >I also submitted a question to an IBM Jazz user forum and was told that the Windows Event viewer is indicating that the JVM cannot be started because it cannot find a file that is needed.  The user suggested that since my Tomcat and jvm are installed in "C:\Program Files" that perhaps it is a path issue.  I have checked all paths and have even changed all references to "PROGRA~1".  When I installed the service, I ran the install from a Windows Command Prompt that I opened using "Run as Administrator".
>> >
>> >Since Tomcat will start fine from the command line batch files, this is perplexing.  Has anyone ever run into this?
> Is it possible that you have the 32-bit service runner? That would 
> cause the JVM to run in 32-bit mode when you launch as a service. 
> Selecting the JVM DLL directly should definitely select the right JVM 
> (and
> architecture!) but I'm not an expert on Windows and Windows Services.
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

Posted by "Terence M. Bandoian" <te...@tmbsw.com>.
On 1/12/2016 10:04 AM, McDermott, Becky wrote:
> I used the Java options provided by IBM.  Since Tomcat will successfully start using the startup batch files, I assume that these settings are fine.  I've tried playing with the settings and cannot get it to work either.  I seems like it's some sort of weird Windows thing.
>
> I have successfully configured these services before with prior version of IBM's CLM.  The difference in those previous versions was that Tomcat came bundled with t heir product.  For this latest IBM version, Tomcat was not bundled and they provided instructions for downloading it from Apache and instructions for where to install it.
>
> I have escalated the issue with IBM's support and since they are providing the JVM, it is probably their issue but wanted to put it out to the larger community to see if anyone has ever had this issue before.  A user on the user forums said that the memory error in the Tomcat log file is a red herring and that it is giving that memory allocation error because the JVM didn't actually start.  So, the issue seems more connected to the error in the Windows Event viewer ("cannot open file").


Hi, Becky-

Have you tried the Tomcat Windows Service Installer available on the 
download page (http://tomcat.apache.org/download-70.cgi)?  In my 
experience, it makes it much easier to get Tomcat up and running as a 
Windows service.  In addition, a configuration app is included which 
further simplifies the process.

With your current setup, I'd start by checking the Log On settings of 
the service and the permissions of the Tomcat files and folders.

-Terence Bandoian


>
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Sent: Tuesday, January 12, 2016 8:59 AM
> To: Tomcat Users List
> Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service
>
> Becky,
>
> On 1/12/16 10:42 AM, McDermott, Becky wrote:
>> >I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's installation instructions, I downloaded and extracted Tomcat 7.0.59 to my server.
>> >
>> >I am successfully able to start the Tomcat server from the command line using the batch files provided by the IBM application (C:\Program Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well as all of the IBM CLM applications.
>> >
>> >The problem I'm having is when I try to configure tomcat to run as a Windows service.  I have followed the instructions provided by IBM:
>> >
>> >
>> >1.       Set the environment variable CATALINA_HOME to C:\Program Files\IBM\JazzTeamServer_601\server\tomcat
>> >
>> >2.       Deleted existing tomcat7 services using:  sc delete tomcat7
>> >
>> >3.       Re-booted the machine
> Note that, depending upon how you set the CATALINA_HOME environment variable, rebooting will lose this value. I'm not sure the reboot was necessary.
>
>> >4.       Installed the new tomcat service from the Tomcat bin directory:  service.bat install tomcat7
>> >
>> >5.       Configured the service using:  tomcat7w.exe
>> >
>> >1.       Clicked "Java" tab
>> >
>> >2.       Cleared "Use default" checkbox
>> >
>> >3.       Added the following path to the Java Virtual machine:  C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll
>> >
>> >4.       Added the following lines to the end of the java Options text field:
>> >-DJAZZ_HOME=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
>> >-Djava.awt.headless=true
>> >-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=tr
>> >ue -Dcom.ibm.team.repository.tempDir=C:\Program
>> >Files\IBM\JazzTeamServer_601\server\tomcat\temp
>> >-Djazz.connector.sslEnabledProtocols=TLSv1.2
>> >-Djazz.connector.algorithm=IbmX509
>> >-Dlog4j.configuration=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/serve
>> >r/conf/startup_log4j.properties
>> >-Xgcpolicy:gencon
>> >-Xcompressedrefs
>> >-Xgc:preferredHeapBase=0x100000000
>> >-XX:MaxDirectMemorySize=1G
> That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing application?
>
>> >-Xmx4G
>> >-Xms4G
>> >-Xmn1g
> What is -Xmn? It's probably not a problem, but I thought I'd point-out something that looks weird.
>
>> >-DORACLE_JDBC_DRIVER_FILE=C:\Program
>> >Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar
>> >
>> >5.       Cleared the following fields:
>> >
>> >*         Initial memory pool
>> >
>> >*         Maximum memory pool
>> >
>> >*         Thread stack size
>> >
>> >6.       In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the "Mode" setting
>> >
>> >When I try to start the service from Windows Services, I receive the following error:
>> >
>> >Services
>> >Windows could not start the Apache Tomcat 7.0 tomcat7 on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.
>> >
>> >When I look at the Windows Event Viewer, there is an error that corresponds to the time I tried to start the service:
>> >
>> >The Apache Tomcat 7.0 tomcat7 service terminated with the following service-specific error:
>> >The system cannot open the file.
>> >
>> >The tomcat log file:  tomcat7-stderr.2016-01-12.log contains:
>> >2016-01-12 08:35:10 Commons Daemon procrun stderr initialized
>> >JVMJ9VM015W Initialization error for library j9gc27(2): Failed to
>> >instantiate heap; 4G requested
>> >
>> >I have contacted IBM support but they have not provided me a solution at this point.  I thought I would submit here to see if it could be a Tomcat service issue specific to Windows.  Here is my host information:
>> >Windows Server 2012 Standard
>> >Processor:  Siz-Core AMD Opteron(tm) Processor 8431 2.41 GHz Installed
>> >Memory (RAM):  10.0 GB System Type:  64-bit Operating System,
>> >x64-based processor
>> >
>> >I also submitted a question to an IBM Jazz user forum and was told that the Windows Event viewer is indicating that the JVM cannot be started because it cannot find a file that is needed.  The user suggested that since my Tomcat and jvm are installed in "C:\Program Files" that perhaps it is a path issue.  I have checked all paths and have even changed all references to "PROGRA~1".  When I installed the service, I ran the install from a Windows Command Prompt that I opened using "Run as Administrator".
>> >
>> >Since Tomcat will start fine from the command line batch files, this is perplexing.  Has anyone ever run into this?
> Is it possible that you have the 32-bit service runner? That would cause the JVM to run in 32-bit mode when you launch as a service. Selecting the JVM DLL directly should definitely select the right JVM (and
> architecture!) but I'm not an expert on Windows and Windows Services.
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 12.01.2016 18:29, Mark Thomas wrote:
> On 12/01/2016 17:10, McDermott, Becky wrote:
>> I am definitely not a Java/Tomcat expert so I appreciate the info.  I have 10GB of RAM and only 1.2 GB is in use when I try to start the tomcat service.
>
> OK. You should be OK then but you never know. One thing to try is lower
> settings to see if you can find when the problem starts. The error code
> JVMJ9VM015W is the one for not enough system memory available.
>
>> I downloaded from:  http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/?cm_mc_uid=36937329763514476995925&cm_mc_sid_50200000=1450452120
>> And downloaded/extracted "apache-tomcat-7.0.59-windows-x64.zip"
>
> Good. That means you will only have the 64-bit service wrapper.
>
>> Also, when I go to the location of my jre (C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin) and run:  java -version
>> I get:
>> java version "1.7.0"
>> Java(TM) SE Runtime Environment (build pwa6470_27sr3fp10-20150708_01(SR3 FP10))
>> IBM J9 VM (build 2.7, JRE 1.7.0 Windows Server 2012 amd64-64 Compressed Referenc
>> es 20150630_255653 (JIT enabled, AOT enabled)
>> J9VM - R27_Java727_SR3_20150630_2236_B255653
>> JIT  - tr.r13.java_20150623_94888.01
>> GC   - R27_Java727_SR3_20150630_2236_B255653_CMPRSS
>> J9CL - 20150630_255653)
>> JCL - 20150628_01 based on Oracle jdk7u85-b15
>
> That looks good.
>
>> The fact that I can start Tomcat from the command line scripts is indicating to me that the memory settings are ok for my server.  The server.start.bat file that IBM provides (which I successfully run from the command line) has the exact same memory settings that I'm providing to the Windows service.
>
> When you entered the settings in the service UI, did you use new lines
> between each setting? I have a vague memory of them either being
> required or not allowed. With line wrapping it can be hard to tell what
> is what. I'm not near a Windows box at the moment so I can't test that.
>

Don't know if that helps, but on my laptop I have an old tomcat 6 installed, and in the 
GUI "Javba options" box it shows up like this :

-Dcatalina.base=C:\apache-tomcat-6.0.24
-Dcatalina.home=C:\apache-tomcat-6.0.24
-Djava.endorsed.dirs=C:\apache-tomcat-6.0.24\endorsed
-Djava.io.tmpdir=C:\apache-tomcat-6.0.24\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\apache-tomcat-6.0.24\conf\logging.properties
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1093
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=127.0.0.1

(looks like one option per line, with CR/LF at the end of each)



> Mark
>
>
>>
>>
>> -----Original Message-----
>> From: Mark Thomas [mailto:markt@apache.org]
>> Sent: Tuesday, January 12, 2016 9:57 AM
>> To: Tomcat Users List
>> Subject: Re: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service
>>
>> On 12/01/2016 16:04, McDermott, Becky wrote:
>>> I used the Java options provided by IBM.  Since Tomcat will successfully start using the startup batch files, I assume that these settings are fine.  I've tried playing with the settings and cannot get it to work either.  I seems like it's some sort of weird Windows thing.
>>>
>>> I have successfully configured these services before with prior version of IBM's CLM.  The difference in those previous versions was that Tomcat came bundled with t heir product.  For this latest IBM version, Tomcat was not bundled and they provided instructions for downloading it from Apache and instructions for where to install it.
>>>
>>> I have escalated the issue with IBM's support and since they are providing the JVM, it is probably their issue but wanted to put it out to the larger community to see if anyone has ever had this issue before.  A user on the user forums said that the memory error in the Tomcat log file is a red herring and that it is giving that memory allocation error because the JVM didn't actually start.  So, the issue seems more connected to the error in the Windows Event viewer ("cannot open file").
>>
>> Nope. The Tomcat log file has the useful information. Ignore the event viewer.
>>
>> 4G of heap + 1G of native + whatever else the JVM needs is an awful lot.
>> Are you sure there is enough free RAM on the box?
>>
>> Also, as Chris indicated, check that you are using the 64-bit version of the service runner and a 64-bit JVM.
>>
>> Exactly which Tomcat download did you use?
>>
>> Mark
>>
>>
>>>
>>> -----Original Message-----
>>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>>> Sent: Tuesday, January 12, 2016 8:59 AM
>>> To: Tomcat Users List
>>> Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows
>>> Service
>>>
>>> Becky,
>>>
>>> On 1/12/16 10:42 AM, McDermott, Becky wrote:
>>>> I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's installation instructions, I downloaded and extracted Tomcat 7.0.59 to my server.
>>>>
>>>> I am successfully able to start the Tomcat server from the command line using the batch files provided by the IBM application (C:\Program Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well as all of the IBM CLM applications.
>>>>
>>>> The problem I'm having is when I try to configure tomcat to run as a Windows service.  I have followed the instructions provided by IBM:
>>>>
>>>>
>>>> 1.       Set the environment variable CATALINA_HOME to C:\Program Files\IBM\JazzTeamServer_601\server\tomcat
>>>>
>>>> 2.       Deleted existing tomcat7 services using:  sc delete tomcat7
>>>>
>>>> 3.       Re-booted the machine
>>>
>>> Note that, depending upon how you set the CATALINA_HOME environment variable, rebooting will lose this value. I'm not sure the reboot was necessary.
>>>
>>>> 4.       Installed the new tomcat service from the Tomcat bin directory:  service.bat install tomcat7
>>>>
>>>> 5.       Configured the service using:  tomcat7w.exe
>>>>
>>>> 1.       Clicked "Java" tab
>>>>
>>>> 2.       Cleared "Use default" checkbox
>>>>
>>>> 3.       Added the following path to the Java Virtual machine:  C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll
>>>>
>>>> 4.       Added the following lines to the end of the java Options text field:
>>>> -DJAZZ_HOME=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
>>>> -Djava.awt.headless=true
>>>> -Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=t
>>>> r ue -Dcom.ibm.team.repository.tempDir=C:\Program
>>>> Files\IBM\JazzTeamServer_601\server\tomcat\temp
>>>> -Djazz.connector.sslEnabledProtocols=TLSv1.2
>>>> -Djazz.connector.algorithm=IbmX509
>>>> -Dlog4j.configuration=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/serv
>>>> e
>>>> r/conf/startup_log4j.properties
>>>> -Xgcpolicy:gencon
>>>> -Xcompressedrefs
>>>> -Xgc:preferredHeapBase=0x100000000
>>>> -XX:MaxDirectMemorySize=1G
>>>
>>> That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing application?
>>>
>>>> -Xmx4G
>>>> -Xms4G
>>>> -Xmn1g
>>>
>>> What is -Xmn? It's probably not a problem, but I thought I'd point-out something that looks weird.
>>>
>>>> -DORACLE_JDBC_DRIVER_FILE=C:\Program
>>>> Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar
>>>>
>>>> 5.       Cleared the following fields:
>>>>
>>>> *         Initial memory pool
>>>>
>>>> *         Maximum memory pool
>>>>
>>>> *         Thread stack size
>>>>
>>>> 6.       In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the "Mode" setting
>>>>
>>>> When I try to start the service from Windows Services, I receive the following error:
>>>>
>>>> Services
>>>> Windows could not start the Apache Tomcat 7.0 tomcat7 on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.
>>>>
>>>> When I look at the Windows Event Viewer, there is an error that corresponds to the time I tried to start the service:
>>>>
>>>> The Apache Tomcat 7.0 tomcat7 service terminated with the following service-specific error:
>>>> The system cannot open the file.
>>>>
>>>> The tomcat log file:  tomcat7-stderr.2016-01-12.log contains:
>>>> 2016-01-12 08:35:10 Commons Daemon procrun stderr initialized
>>>> JVMJ9VM015W Initialization error for library j9gc27(2): Failed to
>>>> instantiate heap; 4G requested
>>>>
>>>> I have contacted IBM support but they have not provided me a solution at this point.  I thought I would submit here to see if it could be a Tomcat service issue specific to Windows.  Here is my host information:
>>>> Windows Server 2012 Standard
>>>> Processor:  Siz-Core AMD Opteron(tm) Processor 8431 2.41 GHz
>>>> Installed Memory (RAM):  10.0 GB System Type:  64-bit Operating
>>>> System, x64-based processor
>>>>
>>>> I also submitted a question to an IBM Jazz user forum and was told that the Windows Event viewer is indicating that the JVM cannot be started because it cannot find a file that is needed.  The user suggested that since my Tomcat and jvm are installed in "C:\Program Files" that perhaps it is a path issue.  I have checked all paths and have even changed all references to "PROGRA~1".  When I installed the service, I ran the install from a Windows Command Prompt that I opened using "Run as Administrator".
>>>>
>>>> Since Tomcat will start fine from the command line batch files, this is perplexing.  Has anyone ever run into this?
>>>
>>> Is it possible that you have the 32-bit service runner? That would
>>> cause the JVM to run in 32-bit mode when you launch as a service.
>>> Selecting the JVM DLL directly should definitely select the right JVM
>>> (and
>>> architecture!) but I'm not an expert on Windows and Windows Services.
>>>
>>> -chris
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

Posted by Mark Thomas <ma...@apache.org>.
On 12/01/2016 17:10, McDermott, Becky wrote:
> I am definitely not a Java/Tomcat expert so I appreciate the info.  I have 10GB of RAM and only 1.2 GB is in use when I try to start the tomcat service.

OK. You should be OK then but you never know. One thing to try is lower
settings to see if you can find when the problem starts. The error code
JVMJ9VM015W is the one for not enough system memory available.

> I downloaded from:  http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/?cm_mc_uid=36937329763514476995925&cm_mc_sid_50200000=1450452120
> And downloaded/extracted "apache-tomcat-7.0.59-windows-x64.zip"

Good. That means you will only have the 64-bit service wrapper.

> Also, when I go to the location of my jre (C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin) and run:  java -version
> I get: 
> java version "1.7.0"
> Java(TM) SE Runtime Environment (build pwa6470_27sr3fp10-20150708_01(SR3 FP10))
> IBM J9 VM (build 2.7, JRE 1.7.0 Windows Server 2012 amd64-64 Compressed Referenc
> es 20150630_255653 (JIT enabled, AOT enabled)
> J9VM - R27_Java727_SR3_20150630_2236_B255653
> JIT  - tr.r13.java_20150623_94888.01
> GC   - R27_Java727_SR3_20150630_2236_B255653_CMPRSS
> J9CL - 20150630_255653)
> JCL - 20150628_01 based on Oracle jdk7u85-b15

That looks good.

> The fact that I can start Tomcat from the command line scripts is indicating to me that the memory settings are ok for my server.  The server.start.bat file that IBM provides (which I successfully run from the command line) has the exact same memory settings that I'm providing to the Windows service.

When you entered the settings in the service UI, did you use new lines
between each setting? I have a vague memory of them either being
required or not allowed. With line wrapping it can be hard to tell what
is what. I'm not near a Windows box at the moment so I can't test that.

Mark


> 
> 
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org] 
> Sent: Tuesday, January 12, 2016 9:57 AM
> To: Tomcat Users List
> Subject: Re: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service
> 
> On 12/01/2016 16:04, McDermott, Becky wrote:
>> I used the Java options provided by IBM.  Since Tomcat will successfully start using the startup batch files, I assume that these settings are fine.  I've tried playing with the settings and cannot get it to work either.  I seems like it's some sort of weird Windows thing.
>>
>> I have successfully configured these services before with prior version of IBM's CLM.  The difference in those previous versions was that Tomcat came bundled with t heir product.  For this latest IBM version, Tomcat was not bundled and they provided instructions for downloading it from Apache and instructions for where to install it.
>>
>> I have escalated the issue with IBM's support and since they are providing the JVM, it is probably their issue but wanted to put it out to the larger community to see if anyone has ever had this issue before.  A user on the user forums said that the memory error in the Tomcat log file is a red herring and that it is giving that memory allocation error because the JVM didn't actually start.  So, the issue seems more connected to the error in the Windows Event viewer ("cannot open file").
> 
> Nope. The Tomcat log file has the useful information. Ignore the event viewer.
> 
> 4G of heap + 1G of native + whatever else the JVM needs is an awful lot.
> Are you sure there is enough free RAM on the box?
> 
> Also, as Chris indicated, check that you are using the 64-bit version of the service runner and a 64-bit JVM.
> 
> Exactly which Tomcat download did you use?
> 
> Mark
> 
> 
>>
>> -----Original Message-----
>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Sent: Tuesday, January 12, 2016 8:59 AM
>> To: Tomcat Users List
>> Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows 
>> Service
>>
>> Becky,
>>
>> On 1/12/16 10:42 AM, McDermott, Becky wrote:
>>> I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's installation instructions, I downloaded and extracted Tomcat 7.0.59 to my server.
>>>
>>> I am successfully able to start the Tomcat server from the command line using the batch files provided by the IBM application (C:\Program Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well as all of the IBM CLM applications.
>>>
>>> The problem I'm having is when I try to configure tomcat to run as a Windows service.  I have followed the instructions provided by IBM:
>>>
>>>
>>> 1.       Set the environment variable CATALINA_HOME to C:\Program Files\IBM\JazzTeamServer_601\server\tomcat
>>>
>>> 2.       Deleted existing tomcat7 services using:  sc delete tomcat7
>>>
>>> 3.       Re-booted the machine
>>
>> Note that, depending upon how you set the CATALINA_HOME environment variable, rebooting will lose this value. I'm not sure the reboot was necessary.
>>
>>> 4.       Installed the new tomcat service from the Tomcat bin directory:  service.bat install tomcat7
>>>
>>> 5.       Configured the service using:  tomcat7w.exe
>>>
>>> 1.       Clicked "Java" tab
>>>
>>> 2.       Cleared "Use default" checkbox
>>>
>>> 3.       Added the following path to the Java Virtual machine:  C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll
>>>
>>> 4.       Added the following lines to the end of the java Options text field:
>>> -DJAZZ_HOME=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
>>> -Djava.awt.headless=true
>>> -Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=t
>>> r ue -Dcom.ibm.team.repository.tempDir=C:\Program
>>> Files\IBM\JazzTeamServer_601\server\tomcat\temp
>>> -Djazz.connector.sslEnabledProtocols=TLSv1.2
>>> -Djazz.connector.algorithm=IbmX509
>>> -Dlog4j.configuration=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/serv
>>> e
>>> r/conf/startup_log4j.properties
>>> -Xgcpolicy:gencon
>>> -Xcompressedrefs
>>> -Xgc:preferredHeapBase=0x100000000
>>> -XX:MaxDirectMemorySize=1G
>>
>> That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing application?
>>
>>> -Xmx4G
>>> -Xms4G
>>> -Xmn1g
>>
>> What is -Xmn? It's probably not a problem, but I thought I'd point-out something that looks weird.
>>
>>> -DORACLE_JDBC_DRIVER_FILE=C:\Program
>>> Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar
>>>
>>> 5.       Cleared the following fields:
>>>
>>> *         Initial memory pool
>>>
>>> *         Maximum memory pool
>>>
>>> *         Thread stack size
>>>
>>> 6.       In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the "Mode" setting
>>>
>>> When I try to start the service from Windows Services, I receive the following error:
>>>
>>> Services
>>> Windows could not start the Apache Tomcat 7.0 tomcat7 on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.
>>>
>>> When I look at the Windows Event Viewer, there is an error that corresponds to the time I tried to start the service:
>>>
>>> The Apache Tomcat 7.0 tomcat7 service terminated with the following service-specific error:
>>> The system cannot open the file.
>>>
>>> The tomcat log file:  tomcat7-stderr.2016-01-12.log contains:
>>> 2016-01-12 08:35:10 Commons Daemon procrun stderr initialized 
>>> JVMJ9VM015W Initialization error for library j9gc27(2): Failed to 
>>> instantiate heap; 4G requested
>>>
>>> I have contacted IBM support but they have not provided me a solution at this point.  I thought I would submit here to see if it could be a Tomcat service issue specific to Windows.  Here is my host information:
>>> Windows Server 2012 Standard
>>> Processor:  Siz-Core AMD Opteron(tm) Processor 8431 2.41 GHz 
>>> Installed Memory (RAM):  10.0 GB System Type:  64-bit Operating 
>>> System, x64-based processor
>>>
>>> I also submitted a question to an IBM Jazz user forum and was told that the Windows Event viewer is indicating that the JVM cannot be started because it cannot find a file that is needed.  The user suggested that since my Tomcat and jvm are installed in "C:\Program Files" that perhaps it is a path issue.  I have checked all paths and have even changed all references to "PROGRA~1".  When I installed the service, I ran the install from a Windows Command Prompt that I opened using "Run as Administrator".
>>>
>>> Since Tomcat will start fine from the command line batch files, this is perplexing.  Has anyone ever run into this?
>>
>> Is it possible that you have the 32-bit service runner? That would 
>> cause the JVM to run in 32-bit mode when you launch as a service. 
>> Selecting the JVM DLL directly should definitely select the right JVM 
>> (and
>> architecture!) but I'm not an expert on Windows and Windows Services.
>>
>> -chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

Posted by "McDermott, Becky" <bm...@sandia.gov>.
I am definitely not a Java/Tomcat expert so I appreciate the info.  I have 10GB of RAM and only 1.2 GB is in use when I try to start the tomcat service.

I downloaded from:  http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/?cm_mc_uid=36937329763514476995925&cm_mc_sid_50200000=1450452120
And downloaded/extracted "apache-tomcat-7.0.59-windows-x64.zip"

Also, when I go to the location of my jre (C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin) and run:  java -version
I get: 
java version "1.7.0"
Java(TM) SE Runtime Environment (build pwa6470_27sr3fp10-20150708_01(SR3 FP10))
IBM J9 VM (build 2.7, JRE 1.7.0 Windows Server 2012 amd64-64 Compressed Referenc
es 20150630_255653 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR3_20150630_2236_B255653
JIT  - tr.r13.java_20150623_94888.01
GC   - R27_Java727_SR3_20150630_2236_B255653_CMPRSS
J9CL - 20150630_255653)
JCL - 20150628_01 based on Oracle jdk7u85-b15

The fact that I can start Tomcat from the command line scripts is indicating to me that the memory settings are ok for my server.  The server.start.bat file that IBM provides (which I successfully run from the command line) has the exact same memory settings that I'm providing to the Windows service.


-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Tuesday, January 12, 2016 9:57 AM
To: Tomcat Users List
Subject: Re: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

On 12/01/2016 16:04, McDermott, Becky wrote:
> I used the Java options provided by IBM.  Since Tomcat will successfully start using the startup batch files, I assume that these settings are fine.  I've tried playing with the settings and cannot get it to work either.  I seems like it's some sort of weird Windows thing.
> 
> I have successfully configured these services before with prior version of IBM's CLM.  The difference in those previous versions was that Tomcat came bundled with t heir product.  For this latest IBM version, Tomcat was not bundled and they provided instructions for downloading it from Apache and instructions for where to install it.
> 
> I have escalated the issue with IBM's support and since they are providing the JVM, it is probably their issue but wanted to put it out to the larger community to see if anyone has ever had this issue before.  A user on the user forums said that the memory error in the Tomcat log file is a red herring and that it is giving that memory allocation error because the JVM didn't actually start.  So, the issue seems more connected to the error in the Windows Event viewer ("cannot open file").

Nope. The Tomcat log file has the useful information. Ignore the event viewer.

4G of heap + 1G of native + whatever else the JVM needs is an awful lot.
Are you sure there is enough free RAM on the box?

Also, as Chris indicated, check that you are using the 64-bit version of the service runner and a 64-bit JVM.

Exactly which Tomcat download did you use?

Mark


> 
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Sent: Tuesday, January 12, 2016 8:59 AM
> To: Tomcat Users List
> Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows 
> Service
> 
> Becky,
> 
> On 1/12/16 10:42 AM, McDermott, Becky wrote:
>> I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's installation instructions, I downloaded and extracted Tomcat 7.0.59 to my server.
>>
>> I am successfully able to start the Tomcat server from the command line using the batch files provided by the IBM application (C:\Program Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well as all of the IBM CLM applications.
>>
>> The problem I'm having is when I try to configure tomcat to run as a Windows service.  I have followed the instructions provided by IBM:
>>
>>
>> 1.       Set the environment variable CATALINA_HOME to C:\Program Files\IBM\JazzTeamServer_601\server\tomcat
>>
>> 2.       Deleted existing tomcat7 services using:  sc delete tomcat7
>>
>> 3.       Re-booted the machine
> 
> Note that, depending upon how you set the CATALINA_HOME environment variable, rebooting will lose this value. I'm not sure the reboot was necessary.
> 
>> 4.       Installed the new tomcat service from the Tomcat bin directory:  service.bat install tomcat7
>>
>> 5.       Configured the service using:  tomcat7w.exe
>>
>> 1.       Clicked "Java" tab
>>
>> 2.       Cleared "Use default" checkbox
>>
>> 3.       Added the following path to the Java Virtual machine:  C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll
>>
>> 4.       Added the following lines to the end of the java Options text field:
>> -DJAZZ_HOME=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
>> -Djava.awt.headless=true
>> -Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=t
>> r ue -Dcom.ibm.team.repository.tempDir=C:\Program
>> Files\IBM\JazzTeamServer_601\server\tomcat\temp
>> -Djazz.connector.sslEnabledProtocols=TLSv1.2
>> -Djazz.connector.algorithm=IbmX509
>> -Dlog4j.configuration=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/serv
>> e
>> r/conf/startup_log4j.properties
>> -Xgcpolicy:gencon
>> -Xcompressedrefs
>> -Xgc:preferredHeapBase=0x100000000
>> -XX:MaxDirectMemorySize=1G
> 
> That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing application?
> 
>> -Xmx4G
>> -Xms4G
>> -Xmn1g
> 
> What is -Xmn? It's probably not a problem, but I thought I'd point-out something that looks weird.
> 
>> -DORACLE_JDBC_DRIVER_FILE=C:\Program
>> Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar
>>
>> 5.       Cleared the following fields:
>>
>> *         Initial memory pool
>>
>> *         Maximum memory pool
>>
>> *         Thread stack size
>>
>> 6.       In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the "Mode" setting
>>
>> When I try to start the service from Windows Services, I receive the following error:
>>
>> Services
>> Windows could not start the Apache Tomcat 7.0 tomcat7 on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.
>>
>> When I look at the Windows Event Viewer, there is an error that corresponds to the time I tried to start the service:
>>
>> The Apache Tomcat 7.0 tomcat7 service terminated with the following service-specific error:
>> The system cannot open the file.
>>
>> The tomcat log file:  tomcat7-stderr.2016-01-12.log contains:
>> 2016-01-12 08:35:10 Commons Daemon procrun stderr initialized 
>> JVMJ9VM015W Initialization error for library j9gc27(2): Failed to 
>> instantiate heap; 4G requested
>>
>> I have contacted IBM support but they have not provided me a solution at this point.  I thought I would submit here to see if it could be a Tomcat service issue specific to Windows.  Here is my host information:
>> Windows Server 2012 Standard
>> Processor:  Siz-Core AMD Opteron(tm) Processor 8431 2.41 GHz 
>> Installed Memory (RAM):  10.0 GB System Type:  64-bit Operating 
>> System, x64-based processor
>>
>> I also submitted a question to an IBM Jazz user forum and was told that the Windows Event viewer is indicating that the JVM cannot be started because it cannot find a file that is needed.  The user suggested that since my Tomcat and jvm are installed in "C:\Program Files" that perhaps it is a path issue.  I have checked all paths and have even changed all references to "PROGRA~1".  When I installed the service, I ran the install from a Windows Command Prompt that I opened using "Run as Administrator".
>>
>> Since Tomcat will start fine from the command line batch files, this is perplexing.  Has anyone ever run into this?
> 
> Is it possible that you have the 32-bit service runner? That would 
> cause the JVM to run in 32-bit mode when you launch as a service. 
> Selecting the JVM DLL directly should definitely select the right JVM 
> (and
> architecture!) but I'm not an expert on Windows and Windows Services.
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

Posted by Mark Thomas <ma...@apache.org>.
On 12/01/2016 16:04, McDermott, Becky wrote:
> I used the Java options provided by IBM.  Since Tomcat will successfully start using the startup batch files, I assume that these settings are fine.  I've tried playing with the settings and cannot get it to work either.  I seems like it's some sort of weird Windows thing.
> 
> I have successfully configured these services before with prior version of IBM's CLM.  The difference in those previous versions was that Tomcat came bundled with t heir product.  For this latest IBM version, Tomcat was not bundled and they provided instructions for downloading it from Apache and instructions for where to install it.
> 
> I have escalated the issue with IBM's support and since they are providing the JVM, it is probably their issue but wanted to put it out to the larger community to see if anyone has ever had this issue before.  A user on the user forums said that the memory error in the Tomcat log file is a red herring and that it is giving that memory allocation error because the JVM didn't actually start.  So, the issue seems more connected to the error in the Windows Event viewer ("cannot open file").

Nope. The Tomcat log file has the useful information. Ignore the event
viewer.

4G of heap + 1G of native + whatever else the JVM needs is an awful lot.
Are you sure there is enough free RAM on the box?

Also, as Chris indicated, check that you are using the 64-bit version of
the service runner and a 64-bit JVM.

Exactly which Tomcat download did you use?

Mark


> 
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Sent: Tuesday, January 12, 2016 8:59 AM
> To: Tomcat Users List
> Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service
> 
> Becky,
> 
> On 1/12/16 10:42 AM, McDermott, Becky wrote:
>> I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's installation instructions, I downloaded and extracted Tomcat 7.0.59 to my server.
>>
>> I am successfully able to start the Tomcat server from the command line using the batch files provided by the IBM application (C:\Program Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well as all of the IBM CLM applications.
>>
>> The problem I'm having is when I try to configure tomcat to run as a Windows service.  I have followed the instructions provided by IBM:
>>
>>
>> 1.       Set the environment variable CATALINA_HOME to C:\Program Files\IBM\JazzTeamServer_601\server\tomcat
>>
>> 2.       Deleted existing tomcat7 services using:  sc delete tomcat7
>>
>> 3.       Re-booted the machine
> 
> Note that, depending upon how you set the CATALINA_HOME environment variable, rebooting will lose this value. I'm not sure the reboot was necessary.
> 
>> 4.       Installed the new tomcat service from the Tomcat bin directory:  service.bat install tomcat7
>>
>> 5.       Configured the service using:  tomcat7w.exe
>>
>> 1.       Clicked "Java" tab
>>
>> 2.       Cleared "Use default" checkbox
>>
>> 3.       Added the following path to the Java Virtual machine:  C:\Program Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll
>>
>> 4.       Added the following lines to the end of the java Options text field:
>> -DJAZZ_HOME=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
>> -Djava.awt.headless=true
>> -Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=tr
>> ue -Dcom.ibm.team.repository.tempDir=C:\Program 
>> Files\IBM\JazzTeamServer_601\server\tomcat\temp
>> -Djazz.connector.sslEnabledProtocols=TLSv1.2
>> -Djazz.connector.algorithm=IbmX509
>> -Dlog4j.configuration=file:///C:/PROGRA~1/IBM/JazzTeamServer_601/serve
>> r/conf/startup_log4j.properties
>> -Xgcpolicy:gencon
>> -Xcompressedrefs
>> -Xgc:preferredHeapBase=0x100000000
>> -XX:MaxDirectMemorySize=1G
> 
> That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing application?
> 
>> -Xmx4G
>> -Xms4G
>> -Xmn1g
> 
> What is -Xmn? It's probably not a problem, but I thought I'd point-out something that looks weird.
> 
>> -DORACLE_JDBC_DRIVER_FILE=C:\Program 
>> Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar
>>
>> 5.       Cleared the following fields:
>>
>> *         Initial memory pool
>>
>> *         Maximum memory pool
>>
>> *         Thread stack size
>>
>> 6.       In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the "Mode" setting
>>
>> When I try to start the service from Windows Services, I receive the following error:
>>
>> Services
>> Windows could not start the Apache Tomcat 7.0 tomcat7 on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.
>>
>> When I look at the Windows Event Viewer, there is an error that corresponds to the time I tried to start the service:
>>
>> The Apache Tomcat 7.0 tomcat7 service terminated with the following service-specific error:
>> The system cannot open the file.
>>
>> The tomcat log file:  tomcat7-stderr.2016-01-12.log contains:
>> 2016-01-12 08:35:10 Commons Daemon procrun stderr initialized 
>> JVMJ9VM015W Initialization error for library j9gc27(2): Failed to 
>> instantiate heap; 4G requested
>>
>> I have contacted IBM support but they have not provided me a solution at this point.  I thought I would submit here to see if it could be a Tomcat service issue specific to Windows.  Here is my host information:
>> Windows Server 2012 Standard
>> Processor:  Siz-Core AMD Opteron(tm) Processor 8431 2.41 GHz Installed 
>> Memory (RAM):  10.0 GB System Type:  64-bit Operating System, 
>> x64-based processor
>>
>> I also submitted a question to an IBM Jazz user forum and was told that the Windows Event viewer is indicating that the JVM cannot be started because it cannot find a file that is needed.  The user suggested that since my Tomcat and jvm are installed in "C:\Program Files" that perhaps it is a path issue.  I have checked all paths and have even changed all references to "PROGRA~1".  When I installed the service, I ran the install from a Windows Command Prompt that I opened using "Run as Administrator".
>>
>> Since Tomcat will start fine from the command line batch files, this is perplexing.  Has anyone ever run into this?
> 
> Is it possible that you have the 32-bit service runner? That would cause the JVM to run in 32-bit mode when you launch as a service. Selecting the JVM DLL directly should definitely select the right JVM (and
> architecture!) but I'm not an expert on Windows and Windows Services.
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org