Jmeter運行TCP取樣器,報錯如下:
解決辦法:
1 設置合理的響應超時時間。
2 TCP取樣器設置界面,需要設置EOL值。
如何設置該值呢?
根據服務器返回值截取最后一個字節, 注意如果是16進制,應該是兩個字符。
以發送接收16進制數據包為例,假設服務器返回值為以下內容(可以在jmeter察看結果樹響應數據里查看):
7e80010005013819415186010103e7020000d47e
最后一個字節是7e,換算成10進制后為126,在EOL設置為126后,該報錯問題已解決。
提供一個換算工具:在線進制轉換
EOL說明具體可參考End of line(EOL) byte value
關於此問題其他回答:
If you don't define the EOM byte, it reads until the end of the stream. Since the stream isn't going to end, it times out. You have to set the EOM byte correctly for the protocol you're using. (answered by David Schwartz)