Domanda

I was recently hired at a University that is using Tomcat and Railo.

For the most part Railo runs fine, however occasionally railo freezes and stops rendering any CFM or CFC pages and just gives a 502 Error. Usually this can be resolved with service railo_ctl restart, however lately more errors have come up:

 * Shutting down Railo: Sep 18, 2013 11:06:55 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.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:457)
    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:371)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:452)

Tomcat did not stop in time. PID file was not removed.
. . . . . . . . . . . . . . . . . . . . [FAIL]
 * The Tomcat/Railo process is not responding. Forcing shutdown...
 * Forcing Railo Shutdown: [DONE]
 * Starting Railo:  * Allow Tomcat to open more than 1024 files: . . . [DONE]
--------------------------------------------------------
It may take a few moments for Railo to start processing
CFML templates. This is normal.
--------------------------------------------------------

And:

* Shutting down Railo: Tomcat did not stop in time. PID file was not removed.
. . . . . . . . . . . . . . . [DONE]
 * Starting Railo:  * Allow Tomcat to open more than 1024 files: . . . [DONE]
--------------------------------------------------------
It may take a few moments for Railo to start processing
CFML templates. This is normal.
--------------------------------------------------------
È stato utile?

Soluzione

This error means that the Tomcat process itself has crashed. The script attempts to connect to the tomcat shutdown port (usually 8005) - but it can't since tomcat has crashed. Hence, the "connection refused" error.

For the PID file, the railo_ctl script is just checking for a process id that's located in the PID file. Since that process has died, the PID file is no longer relevant and the script takes it's default action to deal with it.

What you specifically need to do is figure out why Tomcat is crashing. Check the catalina.out log file - as it would be your best source of clues to why Tomcat is crashing.

Hope this helps!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top