Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Apache2代理错误:从远程服务器读取时出错_Java_Server_Proxy_Apache2_Nanohttpd - Fatal编程技术网

Java Apache2代理错误:从远程服务器读取时出错

Java Apache2代理错误:从远程服务器读取时出错,java,server,proxy,apache2,nanohttpd,Java,Server,Proxy,Apache2,Nanohttpd,环境: Apache2 nanohttpd(web服务器(java)) 该站点本身运行良好,我已经向数据库添加了许多条目,nanohttpdweb服务器在一些端点上返回这些条目 我已经弄清楚了,这与返回的站点的长度有关,因为当我将条目从一种状态移动到另一种状态时,具有大量条目的条目总是会给我这个错误 我已经环顾了一下四周,认为这可能是一个超时问题,但我已经为我的虚拟主机添加了超时,这个问题仍然存在 Proxy Error The proxy server received an invali

环境:

  • Apache2
  • nanohttpd(web服务器(java))
该站点本身运行良好,我已经向数据库添加了许多条目,nanohttpdweb服务器在一些端点上返回这些条目

我已经弄清楚了,这与返回的站点的长度有关,因为当我将条目从一种状态移动到另一种状态时,具有大量条目的条目总是会给我这个错误

我已经环顾了一下四周,认为这可能是一个超时问题,但我已经为我的虚拟主机添加了超时,这个问题仍然存在

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /foo

Reason: Error reading from remote server

Apache/2.4.10 (Debian) Server at foo.foo.foo Port 443
我的当前VirtualHost文件:

<IfModule mod_ssl.c>
    <VirtualHost *:443>
            ServerAdmin webmaster@localhost
            DocumentRoot /var/www/directory

            ServerName foo.foo.foo
            ServerAlias foo.foo.foo

            ProxyPass "/" "http://foo.com:8080/"
            ProxyPassReverse "/" "http://foo.com:8080/"

            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined

            Include /etc/path/options-ssl-apache.conf
            SSLCertificateFile /etc/path/foo.com-0001/fullchain.pem
            SSLCertificateKeyFile /etc/path/foo.com-0001/privkey.pem
    </VirtualHost>
</IfModule>

服务器管理员webmaster@localhost
DocumentRoot/var/www/directory
服务器名foo.foo.foo
服务器别名foo.foo.foo
代理过程“/”http://foo.com:8080/"
ProxyPassReverse“/”http://foo.com:8080/"
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
Include/etc/path/options-ssl-apache.conf
SSLCertificateFile/etc/path/foo.com-0001/fullchain.pem
SSLCertificateKeyFile/etc/path/foo.com-0001/privkey.pem
我之前尝试过在ProxyPass后面添加timeout=x和connectiontimeout=x,但这似乎没有帮助

编辑: 由于仍然没有答案,这里有一些更多的信息,我会添加一个赏金一旦合格

正如您在我的VirtualHost文件中看到的,我正在使用Apache反向代理为我的应用程序启用SSL

因此,我的小nanohttpd服务器基本上返回一个非常简单的html页面,每个数据库条目有一个表和一行。如果特定类别有超过100个条目,我将收到代理错误消息

在这一点上,我非常确定它必须处理一些超时的问题,但我已经浏览了很多帖子,并试图将配置添加到我的配置中(是的,每次更改后我都重新启动了Apache2),到目前为止没有任何效果

可能是我的nanohttpd服务器上缺少了什么吗? 一个简单的标题或Cookie,我现在不发送这些


如果缺少任何必需的信息,请告诉我。

好吧,有趣的是,我发现了,我现在感觉很糟糕。。
我插入的表格数据包含一个美元符号,显然我没有想到转义替换字符串。

您的一些输入可能格式不正确。

这个答案毫无意义。什么表格数据?