CentOS 7 httpd failed to make connection with backend












0














In a CentOS 7 server with apache httpd 2.4 set up as an ssl reverse proxy for tomcat, I am getting an error indicating that httpd is not able to connect with tomcat. How can I resolve this error so that httpd serves up the content generated by tomcat?



The ssl_error_log says:



[Tue Dec 16 20:20:15.007630 2014] [proxy:error] [pid 12784] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[Tue Dec 16 20:20:15.007727 2014] [proxy:error] [pid 12784] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Tue Dec 16 20:20:15.007752 2014] [proxy_http:error] [pid 12784] [client client.ip.address:48100] AH01114: HTTP: failed to make connection to backend: localhost


I have read the catalina.out file, which clearly indicates that tomcat successfully launched the root app after I ran startup.sh. I also read this other posting, which put the blame on SELinux. But I made sure that /etc/sysconfig/selinux has SELINUX=disabled, so it seems my problem is caused by something else.



The reverse proxy was working perfectly earlier today. The only changes made on the server today were to upload new versions of the root war into tomcat a couple of times, and to stop then restart tomcat and httpd each time a new root war was uploaded. This might have involved changing the shutdown port in server.xml from -1 to a valid port number to allow tomcat to shutdown.



You can view the complete ssl.conf by clicking on this link. Please note that the VirtualHost is completely defined in ssl.conf and NOT in httpd.conf. You can also read the complete server.xml by clicking on this link.



EDIT:



Following IanMcGowan's advice gave the following results:



[root@remote.server.ip ~]# telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[root@remote.server.ip ~]# GET / HTTP/1.0
<HTML>
<HEAD>
<TITLE>Directory /</TITLE>
<BASE HREF="file:/">
</HEAD>
<BODY>
<H1>Directory listing of /</H1>
<UL>
<LI><A HREF="./">./</A>
<LI><A HREF="../">../</A>
<LI><A HREF=".autorelabel">.autorelabel</A>
<LI><A HREF=".readahead">.readahead</A>
<LI><A HREF="bin/">bin/</A>
<LI><A HREF="boot/">boot/</A>
<LI><A HREF="db/">db/</A>
<LI><A HREF="dev/">dev/</A>
<LI><A HREF="etc/">etc/</A>
<LI><A HREF="home/">home/</A>
<LI><A HREF="lib/">lib/</A>
<LI><A HREF="lib64/">lib64/</A>
<LI><A HREF="media/">media/</A>
<LI><A HREF="mnt/">mnt/</A>
<LI><A HREF="opt/">opt/</A>
<LI><A HREF="proc/">proc/</A>
<LI><A HREF="root/">root/</A>
<LI><A HREF="run/">run/</A>
<LI><A HREF="sbin/">sbin/</A>
<LI><A HREF="srv/">srv/</A>
<LI><A HREF="sys/">sys/</A>
<LI><A HREF="tmp/">tmp/</A>
<LI><A HREF="usr/">usr/</A>
<LI><A HREF="var/">var/</A>
<LI><A HREF="www/">www/</A>
</UL>
</BODY>
</HTML>


I also opened up 8080 to test if tomcat is running as follows:



When I typed in http : / / mydomain.com and http : / / my.ip.address , nothing was served to the browser. When I type https : / / mydomain.com , I get the same error stating the service is unavailable.



The last two lines of catalina.out have not changed since I restarted the server yesterday, and are as follows:



16-Dec-2014 20:19:35.967 INFO [localhost-startStop-1] org.apache.catalina.start$
16-Dec-2014 20:19:35.970 INFO [main] org.apache.catalina.startup.Catalina.start$ Server startup in 46065 ms


EDIT #2:



To test if tomcat is running, I did the following:



[root@remote.server.ip]# ps aux | grep tomcat
root 6858 0.7 18.5 3826248 1095780 ? Sl Dec12 51:03 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 12524 0.2 20.1 3891788 1187888 ? Sl Dec15 6:20 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 16404 0.2 15.0 3630784 887836 ? Sl Dec16 2:36 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 17987 0.0 0.0 112640 964 pts/0 R+ 14:20 0:00 grep --color=auto tomcat









share|improve this question
















bumped to the homepage by Community 24 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Are you sure tomcat is running? A common problem at startup is that something is already listening on a port it needs (e.g. your 8005 shutdown port). Can you post the complete catalina.out? You do not have to restart tomcat when making changes to the Apache proxy.
    – Ian McGowan
    Dec 17 '14 at 4:11






  • 1




    "telnet localhost 8080" from a shell on the CentOS server to make sure that tomcat is listening. If telnet gives an error, you are not connected, if nothing appears tomcat is up. You can type "GET / HTTP/1.0[enter][enter]" to request the default page.
    – Ian McGowan
    Dec 17 '14 at 4:17










  • @IanMcGowan: +1, but you shouldn't get "nothing" from telnet if Tomcat is up and running on port 8080. You'll get 3 or so lines, something like Trying localhost... then Connected to localhost. then Escape character is ^]. Also, telnet isn't installed by default on CentOS 7, so you may need to say yum install telnet first.
    – Warren Young
    Dec 17 '14 at 6:18












  • @WarrenYoung - you're right! To my shame I was thinking of the windows telnet command. On *nix I tend to use netcat nowadays...
    – Ian McGowan
    Dec 17 '14 at 7:15










  • @CodeMed: Why are you bringing a second computer into the discussion at all? The mantra of troubleshooting is to keep it as simple as possible, and test only one thing at a time. So, do everything here on a single machine. I don't care if you do it all on your development box or all on the production box. telnet localhost 8080 only works within a single machine. That's what localhost means.
    – Warren Young
    Dec 17 '14 at 8:22
















0














In a CentOS 7 server with apache httpd 2.4 set up as an ssl reverse proxy for tomcat, I am getting an error indicating that httpd is not able to connect with tomcat. How can I resolve this error so that httpd serves up the content generated by tomcat?



The ssl_error_log says:



[Tue Dec 16 20:20:15.007630 2014] [proxy:error] [pid 12784] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[Tue Dec 16 20:20:15.007727 2014] [proxy:error] [pid 12784] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Tue Dec 16 20:20:15.007752 2014] [proxy_http:error] [pid 12784] [client client.ip.address:48100] AH01114: HTTP: failed to make connection to backend: localhost


I have read the catalina.out file, which clearly indicates that tomcat successfully launched the root app after I ran startup.sh. I also read this other posting, which put the blame on SELinux. But I made sure that /etc/sysconfig/selinux has SELINUX=disabled, so it seems my problem is caused by something else.



The reverse proxy was working perfectly earlier today. The only changes made on the server today were to upload new versions of the root war into tomcat a couple of times, and to stop then restart tomcat and httpd each time a new root war was uploaded. This might have involved changing the shutdown port in server.xml from -1 to a valid port number to allow tomcat to shutdown.



You can view the complete ssl.conf by clicking on this link. Please note that the VirtualHost is completely defined in ssl.conf and NOT in httpd.conf. You can also read the complete server.xml by clicking on this link.



EDIT:



Following IanMcGowan's advice gave the following results:



[root@remote.server.ip ~]# telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[root@remote.server.ip ~]# GET / HTTP/1.0
<HTML>
<HEAD>
<TITLE>Directory /</TITLE>
<BASE HREF="file:/">
</HEAD>
<BODY>
<H1>Directory listing of /</H1>
<UL>
<LI><A HREF="./">./</A>
<LI><A HREF="../">../</A>
<LI><A HREF=".autorelabel">.autorelabel</A>
<LI><A HREF=".readahead">.readahead</A>
<LI><A HREF="bin/">bin/</A>
<LI><A HREF="boot/">boot/</A>
<LI><A HREF="db/">db/</A>
<LI><A HREF="dev/">dev/</A>
<LI><A HREF="etc/">etc/</A>
<LI><A HREF="home/">home/</A>
<LI><A HREF="lib/">lib/</A>
<LI><A HREF="lib64/">lib64/</A>
<LI><A HREF="media/">media/</A>
<LI><A HREF="mnt/">mnt/</A>
<LI><A HREF="opt/">opt/</A>
<LI><A HREF="proc/">proc/</A>
<LI><A HREF="root/">root/</A>
<LI><A HREF="run/">run/</A>
<LI><A HREF="sbin/">sbin/</A>
<LI><A HREF="srv/">srv/</A>
<LI><A HREF="sys/">sys/</A>
<LI><A HREF="tmp/">tmp/</A>
<LI><A HREF="usr/">usr/</A>
<LI><A HREF="var/">var/</A>
<LI><A HREF="www/">www/</A>
</UL>
</BODY>
</HTML>


I also opened up 8080 to test if tomcat is running as follows:



When I typed in http : / / mydomain.com and http : / / my.ip.address , nothing was served to the browser. When I type https : / / mydomain.com , I get the same error stating the service is unavailable.



The last two lines of catalina.out have not changed since I restarted the server yesterday, and are as follows:



16-Dec-2014 20:19:35.967 INFO [localhost-startStop-1] org.apache.catalina.start$
16-Dec-2014 20:19:35.970 INFO [main] org.apache.catalina.startup.Catalina.start$ Server startup in 46065 ms


EDIT #2:



To test if tomcat is running, I did the following:



[root@remote.server.ip]# ps aux | grep tomcat
root 6858 0.7 18.5 3826248 1095780 ? Sl Dec12 51:03 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 12524 0.2 20.1 3891788 1187888 ? Sl Dec15 6:20 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 16404 0.2 15.0 3630784 887836 ? Sl Dec16 2:36 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 17987 0.0 0.0 112640 964 pts/0 R+ 14:20 0:00 grep --color=auto tomcat









share|improve this question
















bumped to the homepage by Community 24 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Are you sure tomcat is running? A common problem at startup is that something is already listening on a port it needs (e.g. your 8005 shutdown port). Can you post the complete catalina.out? You do not have to restart tomcat when making changes to the Apache proxy.
    – Ian McGowan
    Dec 17 '14 at 4:11






  • 1




    "telnet localhost 8080" from a shell on the CentOS server to make sure that tomcat is listening. If telnet gives an error, you are not connected, if nothing appears tomcat is up. You can type "GET / HTTP/1.0[enter][enter]" to request the default page.
    – Ian McGowan
    Dec 17 '14 at 4:17










  • @IanMcGowan: +1, but you shouldn't get "nothing" from telnet if Tomcat is up and running on port 8080. You'll get 3 or so lines, something like Trying localhost... then Connected to localhost. then Escape character is ^]. Also, telnet isn't installed by default on CentOS 7, so you may need to say yum install telnet first.
    – Warren Young
    Dec 17 '14 at 6:18












  • @WarrenYoung - you're right! To my shame I was thinking of the windows telnet command. On *nix I tend to use netcat nowadays...
    – Ian McGowan
    Dec 17 '14 at 7:15










  • @CodeMed: Why are you bringing a second computer into the discussion at all? The mantra of troubleshooting is to keep it as simple as possible, and test only one thing at a time. So, do everything here on a single machine. I don't care if you do it all on your development box or all on the production box. telnet localhost 8080 only works within a single machine. That's what localhost means.
    – Warren Young
    Dec 17 '14 at 8:22














0












0








0


1





In a CentOS 7 server with apache httpd 2.4 set up as an ssl reverse proxy for tomcat, I am getting an error indicating that httpd is not able to connect with tomcat. How can I resolve this error so that httpd serves up the content generated by tomcat?



The ssl_error_log says:



[Tue Dec 16 20:20:15.007630 2014] [proxy:error] [pid 12784] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[Tue Dec 16 20:20:15.007727 2014] [proxy:error] [pid 12784] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Tue Dec 16 20:20:15.007752 2014] [proxy_http:error] [pid 12784] [client client.ip.address:48100] AH01114: HTTP: failed to make connection to backend: localhost


I have read the catalina.out file, which clearly indicates that tomcat successfully launched the root app after I ran startup.sh. I also read this other posting, which put the blame on SELinux. But I made sure that /etc/sysconfig/selinux has SELINUX=disabled, so it seems my problem is caused by something else.



The reverse proxy was working perfectly earlier today. The only changes made on the server today were to upload new versions of the root war into tomcat a couple of times, and to stop then restart tomcat and httpd each time a new root war was uploaded. This might have involved changing the shutdown port in server.xml from -1 to a valid port number to allow tomcat to shutdown.



You can view the complete ssl.conf by clicking on this link. Please note that the VirtualHost is completely defined in ssl.conf and NOT in httpd.conf. You can also read the complete server.xml by clicking on this link.



EDIT:



Following IanMcGowan's advice gave the following results:



[root@remote.server.ip ~]# telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[root@remote.server.ip ~]# GET / HTTP/1.0
<HTML>
<HEAD>
<TITLE>Directory /</TITLE>
<BASE HREF="file:/">
</HEAD>
<BODY>
<H1>Directory listing of /</H1>
<UL>
<LI><A HREF="./">./</A>
<LI><A HREF="../">../</A>
<LI><A HREF=".autorelabel">.autorelabel</A>
<LI><A HREF=".readahead">.readahead</A>
<LI><A HREF="bin/">bin/</A>
<LI><A HREF="boot/">boot/</A>
<LI><A HREF="db/">db/</A>
<LI><A HREF="dev/">dev/</A>
<LI><A HREF="etc/">etc/</A>
<LI><A HREF="home/">home/</A>
<LI><A HREF="lib/">lib/</A>
<LI><A HREF="lib64/">lib64/</A>
<LI><A HREF="media/">media/</A>
<LI><A HREF="mnt/">mnt/</A>
<LI><A HREF="opt/">opt/</A>
<LI><A HREF="proc/">proc/</A>
<LI><A HREF="root/">root/</A>
<LI><A HREF="run/">run/</A>
<LI><A HREF="sbin/">sbin/</A>
<LI><A HREF="srv/">srv/</A>
<LI><A HREF="sys/">sys/</A>
<LI><A HREF="tmp/">tmp/</A>
<LI><A HREF="usr/">usr/</A>
<LI><A HREF="var/">var/</A>
<LI><A HREF="www/">www/</A>
</UL>
</BODY>
</HTML>


I also opened up 8080 to test if tomcat is running as follows:



When I typed in http : / / mydomain.com and http : / / my.ip.address , nothing was served to the browser. When I type https : / / mydomain.com , I get the same error stating the service is unavailable.



The last two lines of catalina.out have not changed since I restarted the server yesterday, and are as follows:



16-Dec-2014 20:19:35.967 INFO [localhost-startStop-1] org.apache.catalina.start$
16-Dec-2014 20:19:35.970 INFO [main] org.apache.catalina.startup.Catalina.start$ Server startup in 46065 ms


EDIT #2:



To test if tomcat is running, I did the following:



[root@remote.server.ip]# ps aux | grep tomcat
root 6858 0.7 18.5 3826248 1095780 ? Sl Dec12 51:03 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 12524 0.2 20.1 3891788 1187888 ? Sl Dec15 6:20 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 16404 0.2 15.0 3630784 887836 ? Sl Dec16 2:36 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 17987 0.0 0.0 112640 964 pts/0 R+ 14:20 0:00 grep --color=auto tomcat









share|improve this question















In a CentOS 7 server with apache httpd 2.4 set up as an ssl reverse proxy for tomcat, I am getting an error indicating that httpd is not able to connect with tomcat. How can I resolve this error so that httpd serves up the content generated by tomcat?



The ssl_error_log says:



[Tue Dec 16 20:20:15.007630 2014] [proxy:error] [pid 12784] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[Tue Dec 16 20:20:15.007727 2014] [proxy:error] [pid 12784] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Tue Dec 16 20:20:15.007752 2014] [proxy_http:error] [pid 12784] [client client.ip.address:48100] AH01114: HTTP: failed to make connection to backend: localhost


I have read the catalina.out file, which clearly indicates that tomcat successfully launched the root app after I ran startup.sh. I also read this other posting, which put the blame on SELinux. But I made sure that /etc/sysconfig/selinux has SELINUX=disabled, so it seems my problem is caused by something else.



The reverse proxy was working perfectly earlier today. The only changes made on the server today were to upload new versions of the root war into tomcat a couple of times, and to stop then restart tomcat and httpd each time a new root war was uploaded. This might have involved changing the shutdown port in server.xml from -1 to a valid port number to allow tomcat to shutdown.



You can view the complete ssl.conf by clicking on this link. Please note that the VirtualHost is completely defined in ssl.conf and NOT in httpd.conf. You can also read the complete server.xml by clicking on this link.



EDIT:



Following IanMcGowan's advice gave the following results:



[root@remote.server.ip ~]# telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[root@remote.server.ip ~]# GET / HTTP/1.0
<HTML>
<HEAD>
<TITLE>Directory /</TITLE>
<BASE HREF="file:/">
</HEAD>
<BODY>
<H1>Directory listing of /</H1>
<UL>
<LI><A HREF="./">./</A>
<LI><A HREF="../">../</A>
<LI><A HREF=".autorelabel">.autorelabel</A>
<LI><A HREF=".readahead">.readahead</A>
<LI><A HREF="bin/">bin/</A>
<LI><A HREF="boot/">boot/</A>
<LI><A HREF="db/">db/</A>
<LI><A HREF="dev/">dev/</A>
<LI><A HREF="etc/">etc/</A>
<LI><A HREF="home/">home/</A>
<LI><A HREF="lib/">lib/</A>
<LI><A HREF="lib64/">lib64/</A>
<LI><A HREF="media/">media/</A>
<LI><A HREF="mnt/">mnt/</A>
<LI><A HREF="opt/">opt/</A>
<LI><A HREF="proc/">proc/</A>
<LI><A HREF="root/">root/</A>
<LI><A HREF="run/">run/</A>
<LI><A HREF="sbin/">sbin/</A>
<LI><A HREF="srv/">srv/</A>
<LI><A HREF="sys/">sys/</A>
<LI><A HREF="tmp/">tmp/</A>
<LI><A HREF="usr/">usr/</A>
<LI><A HREF="var/">var/</A>
<LI><A HREF="www/">www/</A>
</UL>
</BODY>
</HTML>


I also opened up 8080 to test if tomcat is running as follows:



When I typed in http : / / mydomain.com and http : / / my.ip.address , nothing was served to the browser. When I type https : / / mydomain.com , I get the same error stating the service is unavailable.



The last two lines of catalina.out have not changed since I restarted the server yesterday, and are as follows:



16-Dec-2014 20:19:35.967 INFO [localhost-startStop-1] org.apache.catalina.start$
16-Dec-2014 20:19:35.970 INFO [main] org.apache.catalina.startup.Catalina.start$ Server startup in 46065 ms


EDIT #2:



To test if tomcat is running, I did the following:



[root@remote.server.ip]# ps aux | grep tomcat
root 6858 0.7 18.5 3826248 1095780 ? Sl Dec12 51:03 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 12524 0.2 20.1 3891788 1187888 ? Sl Dec15 6:20 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 16404 0.2 15.0 3630784 887836 ? Sl Dec16 2:36 java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 17987 0.0 0.0 112640 964 pts/0 R+ 14:20 0:00 grep --color=auto tomcat






centos apache-httpd ssl tomcat reverse-proxy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 6 '16 at 16:18









Jeff Schaller

39k1053125




39k1053125










asked Dec 17 '14 at 2:15









CodeMedCodeMed

1,7732471101




1,7732471101





bumped to the homepage by Community 24 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 24 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Are you sure tomcat is running? A common problem at startup is that something is already listening on a port it needs (e.g. your 8005 shutdown port). Can you post the complete catalina.out? You do not have to restart tomcat when making changes to the Apache proxy.
    – Ian McGowan
    Dec 17 '14 at 4:11






  • 1




    "telnet localhost 8080" from a shell on the CentOS server to make sure that tomcat is listening. If telnet gives an error, you are not connected, if nothing appears tomcat is up. You can type "GET / HTTP/1.0[enter][enter]" to request the default page.
    – Ian McGowan
    Dec 17 '14 at 4:17










  • @IanMcGowan: +1, but you shouldn't get "nothing" from telnet if Tomcat is up and running on port 8080. You'll get 3 or so lines, something like Trying localhost... then Connected to localhost. then Escape character is ^]. Also, telnet isn't installed by default on CentOS 7, so you may need to say yum install telnet first.
    – Warren Young
    Dec 17 '14 at 6:18












  • @WarrenYoung - you're right! To my shame I was thinking of the windows telnet command. On *nix I tend to use netcat nowadays...
    – Ian McGowan
    Dec 17 '14 at 7:15










  • @CodeMed: Why are you bringing a second computer into the discussion at all? The mantra of troubleshooting is to keep it as simple as possible, and test only one thing at a time. So, do everything here on a single machine. I don't care if you do it all on your development box or all on the production box. telnet localhost 8080 only works within a single machine. That's what localhost means.
    – Warren Young
    Dec 17 '14 at 8:22


















  • Are you sure tomcat is running? A common problem at startup is that something is already listening on a port it needs (e.g. your 8005 shutdown port). Can you post the complete catalina.out? You do not have to restart tomcat when making changes to the Apache proxy.
    – Ian McGowan
    Dec 17 '14 at 4:11






  • 1




    "telnet localhost 8080" from a shell on the CentOS server to make sure that tomcat is listening. If telnet gives an error, you are not connected, if nothing appears tomcat is up. You can type "GET / HTTP/1.0[enter][enter]" to request the default page.
    – Ian McGowan
    Dec 17 '14 at 4:17










  • @IanMcGowan: +1, but you shouldn't get "nothing" from telnet if Tomcat is up and running on port 8080. You'll get 3 or so lines, something like Trying localhost... then Connected to localhost. then Escape character is ^]. Also, telnet isn't installed by default on CentOS 7, so you may need to say yum install telnet first.
    – Warren Young
    Dec 17 '14 at 6:18












  • @WarrenYoung - you're right! To my shame I was thinking of the windows telnet command. On *nix I tend to use netcat nowadays...
    – Ian McGowan
    Dec 17 '14 at 7:15










  • @CodeMed: Why are you bringing a second computer into the discussion at all? The mantra of troubleshooting is to keep it as simple as possible, and test only one thing at a time. So, do everything here on a single machine. I don't care if you do it all on your development box or all on the production box. telnet localhost 8080 only works within a single machine. That's what localhost means.
    – Warren Young
    Dec 17 '14 at 8:22
















Are you sure tomcat is running? A common problem at startup is that something is already listening on a port it needs (e.g. your 8005 shutdown port). Can you post the complete catalina.out? You do not have to restart tomcat when making changes to the Apache proxy.
– Ian McGowan
Dec 17 '14 at 4:11




Are you sure tomcat is running? A common problem at startup is that something is already listening on a port it needs (e.g. your 8005 shutdown port). Can you post the complete catalina.out? You do not have to restart tomcat when making changes to the Apache proxy.
– Ian McGowan
Dec 17 '14 at 4:11




1




1




"telnet localhost 8080" from a shell on the CentOS server to make sure that tomcat is listening. If telnet gives an error, you are not connected, if nothing appears tomcat is up. You can type "GET / HTTP/1.0[enter][enter]" to request the default page.
– Ian McGowan
Dec 17 '14 at 4:17




"telnet localhost 8080" from a shell on the CentOS server to make sure that tomcat is listening. If telnet gives an error, you are not connected, if nothing appears tomcat is up. You can type "GET / HTTP/1.0[enter][enter]" to request the default page.
– Ian McGowan
Dec 17 '14 at 4:17












@IanMcGowan: +1, but you shouldn't get "nothing" from telnet if Tomcat is up and running on port 8080. You'll get 3 or so lines, something like Trying localhost... then Connected to localhost. then Escape character is ^]. Also, telnet isn't installed by default on CentOS 7, so you may need to say yum install telnet first.
– Warren Young
Dec 17 '14 at 6:18






@IanMcGowan: +1, but you shouldn't get "nothing" from telnet if Tomcat is up and running on port 8080. You'll get 3 or so lines, something like Trying localhost... then Connected to localhost. then Escape character is ^]. Also, telnet isn't installed by default on CentOS 7, so you may need to say yum install telnet first.
– Warren Young
Dec 17 '14 at 6:18














@WarrenYoung - you're right! To my shame I was thinking of the windows telnet command. On *nix I tend to use netcat nowadays...
– Ian McGowan
Dec 17 '14 at 7:15




@WarrenYoung - you're right! To my shame I was thinking of the windows telnet command. On *nix I tend to use netcat nowadays...
– Ian McGowan
Dec 17 '14 at 7:15












@CodeMed: Why are you bringing a second computer into the discussion at all? The mantra of troubleshooting is to keep it as simple as possible, and test only one thing at a time. So, do everything here on a single machine. I don't care if you do it all on your development box or all on the production box. telnet localhost 8080 only works within a single machine. That's what localhost means.
– Warren Young
Dec 17 '14 at 8:22




@CodeMed: Why are you bringing a second computer into the discussion at all? The mantra of troubleshooting is to keep it as simple as possible, and test only one thing at a time. So, do everything here on a single machine. I don't care if you do it all on your development box or all on the production box. telnet localhost 8080 only works within a single machine. That's what localhost means.
– Warren Young
Dec 17 '14 at 8:22










1 Answer
1






active

oldest

votes


















0














To fix this, first test by setting the boolean dynamically (not permanent yet):



/usr/sbin/setsebool httpd_can_network_connect 1


If that works, you can set it so that the default policy is changed and this setting will persist across reboots:



/usr/sbin/setsebool -P httpd_can_network_connect 1


Credit: http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f174593%2fcentos-7-httpd-failed-to-make-connection-with-backend%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    To fix this, first test by setting the boolean dynamically (not permanent yet):



    /usr/sbin/setsebool httpd_can_network_connect 1


    If that works, you can set it so that the default policy is changed and this setting will persist across reboots:



    /usr/sbin/setsebool -P httpd_can_network_connect 1


    Credit: http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/






    share|improve this answer




























      0














      To fix this, first test by setting the boolean dynamically (not permanent yet):



      /usr/sbin/setsebool httpd_can_network_connect 1


      If that works, you can set it so that the default policy is changed and this setting will persist across reboots:



      /usr/sbin/setsebool -P httpd_can_network_connect 1


      Credit: http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/






      share|improve this answer


























        0












        0








        0






        To fix this, first test by setting the boolean dynamically (not permanent yet):



        /usr/sbin/setsebool httpd_can_network_connect 1


        If that works, you can set it so that the default policy is changed and this setting will persist across reboots:



        /usr/sbin/setsebool -P httpd_can_network_connect 1


        Credit: http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/






        share|improve this answer














        To fix this, first test by setting the boolean dynamically (not permanent yet):



        /usr/sbin/setsebool httpd_can_network_connect 1


        If that works, you can set it so that the default policy is changed and this setting will persist across reboots:



        /usr/sbin/setsebool -P httpd_can_network_connect 1


        Credit: http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jul 9 '18 at 0:20









        EKons

        4641518




        4641518










        answered Mar 17 '18 at 13:00









        Ramon R.Ramon R.

        11




        11






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f174593%2fcentos-7-httpd-failed-to-make-connection-with-backend%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            CARDNET

            Boot-repair Failure: Unable to locate package grub-common:i386

            濃尾地震