java.io.IOException: PHP FastCGI server not running - php

I configured piwik php code to my apache tomcat server using java-bridge and php-servlet api,
It is working fine for the local environment with window, but while same thing done on test environment, There also working fine but after some time it is falling and giving following exception :
If anyone having the same experience please help me to get it out.
type Exception report
message PHP FastCGI server not running. Please see server log for details. Or start a PHP FastCGI server using the command:
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.io.IOException: PHP FastCGI server not running. Please see server log for details. Or start a PHP FastCGI server using the command:
cd /liferay-portal-6.2-ee-sp7/tomcat-7.0.42/webapps/piwik/WEB-INF/cgi/amd64-linux
REDIRECT_STATUS=200 X_JAVABRIDGE_OVERRIDE_HOSTS="/" PHP_FCGI_CHILDREN="5" PHP_FCGI_MAX_REQUESTS="5000" /usr/bin/php-cgi -b 127.0.0.1:9668
php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:489)
php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:521)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)
root cause
java.io.IOException: PHP FastCGI server failed:
php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:439)
php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:481)
php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:521)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)
root cause
php.java.bridge.http.FCGIConnectException: Could not connect to server
php.java.bridge.http.SocketChannelFactory.doConnect(SocketChannelFactory.java:77)
php.java.bridge.http.SocketChannelFactory.connect(SocketChannelFactory.java:88)
php.java.servlet.ContextLoaderListener$1.connect(ContextLoaderListener.java:533)
php.java.bridge.http.FCGIConnectionPool$Connection.reopen(FCGIConnectionPool.java:101)
php.java.bridge.http.FCGIConnectionPool.openConnection(FCGIConnectionPool.java:224)
php.java.servlet.fastcgi.FastCGIServlet.parseBody(FastCGIServlet.java:312)
php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:433)
php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:481)
php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:521)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)
root cause
java.net.ConnectException: Connection refused
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
java.net.Socket.connect(Socket.java:579)
java.net.Socket.connect(Socket.java:528)
java.net.Socket.<init>(Socket.java:425)
java.net.Socket.<init>(Socket.java:241)
php.java.bridge.http.SocketChannelFactory.doConnect(SocketChannelFactory.java:75)
php.java.bridge.http.SocketChannelFactory.connect(SocketChannelFactory.java:88)
php.java.servlet.ContextLoaderListener$1.connect(ContextLoaderListener.java:533)
php.java.bridge.http.FCGIConnectionPool$Connection.reopen(FCGIConnectionPool.java:101)
php.java.bridge.http.FCGIConnectionPool.openConnection(FCGIConnectionPool.java:224)
php.java.servlet.fastcgi.FastCGIServlet.parseBody(FastCGIServlet.java:312)
php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:433)
php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:481)
php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:521)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.
Apache Tomcat/7.0.42
Thanks!
Surendra

Related

problem with Mysql Unknown error starting mysql and Unknown error starting apache

I have problem with all version of bitnami. When I shut down or restart my pc, WAMP can't connect with MySQL. I closed skype but still have the same problem. I also changed to XAMPP but the problem still there when I shut down. In the end, I revert to bitnami and I still have the same problem. I've watched all the troubleshooting video and do something like changing port to 3307 but I can't resolve this problem.
This is the message I get from bitnami:
Stderr:
Unknown error starting mysql
Starting Apache Web Server...
Exit code: 1
Stdout:
Stderr:
Unknown error starting apache
could you try this?
1.- Go to the control panel->Administrative Tools -> Services,
2.- find web Deployment Service and stop it.
3.- Start the apache server in bitnami
You can check if the port it's in use with the console,
1.- click the Start button,
2.- type cmd
3.- right-click “Command Prompt” when it shows up in the search results. Click “Run as administrator.”
When the console appears copy the next command:
netstat -ab

How to solve javaBridge error php.java.fastcgi.ConnectionException?

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?

GAE dev_appserver crashes CGI / FastCGI on windows

I installed python 2.7 and the Goole Cloud SDK.
After that I installed the php runtime using this command :
gcloud components install app-engine-php-windows
I then boot up a local dev server using this line :
dev_appserver.py <app-directory>
The server boots up fine, but when I send multiple requests to the server, I see multiple popups (one after te other) saying "CGI / FastCGI has stopped working". I can then "Debug" or "Close program".
In the logfile I see this :
ERROR:root:php failure (255) with:
stdout:
ERROR:root:php failure (-1073741819) with:
stdout:
OS specifics : Windows 10 Pro 64-bit.
Also, adding extension="php_curl.dll" to php.ini does not avoid my problem as stated in other issues similar to this one.
Can anyone help with this issue?

Nginx and Aegir installation on Ubuntu fails

I am installing Aegir with Nginx on vanilla Ubuntu 14.04 VPS following:
http://community.aegirproject.org/content/installing/manual/nginx-mariadb-php-fpm-single-server-installation
At the very end, during Aegir install I get following error:
Could not rsync from '/var/aegir/config/server_master/nginx/subdir.d' to 'aegir# nginx.drophost.eu:/' [error]
/var/aegir/config/server_master/nginx/subdir.d could not be synced to remote server nginx.drophost.eu. Changes might not be available[error]
until this has been done. (error: ssh: Could not resolve hostname nginx.drophost.eu: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0])
Server domain is nginx.drophost.eu and it resolves correctly to server IP, so what's wrong?

FastCGI error after PHP Upgrade

As outlined in a previous question (https://stackoverflow.com/questions/21648349/php-5-5-9-test-failures-and-internal-server-errors) my server administrator recently tried to install php 5.5.9 (using a wrapper) alongside our current configuration, which is php 5.3.8. The o/s is Opensuse 12.1, and it's a Plesk server (11.0.9).
After a successfull installation and initiating the new configuration on a specific vhost, every php script throws out a 500 Internal Server Error. The Apache logs do not show any useful information, however we were able to get mod_sec to pickup a fastcgi error which is as follows:
**Apache-Error:
[file "fcgid_proc_unix.c"] [line 634] [level 4] [status 104] mod_fcgid: error reading data from FastCGI server
Apache-Error: [file "util_script.c"] [line 435] [level 19] Premature end of script headers: db.php**
This error appears only when 5.5.9 is active, and disappears as soon as we switch back to 5.3.8. This is the only lead we have to go on :(
We've also tried checking htaccess & permissions, so far no change.
Thanks!
Problem solved, finally.
In our case we had to CHMOD the cgi-bin for the vhost to 755 (it was 775). After that, smooth running!

Categories