大网数据广告活动
服务器运维问答

Connection reset by peer while using apache as reverse proxy

· 52CE 我爱测

I've installed Transmission daemon on machine #0(Ubuntu 16.04.5, native), and Apache2(Apache/2.4.18) on machine #1(Ubuntu 16.04.5, on XCP-NG 75). Apache is now reverse-proxying transmission for adopting TLS to transmission rpc. W…

问题原文

原帖链接 · Sam · CC BY-SA 4.0

I've installed Transmission daemon on machine #0(Ubuntu 16.04.5, native), and Apache2(Apache/2.4.18) on machine #1(Ubuntu 16.04.5, on XCP-NG 75). Apache is now reverse-proxying transmission for adopting TLS to transmission rpc.

Wherever I connect to transmission via apache, it continues returning 'Connection reset by Peer' for few minutes interval.

I can sure this is not a problem of network, since SSH connection from My PC to machine #1, and machine #1 to machine #0 both remains stablized.

This is a config for transmission vHost.

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        SSLEngine on
        SSLCertificateFile [A Certificate File]
        SSLCertificateKeyFile [A Certificate Key File]
        SSLCertificateChainFile [A Certificate Chain File]
        ServerName [Hostname]

        ProxyRequests Off
        ProxyPass / http://[Address to machine #0]:9091/
        ProxyPassReverse / http://[Address to machine #0]:9091/
        <Location "/">
            AuthType Basic
            AuthName "Transmission"
            AuthUserFile [Authentication File]
            Require valid-user
        </Location>
    </VirtualHost>
</IfModule>  

Which makes this kind of problem? and how should I fix it?

已采纳解答

原帖链接 · Horloge · CC BY-SA 4.0

I've (finally) joined the StackExchange community to help you, as nobody has answered yet.
I was facing the same issue today, and it looked definitely related to the Apache SSL info we could notice within verbose logs :

[ssl:info] [...] The timeout specified has expired: [...] SSL input filter read failed.

So a "solution" (mostly a "workaround" IMHO) is proposed here.

Here is a blog post I've written about this very setup : link.

Bye

PS : In my specific case, SetEnv nokeepalive sufficed.


TL;DR

Try adding SetEnv nokeepalive ssl-unclean-shutdown to your VHOST configuration.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。