0

我在 ubuntu 18.04 上使用 tomcat8.5、apache2、php7.25

我在我的计算机上安装了 php 并进行了其他配置并安装了所需的库。第一天它运行良好,我可以在 localhost 上正确运行一个 php 脚本。

但是第二天当我尝试运行相同的 php 文件时,我得到了这个错误。

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)

根本原因

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.

我没有更改任何配置文件或删除任何必需的库。但突然我得到了这个错误。我寻找解决方案,但没有发现与我的问题有关的任何东西。

这是什么原因以及如何解决?

4

0 回答 0