I am running the PHP-Java bridge server (apache-tomcat). Sometimes I get an intermittent error. It's working when I restart the tomcat server from /opt/apache-tomcat-8.5.43/bin
directory by ./shutdown.sh
and startup.sh
.
25-Jul-2019 13:53:52.766 SEVERE [http-nio-8080-exec-8] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [PhpCGIServlet] in context with path [/JavaBridge] threw exception
php.java.fastcgi.ConnectionException
at php.java.fastcgi.FCGIInputStream.read(FCGIInputStream.java:31)
at php.java.fastcgi.FCGIHeaderParser.parseBody(FCGIHeaderParser.java:82)
at php.java.servlet.fastcgi.FastCGIServlet.doExecute(FastCGIServlet.java:442)
at php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:468)
at php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:479)
at php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Protocol error
at php.java.fastcgi.FCGIInputStream.doRead(FCGIInputStream.java:56)
at php.java.fastcgi.FCGIInputStream.read(FCGIInputStream.java:29)
Dockerfile:
FROM ubuntu:16.04
MAINTAINER Alexey Nurgaliev <atnurgaliev@gmail.com>
ENV DEBIAN_FRONTEND=noninteractive
ENV JAVA_BRIDGE_URL="https://sourceforge.net/projects/php-java-bridge/files/Binary%20package/php-java-bridge_7.1.3/php-java-bridge_7.1.3_documentation.zip/download"
ENV JAYBIRD_URL="https://github.com/FirebirdSQL/jaybird/releases/download/v2.2.13/Jaybird-2.2.13-JDK_1.8.zip"
ENV JAYBIRD_FILE_NAME="jaybird-full-2.2.13.jar"
ENV POSTGRESQL_URL="https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar"
ENV POSTGRESQL_FILE_NAME="postgresql-9.4.1212.jar"
ENV TOMCAT_VERSION="8.5.43"
ENV TOMCAT_URL="http://apache-mirror.rbc.ru/pub/apache/tomcat/tomcat-8/v8.5.43/bin/apache-tomcat-8.5.43.tar.gz"
ENV TOMCAT_DIR="/opt/apache-tomcat-${TOMCAT_VERSION}"
ENV TOMCAT_LIB_DIR="${TOMCAT_DIR}/webapps/JavaBridge/WEB-INF/lib"
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y unzip wget php-cgi openjdk-8-jre-headless locales && \
apt-get install -y nano && \
apt-get install -y curl wget && \
locale-gen --lang ru_RU.UTF-8
RUN cd /opt &&\
wget -O "tomcat.tar.gz" "${TOMCAT_URL}" &&\
tar -xf "tomcat.tar.gz" &&\
rm "tomcat.tar.gz" &&\
wget -O "JavaBridge.zip" "${JAVA_BRIDGE_URL}" &&\
unzip "JavaBridge.zip" -d "JavaBridge" &&\
unzip -o "JavaBridge/JavaBridge.war" -d "${TOMCAT_DIR}/webapps/JavaBridge" &&\
rm -R JavaBridge &&\
rm JavaBridge.zip &&\
wget -O "jaybird.zip" "${JAYBIRD_URL}" &&\
unzip "jaybird.zip" -d "jaybird" &&\
cp "jaybird/${JAYBIRD_FILE_NAME}" "${TOMCAT_LIB_DIR}" &&\
rm -R "jaybird" &&\
wget "${POSTGRESQL_URL}" &&\
cp "${POSTGRESQL_FILE_NAME}" "${TOMCAT_LIB_DIR}" &&\
rm "${POSTGRESQL_FILE_NAME}"
EXPOSE 8080
CMD LANG=ru_RU.UTF-8 "${TOMCAT_DIR}/bin/catalina.sh" run
from PHP Java bridge exception - protocol error
No comments:
Post a Comment