1

我正在使用Jmeter 2.8並嘗試首次執行分佈式(主從)測試。
在JMeter.properties 我設置樣樣精使用Jmeter進行分佈式測試

  • 組IP地址
  • 上的所有機器

但是當我運行測試(要求很簡單),它得到

  • 運行Jmater,server.bat失敗:

    請求:

    http://localhost:8080/web/login?credentials=<credential><userId>WillieWonka 
    </userId><passwd><![CDATA[WillieWonka]]></passwd></credential> 
    

    錯誤,我得到的是

    org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8080 refused 
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190) 
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) 
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) 
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) 
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) 
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) 
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:284) 
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62) 
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075) 
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064) 
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426) 
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) 
    at java.lang.Thread.run(Unknown Source) 
    Caused by: java.net.ConnectException: Connection refused: connect 
    at java.net.PlainSocketImpl.socketConnect(Native Method) 
    at java.net.PlainSocketImpl.doConnect(Unknown Source) 
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source) 
    at java.net.PlainSocketImpl.connect(Unknown Source) 
    at java.net.SocksSocketImpl.connect(Unknown Source) 
    at java.net.Socket.connect(Unknown Source) 
    at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127) 
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) 
    

    當服務器運行起來(我測試從LOCALMACHINE只運行,這是工作的罰款此要求)。

    出了什麼問題?
    我錯過了什麼?

  • 回答

    1

    我已經解決了這個問題,更換

    localhost:8080 
    

    computerName:8080 
    

    ,並通過啓動的start.bat應用服務器代替的run.bat

    現在是工作的罰款。

    相關問題