Tomcat as a service

Is it possible to run Tomcat as a service under Win2K. If so, how do I do it? We need it to run all the time, even when I log off the machine.

Hello,
I had the same problem and I found that the tomcat.exe can be used to install a service.
tomcat -install Tomcat %java_home%\jre\bin\server\jvm.dll "-Djava.endorsed.dirs=%catalina_home%\bin;%catalina_home%\common\endorsed" "-Djava.class.path=%java_home%\lib\tools.jar;%catalina_home%\bin\bootstrap.jar" "-Dcatalina.base=%catalina_home%" "-Dcatalina.home=%catalina_home%" "-Djava.io.tmpdir=%catalina_home%\temp" -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop
Succes

Similar Messages

  • CiscoWorks Tomcat Servlet Engine service does not start

    Hello!
    CiscoWorks  Tomcat Servlet Engine service does not start.
    Events in the Windows Event Viewer:
    The CiscoWorks Tomcat Servlet Engine service terminated unexpectedly. It has done this 1 time(s).
    output pdshow and file stderr.log,  hs_err_pid2128.log attached.
    Do  you have an idea how to resolve this?
    Thanks!

    The only things which I see are wrong are the start types for the IPM NG database engine and HUM database engine services.  They must be set to Manual, not Automatic.  However, that would not account for the Tomcat crash.  The crash points to an error in the code which processes regdaemon.xml, but I see no reason why that should be failing.  As I said before, I think it would be best to open a Service Request.  Remote access would be helpful to dig into this problem in more detail.
    Please support CSC Helps Haiti
    https://supportforums.cisco.com/docs/DOC-8895
    https://supportforums.cisco.com

  • Running Tomcat as a service

    I have two questions about running Tomcat as a service.
    First, when I try to install and start tomcat 3.3.2 with the java sdk 1.4.0 using jk_nt_service, the service won't start. When I execute the following command, jk_nt_service -S Tomcat-3.3-2-Dev, I get a response of Tomcat-3.3.2-Dev failed to start. When I execute the following command, net start Tomcat-3.3.2-Dev, I get a system error 1067 response. Does anyone know how to get around this error?
    Second, if we try to run Tomcat 4.1.27 as a service, we get very slow response compared to running startup.bat in the bin directory. Does anyone know why this is and what could be done to improve the performance?
    Jim Field

    I don't know the answer to the first question.
    Regarding the second one: when you say "slow response", do you mean for every request you send to the service compared to sending the same request to Tomcat started with startup.bat, or are you referring to just starting the service?
    Have you measured the response time for a number of requests to both the service and script-started Tomcat, or is this a subjective judgement? MOD

  • I get a error when starting Apache Tomcat 6.0 service

    Hi Friends,
    I get a error when starting Apache Tomcat 6.0 service. Do you help me?
    Kind regards.
    Fatih Temiz
    First Step:
    Second Step:
    Thanks for helps...

    It seems like the JVM is pointing to incorrect .dll file.
    Goto Apache bin directory, and from there open Apache[version]W.exe
    Click the "Java" tab and ensure the first textbox "Java Virtual Machine" is pointed to the correct jvm.dll
    If it was pointed to the JDK then it is wrong. Repoint it to the jre jvm located at \jre6\bin\client\jvm.dll
    Let me know if it resolves the issue.

  • Hi experts - cannot run HTTPS on tomcat as a service application

    I have configured HTTPS on my tomcat 4.1 web server.
    Now, when I run Tomcat as a console application it works fine and there is no problem. But When I run Tomcat as a service application, the server starts as a service properly but when I try to access the pages it says that "The Page Cannot Be Displayed"
    The configuration for HTTPS in conf/server.xml file is like this:
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                   port="443" minProcessors="5" maxProcessors="75"
                   enableLookups="true"
                acceptCount="100" debug="0" scheme="https" secure="true"
                   useURIValidationHack="false" disableUploadTimeout="true" >
          <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
                   clientAuth="false" protocol="TLS" keystorefile="C:\Documents and Settings\deepak\"/>
        </Connector>M using tomcat 4.1
    Please experts help me with this.

    And what does your catalina.out logfile say?

  • Tomcat 4 as service plus invoke servlet on startup

    Hi all. My two questions are as follows, any feedback is much appreciated.
    1st)
    I wish to run tomcat as a service where it will start automatically on startup plus you can restart it from the win 2000 service console. I have followed the advice on the following link http://www.prabhums.org/weblogs/?postid=237 which places an entry into the service console but doesn't start or stop tomcat as required.
    2nd)
    On tomcat startup I wish to invoke a servlet when the service starts. Where would I config this and any parameters etc? web.xml?
    Thanks in advance
    Tas

    It's very simple to have a servlet startup. Just use the load-on-startup element in your wbe.xml when you define the servlet.
    <servlet>
       <servlet-name>MyServlet</servlet-name>
       <servlet-class>com.kcole.mypackage.MyServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
    </servlet>Use a different number. I believe the numbers indicate order of startup.
    We use them to mainly to start processes/threads that run at an interval, like a TimerTask for example. We use them for things like setting up our custom connection pool and setting up jobs such as checking directories for files to import, etc.
    As to what the request and response objects contain, I don't think there are any. The servlet spec doesn't say regarding this when using the load-on-startup. It runs the init() method.
    Karl

  • Tomcat Denial of Service Attack

    The signature id 5648 (Tomcat Denial of Service Attack) seams to be prone to false positives....
    We have seen in a number of incidents, that when the destination of this attack uses the ephemeral port of 8007 with an established connection on TCP port 80, the signature is often triggered. The signature looks for the content \xfe\x0f
    Is anyone else seeing this problem?

    Can you please send me some more information and we can look into refining this signature.
    An IPLog dmp file or a traffic capture would help me dig into the cause of the false positive.
    -jonathan

  • Tomcat as a Service with -Xms512M -Xmx1024M

    Hello all,
    In order to run successfully my application with Tomcat 5.0.20 on Windows XP I had to change the memory settings.
    So in the System environment variable I've added:
    JAVA_OPTS = -Xms512M -Xmx1024M
    CATALINE_OPTS = -Xms512M -Xmx1024M
    and if I launch Tomcat with the startup.bat, my application runs fine.
    Now I am trying to run Tomcat as a Windows Service (using service.bat install) but this time Tomcat runs out of memory and generates exceptions despite the fact I've changed the following line in service.bat from:
    "%EXECUTABLE%" //IS//%SERVICE_NAME% --Jvm auto etc...
    to
    "%EXECUTABLE%" //IS//%SERVICE_NAME% JvmMs 512M JvmMx 1024M --Jvm auto etc...
    What am I doing wrong?
    Many thanks for your suggestions.
    regards
    denis

    Hello,
    I had the same problem and I found that the tomcat.exe can be used to install a service.
    tomcat -install Tomcat %java_home%\jre\bin\server\jvm.dll "-Djava.endorsed.dirs=%catalina_home%\bin;%catalina_home%\common\endorsed" "-Djava.class.path=%java_home%\lib\tools.jar;%catalina_home%\bin\bootstrap.jar" "-Dcatalina.base=%catalina_home%" "-Dcatalina.home=%catalina_home%" "-Djava.io.tmpdir=%catalina_home%\temp" -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop
    Succes

  • META-INF/context.xml, Tomcat, META-INF/services

    I presently have a Netbeans project laid out like this:
    src
    src\java
    web
    web\META-INF
    web\META-INF\context.xml
    etc. Tomcat finds that META-INF/context.xml OK and does what I expect with it.
    I have recently added something that is loaded by java.util.ServiceLoader, which requires a META-INF/services/x.y.z file containing the name(s) of the classes that implement x.y.z. After deployment, my webapp's ServiceLoader doesn't find it, because in the target it isn't in WEB-INF/classes/META-INF/services/x.y.z. If I put it into src/java/META-INF/services/x.y.z it works correctly, as it then ends up in the right place. However I'm now concerned that either Tomcat won't find the context.xml if I put it in the same place under src, because it would then not be in /META-INF/context.xml but rather /WEB-INF/classes/META-INF/context.xml, which in turn would mean that I would then need two META-INF directories. I'm about to test that conjecture about Tomcat finding it under WEB-INF/classes/META-INF, but I'm wondering whether I'm doing something basically wrong in the first place here.

    You seem to think that you can have only one META-INF directory; this is simply not true. Keep both your META-INF directories and put the files where they are expected. Yay for using overlapping names :/

  • Tomcat as NT Service not writing to error log

    I created an NT service for Tomcat and want to write output to stdout.log (System.out) and stderr.log (System.err), but instead, it's writing both System.out AND System.err to stdout.log. Strangely enough, stderr.log does get created, but is never written to.
    Here is the command I used to create the service:
    %CATALINA_HOME%\bin\tomcat -install "Tomcat_PROD-staffsite" %JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatalina.home=%CATALINA_HOME% %CATALINA_OPTS% -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %CATALINA_HOME%\logs\stdout.log -err %CATALINA_HOME%\logs\stderr.log
    It used to work, but then I upgraded the JVM on the server and had to then uninstall and reinstall the service. I wasn't around for the original service installation, so I don't know if the command I used above was what was used before (since documentation doesn't seem to exist around here...). Any ideas?

    The Job Activity Monitor reports it failed but nothing goes in the Error Log.
    The Agent writes error to it's own log file, called SQLAGENT.OUT, it's also located in LOG subfolder and you also can look it up in SSMS from node "SQL Server Agent"
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Tomcat: prefix in services-config.xml must be unique?

    Hi all, I've been trying to get my flex application communicating with Tomcat and now have it working
    Just trying to confirm something that took me many hours to get right and may help others along the way..
    Originally I modified the BlazeDS webapp by updating the remoting xml and putting in my own classes and it worked without any problems
    I then removed the BlazeDS webapp directory out the tree and created a new one carefully checking each step.. but there was nothing written to catalina log file at any time when running the app or any sign of communication even in debug mode
    I then moved the sample BlazeDS webapp back and when starting Tomcat it complained of duplicate ID's (here is the message: Exception: flex.messaging.config.ConfigurationException: Can not add destination with id 'insert your remoting destination id' to service with id 'proxy-service' because another service with id 'remoting-service' already has a destination with the same id)
    Eventually I noticed in services-config.xml logging section for my new webapp that the <prefix> was still set to BlazeDS - changed this to the new webapp directory name and not only did the exceptions disappear but everything now worked
    So I'm thinking that the prefix is much more important than just a logging descriptor as the XML tag suggests
    Can anyone confirm this behaviour or shed some light?
    PS I should make clear the above problems were not when running the turnkey but on a fresh install of tomcat 6.0.29 on Centos linux using apache proxypass/reverseproxypass to redirect port 80 to 8080
    PS2 - I realise this is not a pure Flex question but it's related due to Adobe crafting a turnkey Flex/Tomcat install with Blaze and it's in the flex configuration files)
    I hope I've covered all bases in the question and look forward to knowing more... CHEERS!

    Hi all, I've been trying to get my flex application communicating with Tomcat and now have it working
    Just trying to confirm something that took me many hours to get right and may help others along the way..
    Originally I modified the BlazeDS webapp by updating the remoting xml and putting in my own classes and it worked without any problems
    I then removed the BlazeDS webapp directory out the tree and created a new one carefully checking each step.. but there was nothing written to catalina log file at any time when running the app or any sign of communication even in debug mode
    I then moved the sample BlazeDS webapp back and when starting Tomcat it complained of duplicate ID's (here is the message: Exception: flex.messaging.config.ConfigurationException: Can not add destination with id 'insert your remoting destination id' to service with id 'proxy-service' because another service with id 'remoting-service' already has a destination with the same id)
    Eventually I noticed in services-config.xml logging section for my new webapp that the <prefix> was still set to BlazeDS - changed this to the new webapp directory name and not only did the exceptions disappear but everything now worked
    So I'm thinking that the prefix is much more important than just a logging descriptor as the XML tag suggests
    Can anyone confirm this behaviour or shed some light?
    PS I should make clear the above problems were not when running the turnkey but on a fresh install of tomcat 6.0.29 on Centos linux using apache proxypass/reverseproxypass to redirect port 80 to 8080
    PS2 - I realise this is not a pure Flex question but it's related due to Adobe crafting a turnkey Flex/Tomcat install with Blaze and it's in the flex configuration files)
    I hope I've covered all bases in the question and look forward to knowing more... CHEERS!

  • Tomcat as windows service

    Hi everybody,
    Im trying to make Tomcat (5.0.25) run as a windows service. I tried using service.bat, which installs a windows service of type manual. As this is for client machines, setting the service type to automatic is not an option. So what I am looking for is either a way to use service.bat to create an automatic windows service, or a way to change a services type from manual to autmatic.

    Ignore my last post about the options. As of August 16, 2004, the page is out of date and the options are incorrect for the verison shipped with Tomcat 5.0.27.
    However, to find out how to use tomcat5.exe, look at the "service.bat" file in the bin directory. This wraps a call to it with the most common options you will need. I had some troubling customizing the script (using Tomcat 5.0.27) for my own needs, but eventually figured it out (with much help from posts on the Tomcat newsgroups.)
    The changes I made were:
    1) To allow allow compilation of JSPs, changed PR_CLASSPATH to include J2SDK tools.jar:
    Before
    set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar
    After
    set PR_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar2a) To use a specific JVM location, changed jvm option from 'auto'
    2b) To make service automatic instead of manual, added Startup option
    2c) To use customized server.xml file and pass multiple parameters to StartClass, changed StartParams by separating additional values by semi-colons:
    Before
    "%EXECUTABLE%" //IS//%SERVICE_NAME% --Jvm auto
    --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap
    --StartParams start --StopParams stop
    After
    "%EXECUTABLE%" //IS//%SERVICE_NAME% --Jvm "%JAVA_HOME%\jre\bin\server\jvm.dll"
    --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap
    --StartParams "-config;%CUSTOM_SERVERXML_FILE%;-nonaming;start" --StopParams stop
    --Startup Automatic3) To specify min and max memory limits, added extra jvm startup parameters
    Before
    "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions
    "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed"
    --StartMode jvm --StopMode jvm
    After
    "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions
    "-Xms128M;-Xmx256M;-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed"
    --StartMode jvm --StopMode jvm

  • Tomcat startup VS service

    Hi
    I am using Struts1.2.2 and tomcat5.0.0.28 and windows xp.
    I tried to open notepad,when i click jsp link using following code
    Runtime.getRuntime().exec(�notepad.exe�);
    Its work for me, If start tomcat thru %TOMCAT-HOME%\bin\startup command.
    But its not working for me if i Start Tomcat as service.
    Plaese help me in this regrads.
    Thanks in advance.
    Isma

    Just to note that this will open Notepad on the server where the java code is running.
    However it won't open notepad on the client machine.
    Try clicking the link from a remote machine and see what happens ;-)
    Cheers,
    evnafets

  • Tomcat 5.5 service won't start with jmxremote.authenticate=true

    The Tomcat5 service (5.5.17) starts fine on XP if I set com.sun.management.jmxremote.authenticate=false in the Tomcat5W.exe (gui for setting properties of the service). However, when I set authenticate=true (or omit it), I get the error:
    "Could not start the Apache Tomcat Tomcat5 service on Local Computer. Error 1067: The process terminated unexpectedly." I have created a jmx.remote.password file from the jmx.remote.password.template. I left it in the default location in %JRE_HOME%\lib\management. I also set the file properties so that I am the only user on the security tab, and I have full control. Any ideas?

    Does using Tomcate5W.exe require uninstalling and then re-installing the service to take affect?
    I had a similar issue recently, but had the requirement that I could not uninstall and re-install the service. So I had to use the Tomcat5 service updater via command line. The main problem I ran into was getting the security set properly on the password file. Also, I did not use the default location for the files, but put them in the tomcat directory. Here's a summary of what I did
    1.     Stop the service.
    2.     run the command �service.bat remove� from the tomcat bin directory.
    3.     add the following java options to service.bat
    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=1092
    -Dcom.sun.management.jmxremote.ssl=false
    -Dcom.sun.management.jmxremote.authenticate=true
    -Dcom.sun.management.jmxremote.password.file=c:\tomcat\Tomcat 5.5\conf\jmxremote.password
    -Dcom.sun.management.jmxremote.access.file=c:\tomcat\Tomcat 5.5\conf\jmxremote.access
    4.     Fllow the instructions to secure the password file: http://java.sun.com/j2se/1.5.0/docs/guide/management/security-windows.html
    5.     start the service
    I was not able to remove the service, so I actually did this:
    The following will update the windows service named Tomcat5 and add the jvm options to enable jmx remote monitoring with password authentication. Replace Tomcat5 with your service name, and also, you can change the listen port to your desired port.
    C:\>tomcat5 //US//Tomcat5 --JvmOptions="-Dcom.sun.management.jmxremote;-Dcom.sun.management.jmxremote.port=1092;-Dcom.sun.management.jmxremote.ssl=false;-Dcom.sun.management.jmxremote.authenticate=true;-Dcom.sun.management.jmxremote.password.file=c:\tomcat\Tomcat 5.5\conf\jmxremote.password;-Dcom.sun.management.jmxremote.access.file=c:\tomcat\Tomcat 5.5\conf\jmxremote.access"
    Lastly, I followed exactly these steps to secure the password file (which it seems you did).
    http://java.sun.com/j2se/1.5.0/docs/guide/management/security-windows.html
    - Alper

  • How to use Tomcat for naming services

    Hi,
    I want to use Tomcat server for a naming service,but how??.
    What i want to do is
    It will register 2 services to a the naming server.
    Later lookup for it from another code.
    I want to know how i can register the same using Tomcat...
    Thanks in Advance
    Mandrake

    http://tomcat.apache.org/tomcat-5.0-doc/jndi-resources-howto.html

Maybe you are looking for

  • Workspace Manager & Slowly Changin Dimension in Data Warehouse

    Has anyone used Workspace Manager in a Slowly Changing Dimension to keep history in a Data Warehouse. What issues have you come across? What are advantages? What are disadvantages? Thanks Uli

  • Do I need to pay for icloud?

    I had itunes match, but I cancelled the subscription so it will run out this month. There is a message on my account that says after that date my music will no longer be available to access from icloud.  I thought icloud was free.  Is there something

  • Opening CS6 documents in CS4

    Hello, When I create a psd in CS6, and then open it in CS4, I get this error: This document contains unknown data which will be discarded to keep layers editable. To preserve the original appearance instead, choose Flatten to load composite data as a

  • Query on module pool field -f4 help

    Hi all, My query is as follows : There are 2 fields in module pool screen : sector lfd Now there is a table called sector with 2 fields sector and lfd. now when f4 is pressed on the above sector field, this sector table has to be called so that I can

  • Approval query support

    hi all, i am using sap 2007 B and i want set approval through qury support. so my condition is  >in A/R invoice if i add  that document and generate one print that time in table oinv (printed  status =yes)if i give the second print of that document t