【问题标题】:Why is the "Siege"-tool not working with HTTPS sites?为什么“围攻”工具不适用于 HTTPS 站点?
【发布时间】:2013-08-26 07:48:16
【问题描述】:

我正在使用来自 CentOS 6.4 的 Siege 3.0.3。

我的问题是:“围攻”如何支持 HTTPS 协议?

到目前为止,使用此工具测试 HTTP 站点是可以的。

但是,在处理 HTTPS 站点时,我遇到了某些问题(如下所述)。

根据某人的建议,为了使 HTTPS 正常工作,我使用 openssl 编译了 siege。

为此,我遵循了以下站点中提到的程序。 http://drewsymo.com/how-to/installing-siege-stress-tester-on-centos-6-3/

简而言之,我运行了以下命令来使用 openssl 编译 siege。

cd /opt
wget http://www.openssl.org/source/openssl-1.0.1e.tar.gz
tar -zxvf openssl-1.0.1e.tar.gz
cd siege-3.0.3
./configure -with-ssl=/opt/openssl-1.0.1e
make && make install

我在上述步骤中没有收到任何警告或错误。

但是,即使在此之后,我在使用此工具处理 HTTPS 站点时也得到了以下结果。

问题#1

每当我设置许多点击数(如 1000、2000)时,都会出现以下错误。

"Segmentation fault (core dumped)"

请注意我已经运行了“ulimit -n 10000”命令来增加打开文件的数量。

但是,这并没有帮助。

问题#2

[root@localhost ~]# siege --user-agent="Mozilla/5.0 (Windows NT 6.2; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0" -c10 -r1 -t50S someHTTPSdomain.com
[error] CONFIG conflict: selected time and repetition based testing: No such file or directory
defaulting to time-based testing: 50 seconds
** SIEGE 3.0.3
** Preparing 10 concurrent users for battle.
The server is now under siege...
HTTP/1.1 302   0.09 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.11 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.08 secs:       0 bytes ==> GET  /
HTTP/1.1 302   3.09 secs:       0 bytes ==> GET  /
.....................
.....................
.....................

Then after many such hits exceeding the above defined 10 hits, I had to press Ctrl+C.

After that, it shows,

^C
Lifting the server siege...      done.

Transactions:                      0 hits
Availability:                   0.00 %
Elapsed time:                  18.70 secs
Data transferred:               0.00 MB
Response time:                  0.00 secs
Transaction rate:               0.00 trans/sec
Throughput:                     0.00 MB/sec
Concurrency:                    3.19
Successful transactions:          30
Failed transactions:              28
Longest transaction:           12.10
Shortest transaction:           0.07

FILE: /usr/local/var/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.
[root@localhost ~]#

为什么在 HTTPS 网站的情况下交易总是显示 0 次点击?

即使在指定“-c10 -r1”之后,为什么 HTTPS 站点的滚动输出不会停止?

另外,为什么 HTTPS 网站的所有 HTTP 响应都显示为 30X?

为什么这个错误“[错误]配置冲突:选择的时间和基于重复的测试:没有这样的文件或目录默认为基于时间的测试:50秒”一直显示?

无论如何,如果我从上述命令中删除 -t50S,我不会收到错误“[错误] CONFIG 冲突:选择的基于时间和重复的测试:没有这样的文件或目录默认为基于时间的测试:50 秒” .

但是,它仍然将交易显示为 0 次命中。见下文。

[root@localhost ~]# siege --user-agent="Mozilla/5.0 (Windows NT 6.2; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0" -c10 -r1 someHTTPSdomain.com
** SIEGE 3.0.3
** Preparing 10 concurrent users for battle.
The server is now under siege...
HTTP/1.1 302   0.08 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.08 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.09 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.11 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.07 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.09 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.08 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.08 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.08 secs:       0 bytes ==> GET  /
HTTP/1.1 302   0.10 secs:       0 bytes ==> GET  /
done.

Transactions:                      0 hits
Availability:                   0.00 %
Elapsed time:                   2.14 secs
Data transferred:               0.00 MB
Response time:                  0.00 secs
Transaction rate:               0.00 trans/sec
Throughput:                     0.00 MB/sec
Concurrency:                    0.40
Successful transactions:          10
Failed transactions:              10
Longest transaction:            0.11
Shortest transaction:           0.07

FILE: /usr/local/var/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.
[root@localhost ~]#

问题#3

另一件事,我注意到如果我在 HTTPS URL 前面加上“https://”,如下所示,我会得到这样的输出。

[root@localhost ~]# siege --user-agent="Mozilla/5.0 (Windows NT 6.2; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0" -c10 -r1 https://someHTTPSdomain.com
** SIEGE 3.0.3
** Preparing 10 concurrent users for battle.
The server is now under siege...
done.

Transactions:                      0 hits
Availability:                   0.00 %
Elapsed time:                   1.06 secs
Data transferred:               0.00 MB
Response time:                  0.00 secs
Transaction rate:               0.00 trans/sec
Throughput:                     0.00 MB/sec
Concurrency:                    0.00
Successful transactions:           0
Failed transactions:              10
Longest transaction:            0.00
Shortest transaction:           0.00

FILE: /usr/local/var/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.
[root@localhost ~]#

简单地说,没有 HTTP 或其他响应消息。

在处理 HTTPS 站点时,我对这些结果感到困惑。不清楚是我在发出命令时做错了什么,还是这个工具的一些错误或限制。

我想提一下,在上面的命令中,我通过在所有命令中使用“--user-agent=”来使用有效的 Windows 8(使用 Firefox 浏览器)用户代理。 我这样做只是为了替换默认的 Siege 用户代理,即“JoeDog/1.00 [en] (X11; I; Siege 3.0.3)”,因为这个默认的 Siege 用户代理可能在许多网络服务器中被列入黑名单(不太确定)。

请有人指导。

提前致谢。

【问题讨论】:

    标签: https performance-testing load-testing stress-testing siege


    【解决方案1】:
    1. 帮不上那个忙

    2. 我猜如果你不以“https://”开头的 URL,siege 就不会知道使用 SSL。 (https 中的“s”代表“安全”)。所以我猜 302s 是将你转发到 https URL 的服务器。如果您从“0 点击”行往下看,它会显示 10 次成功的交易……这些可能是 302 响应。它还显示了 10 个失败的事务 - 因此它无法使用 SSL 连接(假设转发只是使用 SSL 到同一个 URL)。

    3. 这里说 10 次失败的交易,就像之前一样。 /usr/local/var/siege.log 包含什么?也许失败消息在那里?

    【讨论】:

      【解决方案2】:

      我遇到了完全相同的问题。我先做了一个

      ./configure --with-ssl=/usr/bin/openssl
      

      编译正常,但在尝试使用 https 时会出现核心转储,这是因为必须提供 ssl lib 的路径

      ./configure --with-ssl=/usr/lib64/openssl
      

      那么siege就可以处理ssl了

      【讨论】:

        【解决方案3】:

        正如另一个帖子所说,您必须使用 --with-ssl 选项进行配置。此外,还必须安装 openssl 开发头文件。如果您没有 SSL 头文件 ./configure,make 和 make install 将运行良好,它们将安装一个工作的 siege 二进制文件,但它无法处理 HTTPS。

        【讨论】:

          猜你喜欢
          • 2023-03-11
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-10-29
          相关资源
          最近更新 更多