Nginx + Tomcat + Railo: Error to start

Hello,
Today I run updates in Ubuntu 12.04. I have done a reboot of the server.
But tomcat can no longer to boot.

These are the errors:

/opt/railo/railo_ctl restart

  • Shutting down Railo: Jul 18, 2015 4:16:05 PM
    org.apache.catalina.startup.Catalina stopServer
    SEVERE: Could not contact localhost:8005. Tomcat may not be running.
    Jul 18, 2015 4:16:05 PM 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(AbstractPlainSocketImpl.java:339)
    at
    java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at
    java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at java.net.Socket.(Socket.java:425)
    at java.net.Socket.(Socket.java:208)
    at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:498)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:371)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:458)

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: . . . [DONE]--------------------------------------------------------
    It may take a few moments for Railo to start processing
    CFML templates. This is normal.

netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
8798/nginx
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN
3770/php-fpm.conf)
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
4401/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
8798/nginx
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
3763/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
3601/sshd
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
3763/named
tcp6 0 0 ::1:53 :::* LISTEN
3763/named
tcp6 0 0 :::4949 :::* LISTEN
3715/perl
tcp6 0 0 :::22 :::* LISTEN
3601/sshd
tcp6 0 0 ::1:953 :::* LISTEN
3763/named
udp 0 0 127.0.0.1:53 0.0.0.0:*
3763/named
udp6 0 0 ::1:53 :::*
3763/named
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name
Path
unix 2 [ ACC ] STREAM LISTENING 25 1/init
@/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 7233 4761/perl
/var/run/munin/fastcgi-graph.sock
unix 2 [ ACC ] SEQPACKET LISTENING 3150 2126/udevd
/run/udev/control
unix 2 [ ACC ] STREAM LISTENING 8319 4764/perl
/var/run/munin/fastcgi-html.sock
unix 2 [ ACC ] STREAM LISTENING 3987 3608/dbus-daemon
/var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 6324 4851/python
/var/run/fail2ban/fail2ban.sock
unix 2 [ ACC ] STREAM LISTENING 5586 3663/acpid
/var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 4597 4401/mysqld
/var/run/mysqld/mysqld.sock

catalina.out

Jul 18, 2015 3:33:18 PM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable
to start.
org.apache.catalina.LifecycleException: Failed to start component
[StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start
component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start
component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed
during start
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 11 more

Jul 18, 2015 3:33:18 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler [“http-bio-8888”]
Jul 18, 2015 3:33:18 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler [“ajp-bio-8009”]
Jul 18, 2015 3:33:18 PM org.apache.catalina.core.StandardService
stopInternal
INFO: Stopping service Catalina
Jul 18, 2015 3:33:19 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application appears to have started a thread named
[Abandoned connection cleanup thread] but has failed to stop it. This is
very likely to create a memory leak.
Jul 18, 2015 3:33:19 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application appears to have started a thread named
[Thread-7] but has failed to stop it. This is very likely to create a
memory leak.
Jul 18, 2015 3:33:19 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application appears to have started a thread named
[Thread-8] but has failed to stop it. This is very likely to create a
memory leak.
Jul 18, 2015 3:33:19 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application appears to have started a thread named
[Thread-9] but has failed to stop it. This is very likely to create a
memory leak.
Jul 18, 2015 3:33:19 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler [“http-bio-8888”]
Jul 18, 2015 3:33:19 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler [“ajp-bio-8009”]

Hi Ivan,

You could use mod_cfml with nginx and never have to edit your sever.xml
file or restart tomcat again.

All that is needed on the nginx side is:
proxy_set_header X-Tomcat-DocRoot $document_root;On Saturday, July 18, 2015 at 5:32:16 PM UTC+2, Ivan wrote:

Hi Andrew,

OMG… Some days ago, I added a new host in server.xml but forgot to
create the directory of the new site on the server … On the first restart
of tomcat froze everything … I lost the whole day to understand it …
-_-

I have not seen documentation on the mod_cfml site or on GitHub for using it with Nginx. Are there docs for using mod_cml with Nginx?> On Jul 19, 2015, at 11:13 AM, Jonathan van Zuijlekom <@Jonathan_van_Zuijlek> wrote:

You could use mod_cfml with nginx and never have to edit your sever.xml file or restart tomcat again.

All that is needed on the nginx side is:
proxy_set_header X-Tomcat-DocRoot $document_root;

On Saturday, July 18, 2015 at 5:32:16 PM UTC+2, Ivan wrote:
Hi Andrew,

OMG… Some days ago, I added a new host in server.xml but forgot to create the directory of the new site on the server … On the first restart of tomcat froze everything … I lost the whole day to understand it … -_-


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

Nothing official. Anyone want to contribute to the project and create some docs on the subject? Please email me off list.

It is also very important to note the new security setting in the mod_cfml 1.1 valve, the ‘Shared Key’:
http://www.modcfml.org/index.cfm/documentation/modcfml-so-apache-module/config-options/

You can create the header manually by adding a header called: “X-ModCFML-SharedKey” to the request, similar to how you are manually creating the X-Tomcat-DocRoot header.

-Jordan----- Original Message -----
From: “Robert Munn” <@Robert_Munn>
To: lucee@googlegroups.com
Sent: Sunday, July 19, 2015 12:59:51 PM
Subject: Re: [Lucee] Nginx + Tomcat + Railo: Error to start

I have not seen documentation on the mod_cfml site or on GitHub for using it with Nginx. Are there docs for using mod_cml with Nginx?

On Jul 19, 2015, at 11:13 AM, Jonathan van Zuijlekom <@Jonathan_van_Zuijlek> wrote:

You could use mod_cfml with nginx and never have to edit your sever.xml file or restart tomcat again.

All that is needed on the nginx side is:
proxy_set_header X-Tomcat-DocRoot $document_root;

On Saturday, July 18, 2015 at 5:32:16 PM UTC+2, Ivan wrote:
Hi Andrew,

OMG… Some days ago, I added a new host in server.xml but forgot to create the directory of the new site on the server … On the first restart of tomcat froze everything … I lost the whole day to understand it … -_-


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/8A4F769F-EEFA-430A-A8D8-16C772A01318%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

So on the Nginx side, you need:

#add header for mod_cfml to do its work
proxy_set_header X-Tomcat-DocRoot $document_root;

Is there anything required on the Tomcat side? I see this host entry in server.xml:

  <Host name="lucee" appBase="webapps"
        unpackWARs="true" autoDeploy="true">

    <!-- SingleSignOn valve, share authentication between web applications
         Documentation at: /docs/config/valve.html -->
    <!--
    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
    -->

    <!-- Access log processes all example.
         Documentation at: /docs/config/valve.html
         Note: The pattern used is equivalent to using pattern="common" -->
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
           prefix="localhost_access_log." suffix=".txt"
           pattern="%h %l %u %t &quot;%r&quot; %s %b" />

    <!-- visit modcfml.org for details on mod_cfml configuration options -->
    <Valve className="mod_cfml.core"
            loggingEnabled="false"
            waitForContext="20"
            maxContexts="200"
            timeBetweenContexts="500"
            />

  </Host>

Seems like this valve needs to be added to an initial host in server.xml. Is that the case?

Just trying to clarify so any Nginx users who would like mod_cfml have some basic docs.> On Jul 21, 2015, at 11:28 AM, Jonathan van Zuijlekom <@Jonathan_van_Zuijlek> wrote:

Example config/installer: https://groups.google.com/d/msg/lucee/xGkSHBeS8TA/awGoZqZYY8sJ

On Sunday, July 19, 2015 at 9:59:55 PM UTC+2, Robert Munn wrote:
I have not seen documentation on the mod_cfml site or on GitHub for using it with Nginx. Are there docs for using mod_cml with Nginx?

On Jul 19, 2015, at 11:13 AM, Jonathan van Zuijlekom <jzui...@gmail.com <javascript:>> wrote:

You could use mod_cfml with nginx and never have to edit your sever.xml file or restart tomcat again.

All that is needed on the nginx side is:
proxy_set_header X-Tomcat-DocRoot $document_root;

On Saturday, July 18, 2015 at 5:32:16 PM UTC+2, Ivan wrote:
Hi Andrew,

OMG… Some days ago, I added a new host in server.xml but forgot to create the directory of the new site on the server … On the first restart of tomcat froze everything … I lost the whole day to understand it … -_-


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/30ed20c3-d8e1-4718-918b-2395d4559b15%40googlegroups.com https://groups.google.com/d/msgid/lucee/30ed20c3-d8e1-4718-918b-2395d4559b15%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

Example config/installer:
https://groups.google.com/d/msg/lucee/xGkSHBeS8TA/awGoZqZYY8sJOn Sunday, July 19, 2015 at 9:59:55 PM UTC+2, Robert Munn wrote:

I have not seen documentation on the mod_cfml site or on GitHub for using
it with Nginx. Are there docs for using mod_cml with Nginx?

On Jul 19, 2015, at 11:13 AM, Jonathan van Zuijlekom <jzui...@gmail.com <javascript:>> wrote:

You could use mod_cfml with nginx and never have to edit your sever.xml
file or restart tomcat again.

All that is needed on the nginx side is:
proxy_set_header X-Tomcat-DocRoot $document_root;

On Saturday, July 18, 2015 at 5:32:16 PM UTC+2, Ivan wrote:

Hi Andrew,

OMG… Some days ago, I added a new host in server.xml but forgot to
create the directory of the new site on the server … On the first restart
of tomcat froze everything … I lost the whole day to understand it …
-_-


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com
https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Yes, we just have one in the server.xml with the mod_cfml valve. I
just put the modcfml***.jar in the lucee directory.On Tuesday, July 21, 2015 at 11:14:43 PM UTC+2, Robert Munn wrote:

So on the Nginx side, you need:

#add header for mod_cfml to do its work
proxy_set_header X-Tomcat-DocRoot $document_root;

Is there anything required on the Tomcat side? I see this host entry in
server.xml:

  <Host name="lucee" appBase="webapps"
        unpackWARs="true" autoDeploy="true">

    <!-- SingleSignOn valve, share authentication between web 

applications
Documentation at: /docs/config/valve.html -->

    <!-- Access log processes all example.
         Documentation at: /docs/config/valve.html
         Note: The pattern used is equivalent to using 

pattern=“common” -->

    <!-- visit modcfml.org for details on mod_cfml configuration 

options -->

  </Host>

Seems like this valve needs to be added to an initial host in server.xml.
Is that the case?

Just trying to clarify so any Nginx users who would like mod_cfml have
some basic docs.

On Jul 21, 2015, at 11:28 AM, Jonathan van Zuijlekom <jzui...@gmail.com <javascript:>> wrote:

Example config/installer:
https://groups.google.com/d/msg/lucee/xGkSHBeS8TA/awGoZqZYY8sJ

On Sunday, July 19, 2015 at 9:59:55 PM UTC+2, Robert Munn wrote:

I have not seen documentation on the mod_cfml site or on GitHub for using
it with Nginx. Are there docs for using mod_cml with Nginx?

On Jul 19, 2015, at 11:13 AM, Jonathan van Zuijlekom jzui...@gmail.com wrote:

You could use mod_cfml with nginx and never have to edit your sever.xml
file or restart tomcat again.

All that is needed on the nginx side is:
proxy_set_header X-Tomcat-DocRoot $document_root;

On Saturday, July 18, 2015 at 5:32:16 PM UTC+2, Ivan wrote:

Hi Andrew,

OMG… Some days ago, I added a new host in server.xml but forgot to
create the directory of the new site on the server … On the first restart
of tomcat froze everything … I lost the whole day to understand it …
-_-


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com
https://groups.google.com/d/msgid/lucee/df77d774-9a3b-4b77-a23a-b6dd1bf08659%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/30ed20c3-d8e1-4718-918b-2395d4559b15%40googlegroups.com
https://groups.google.com/d/msgid/lucee/30ed20c3-d8e1-4718-918b-2395d4559b15%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.