Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6097533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:03:18+00:00 2026-05-23T13:03:18+00:00

I have tomcat 6.0.32 installed and running my web application on it. Usual stop/start

  • 0

I have tomcat 6.0.32 installed and running my web application on it. Usual stop/start works fine, when the tomcat is properly started or stopped. But when I try to stop the tomcat when it is in the middle of a startup, the stop fails.

$service tomcat6 stop

Stopping tomcat6:                                          [FAILED]

The error in the log is:

SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:422)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)

I have tried using force as well, but it doesn’t work. Does anyone know how can we fix this?

Note: I was able to stop tomcat6 (6.0.24) in the middle of the startup, but it is not working in 6.0.32 version. Any help/info would be a great help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:03:19+00:00Added an answer on May 23, 2026 at 1:03 pm

    This is to help anyone who encounters the same problem. Please bear in mind that I have no explanation of how the change works, but it solved my problem so posting it for others.

    There is a function called “parseOption” in /etc/init.d/tomcat6, which parses the configurations specified in the config file. This function is being called in the other functions [stop/start], and does work fine in parsing the configs as shown in the output above.

    Inside the stop function, it is originally called as follows:

       if [ -f "/var/lock/subsys/${NAME}" ]; then
          parseOptions
          $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1
    

    I changed the above to:

     if [ -f "/var/lock/subsys/${NAME}" ]; then
        $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1
        parseOptions
    

    and it worked. I was able to stop tomcat in the middle of a start up and otherwise.
    The rest of the stop function is executed properly as well [removing the pid file, killing the process…].
    How different the implementation is when the tomcat is in started mode or starting up, is unclear, since regular stop works fine without any changes, in the started mode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running Eclipse Galileo with Tomcat 6.0.18. Currently, I have a working application
We have recently migrated a large, high demand web application to Tomcat 5.5 from
I have devoloped a Struts 2 web application. For running it on a server,
I have a Tomcat and PostgreSQL installed on a server. I'm having a connection
I have Tomcat 6.0.24 64 bit installed on two Windows Server 2008 boxes as
I have installed apache-tomcat-6.0.35-windows-x86 in my system. How can I configure it and set
I am new to java vaadin framework. I have installed APACHE TOMCAT 6 and
i have two https web applications app1 and app2 installed on two different tomcats
We have Tomcat application server set up at port 8080 and Apache Http Server
I have a tomcat instance setup but the database connection I have configured in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.