简体   繁体   English

JMeter在Ubuntu 18.04上通过Firefox录制控制器

[英]JMeter Recording controller via Firefox on Ubuntu 18.04

I'm using Firefox on Ubuntu 18.04 to record JMeter scenarios. 我在Ubuntu 18.04上使用Firefox来记录JMeter场景。 I can't access HTTPS pages : Firefox return the SSL_ERROR_RX_RECORD_TOO_LONG error. 我无法访问HTTPS页面:Firefox返回SSL_ERROR_RX_RECORD_TOO_LONG错误。

In Firefox, I set up the temporary certificated generated by JMeter, listening to the 8080 port. 在Firefox中,我设置了JMeter生成的临时证书,监听8080端口。

When I try to access a HTTPS page, I get this error in the jmeter.log file : 当我尝试访问HTTPS页面时,我在jmeter.log文件中收到此错误:

2019-05-02 16:36:22,461 ERROR o.a.j.p.h.p.Proxy:
javax.net.ssl.SSLProtocolException: Broken pipe (Write failed)
        at sun.security.ssl.Alert.createSSLException(Alert.java:126) ~[?:?]
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:321) ~[?:?]
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:264) ~[?:?]
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:259) ~[?:?]
        at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:988) ~[?:?]
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:123) ~[?:?]
        at java.io.FilterOutputStream.write(FilterOutputStream.java:108) ~[?:?]
        at org.apache.jmeter.protocol.http.proxy.Proxy.writeToClient(Proxy.java:486) [ApacheJMeter_http.jar:5.1.1 r1855137]
        at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:244) [ApacheJMeter_http.jar:5.1.1 r1855137]
Caused by: java.net.SocketException: Broken pipe (Write failed)
        at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:?]
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110) ~[?:?]
        at java.net.SocketOutputStream.write(SocketOutputStream.java:150) ~[?:?]
        at sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:320) ~[?:?]
        at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:983) ~[?:?]
        ... 4 more
2019-05-02 16:36:22,463 ERROR o.a.j.p.h.p.Proxy: [52392]  Exception when processing sample
javax.net.ssl.SSLProtocolException: Broken pipe (Write failed)
        at sun.security.ssl.Alert.createSSLException(Alert.java:126) ~[?:?]
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:321) ~[?:?]
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:264) ~[?:?]
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:259) ~[?:?]
        at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:988) ~[?:?]
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:123) ~[?:?]
        at java.io.FilterOutputStream.write(FilterOutputStream.java:108) ~[?:?]
        at org.apache.jmeter.protocol.http.proxy.Proxy.writeToClient(Proxy.java:486) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
        at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:244) [ApacheJMeter_http.jar:5.1.1 r1855137]
Caused by: java.net.SocketException: Broken pipe (Write failed)
        at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:?]
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110) ~[?:?]
        at java.net.SocketOutputStream.write(SocketOutputStream.java:150) ~[?:?]
        at sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:320) ~[?:?]
        at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:983) ~[?:?]
        ... 4 more
2019-05-02 16:36:22,464 WARN o.a.j.p.h.p.Proxy: [52392]  Exception while writing error
java.net.SocketException: Socket is closed
        at sun.security.ssl.SSLSocketImpl.getOutputStream(SSLSocketImpl.java:916) ~[?:?]
        at org.apache.jmeter.protocol.http.proxy.Proxy.writeErrorToClient(Proxy.java:561) [ApacheJMeter_http.jar:5.1.1 r1855137]
        at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:261) [ApacheJMeter_http.jar:5.1.1 r1855137]

Is there something I need to adapt in order to access HTTPS pages ? 为了访问HTTPS页面,我需要调整一些东西吗?

Below is a link which has some methods that you can try:- https://windowsreport.com/fix-ssl_error_rx_record_too_long-firefox-error/ 以下链接有一些方法可以尝试: - https://windowsreport.com/fix-ssl_error_rx_record_too_long-firefox-error/

But, if you have already tried this. 但是,如果你已经尝试过这个。 Then, try to change the browser to some other like chrome. 然后,尝试将浏览器更改为其他类似Chrome。

You might come across several problems while recording scripts using Jmeter. 使用Jmeter录制脚本时可能会遇到几个问题。

I would rather suggest to use Blazemeter Recording Extension to record your scenarios and then export in .jmx format and modify using jmeter. 我宁愿建议使用Blazemeter Recording Extension来记录您的场景,然后以.jmx格式导出并使用jmeter进行修改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM