0

I am using tomcat8.5, apache2, php7.25 on ubuntu 18.04

I installed php on my computer and did other configurations and installed required libraries. In the first day it worked fine and I could run a php script properly on localhost.

But next day when I tried to run the same php file I got this error.

Type Exception Report

Message Could not connect to server. Please start it with: cd /home/dr3am/Documents/phphome/WEB-INF/cgi/amd64-linux

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

php.java.fastcgi.ConnectionException: Could not connect to server. Please start it with: cd /home/dr3am/Documents/phphome/WEB-INF/cgi/amd64-linux
REDIRECT_STATUS=200 X_JAVABRIDGE_OVERRIDE_HOSTS="/" PHP_FCGI_CHILDREN="5" PHP_FCGI_MAX_REQUESTS="500" php-cgi -b 127.0.0.1:9669

php.java.fastcgi.SocketFactory.test(SocketFactory.java:73)
php.java.fastcgi.FCGIFactory.startFCGIServer(FCGIFactory.java:99)
php.java.fastcgi.FCGIConnectionPool.createConnectionPool(FCGIConnectionPool.java:147)
php.java.servlet.ContextLoaderListener.getConnectionPool(ContextLoaderListener.java:220)
php.java.servlet.ContextLoaderListener.getConnectionPool(ContextLoaderListener.java:209)
php.java.servlet.fastcgi.FastCGIServlet.doExecute(FastCGIServlet.java:374)
php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:468)
php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:479)
php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Root Cause

java.net.ConnectException: Connection refused (Connection refused)
    java.net.PlainSocketImpl.socketConnect(Native Method)
    java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    java.net.Socket.connect(Socket.java:607)
    java.net.Socket.connect(Socket.java:556)
    java.net.Socket.<init>(Socket.java:452)
    java.net.Socket.<init>(Socket.java:262)
    php.java.fastcgi.SocketFactory.test(SocketFactory.java:67)
    php.java.fastcgi.FCGIFactory.startFCGIServer(FCGIFactory.java:99)
    php.java.fastcgi.FCGIConnectionPool.createConnectionPool(FCGIConnectionPool.java:147)
    php.java.servlet.ContextLoaderListener.getConnectionPool(ContextLoaderListener.java:220)
    php.java.servlet.ContextLoaderListener.getConnectionPool(ContextLoaderListener.java:209)
    php.java.servlet.fastcgi.FastCGIServlet.doExecute(FastCGIServlet.java:374)
    php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:468)
    php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:479)
    php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:507)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Note The full stack trace of the root cause is available in the server logs.

I didn't change any configuration file or removed any required library. But suddenly I got this error. I looked for solutions but I found nothing related to my problem.

What is the reason for this and how to solve it?

2
  • Was the server started? Commented Mar 22, 2020 at 1:01
  • yes, apache was started Commented Mar 22, 2020 at 4:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.