AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[http-status-code-408](server)

Martin Hope
Chris Maggiulli
Asked: 2021-04-13 17:28:46 +0800 CST

Subversion SSL 握手失败和 408 错误代码

  • 1

版本

颠覆:版本 1.6.11 (r934486)

操作系统:CentOS 6.8 版(最终版)

背景

我有各种在 CentOS 机器上作为 cronjobs 运行的 shell 脚本。shell 脚本将文件提交到 Subversion 并从 Subversion 签出文件。今天我所有的脚本都开始失败并出现以下错误

svn:'https://svn.int.mydomain.edu/eas'的选项:SSL握手失败:收到SSL警报:协议版本错误(https://svn.int.mydomain.edu)

作为故障排除步骤,我运行了以下命令

openssl s_client -connect svn.int.mydomain.edu:443

并收到以下输出(略有编辑)

CONNECTED(00000003)
---
Certificate chain
 0 s:/OU=Domain Control Validated/CN=*.int.mydomain.edu
   i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
 1 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
   i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2
 2 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2
   i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
 3 s:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
   i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
REDACTED
-----END CERTIFICATE-----
subject=/OU=Domain Control Validated/CN=*.int.mydomain.edu
issuer=/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
---
No client certificate CA names sent
Server Temp Key: ECDH, prime256v1, 256 bits
---
SSL handshake has read 5545 bytes and written 373 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
    Session-ID: REDACTED
    Session-ID-ctx: 
    Master-Key: REDACTED
    Key-Arg   : None
    Krb5 Principal: None
    PSK identity: None
    PSK identity hint: None
    Start Time: 1618275549
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---
HTTP/1.1 408 Request Time-out
content-length: 110
cache-control: no-cache
content-type: text/html
connection: close

<html><body><h1>408 Request Time-out</h1>
Your browser didn't send a complete request in time.
</body></html>
closed

正如你所看到的,我HTTP/1.1 408 Request Time-out在标准输出的末尾得到了一个。我可以验证我可以在这个盒子上访问https://svn.int.mydomain.edu,因为从那个盒子单独安装 svn 可以正常工作(随 Jenkins 插件一起安装的 SVN 安装)。

问题

有人对这里的其他故障排除技术有任何想法吗?我试图搜索这个问题,但没有卓有成效的回应。

svn ssl http-status-code-408
  • 1 个回答
  • 685 Views
Martin Hope
Tumbelo
Asked: 2020-11-04 01:34:12 +0800 CST

使用 mod_proxy 时如何正确增加 Apache 的超时时间

  • 1

背景:

我有机器对机器的通信系统,客户端不时向Apache服务器发送数据。由于使用移动 2G 进行通信,因此通信速度很慢。Apache 使用 mod_wsgi(用于 Django)。

由于客户端在开始通信时不知道实际数据量,因此客户端和服务器之间使用分块传输编码。因为 mod_wsgi 不支持分块传输编码,所以我使用 mod_proxy,它接收块并将它们作为单个请求传递给 mod_wsgi,并在收到所有数据后添加内容长度信息。

问题:

我将服务器上的 Ubuntu 从 16.04 更新到 18.04,之后客户端和服务器之间的一些通信开始失败。从 Apache 的 access.log 中,我可以看到,该服务器使用“大”数据向客户端响应 408。大意味着在这种情况下数据量需要大约 60 秒的时间进行传输。客户端没有任何变化。

我了解到,对于 Apache 2.4(我在服务器的 Ubuntu 18.04 上拥有)TimeOut 是 60 秒,对于早期的 Apache 版本它是 300 秒。我想这是在“大”数据的情况下与新服务器操作系统通信失败的原因。

边注:

我注意到启用 mod_security 可以解决问题(没有“大”数据的 408),但就在我禁用 mod_security 并重新启动 Apache 时,408 返回图片。security.conf 中没有与超时相关的内容。

问题:

如何正确增加 TimeOut?

到目前为止尝试过:

由于 Apache 真的不是我的核心能力,我一直在尝试将 Timeout 增加到某些地方(也尝试过 KeepAliveTimeout,即使我认为这不是正确的方法):

apache.conf 片段:

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 300

example.com.conf 片段:

ProxyRequests Off
ProxyTimeout 300

<Proxy http://example.com:81>
        Order deny,allow
        Allow from all
</Proxy>

<VirtualHost *:80>
        SetEnv proxy-sendcl 1
        ProxyPass / http://example.com:81/ connectiontimeout=300 timeout=300
        ProxyTimeout 300
        ProxyPassReverse / http://example.com:81/
        ProxyPreserveHost On
        ProxyVia Full

        <Directory proxy:*>
                Order deny,allow
                Allow from all
        </Directory>
</VirtualHost>

Listen 81

<VirtualHost *:81>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    ServerName example.com
proxy timeout apache-2.4 http-status-code-408
  • 1 个回答
  • 4730 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve