是否可以配置jmeter-server使用的IP地址?
我们有1台Windows jMeter客户端服务器和2台Linux jMeter服务器。
Windows:
User-IP 44.44.44.110
Backup-IP 180.110.110.10
Linux 1:
User-IP 44.44.44.111
Backup-IP 180.110.110.11
Linux 2:
User-IP 44.44.44.112
Backup-IP 180.110.110.12
我将测试执行发送到IP上的从站:44.44.44.111和44.44.44.112,但是奴隶试图将结果发送回IP 180.110.110.11和180.110.110.12。
我收到错误:
2017/11/03 22:18:09 ERROR - jmeter.samplers.RemoteListenerWrapper: testStarted(host) java.rmi.ConnectIOException: Exception creating connection to: 180.110.110.10; nested exception is:
java.net.NoRouteToHostException: No route to host
禁止备份 - IP通信,因此我只能使用User-IP。如何解决这个问题?
仍然是同样的问题。
root@slave02jm:/usr/jmeter/apache-jmeter-3.0/bin : ps -ef | grep jmeter
root 31350 30659 0 09:38 pts/0 00:00:00 /bin/sh ./jmeter-server
root 31352 31350 0 09:38 pts/0 00:00:00 /bin/sh ./jmeter -Djava.rmi.server.hostname=44.44.44.112 -Dserver_port=1099 -s -j jmeter-server.log
root 31381 31352 9 09:38 pts/0 00:00:00 java -server -XX:+HeapDumpOnOutOfMemoryError -Xms1024m -Xmx6144m -XX:MaxTenuringThreshold=2 -XX:+CMSClassUnloadingEnabled -jar ./ApacheJMeter.jar -Djava.rmi.server.hostname=44.44.44.112 -Dserver_port=1099 -s -j jmeter-server.log
日志
2017/11/04 09:38:23 INFO - jmeter.util.JMeterUtils: Setting Locale to en_US
2017/11/04 09:38:24 INFO - jmeter.JMeter: Loading user properties from: /usr/jmeter/apache-jmeter-3.0/bin/user.properties
2017/11/04 09:38:24 INFO - jmeter.JMeter: Loading system properties from: /usr/jmeter/apache-jmeter-3.0/bin/system.properties
2017/11/04 09:38:24 INFO - jmeter.JMeter: Setting System property: java.rmi.server.hostname=44.44.44.112
2017/11/04 09:38:24 INFO - jmeter.JMeter: Setting System property: server_port=1099
2017/11/04 09:38:24 INFO - jmeter.JMeter: Copyright (c) 1998-2016 The Apache Software Foundation
2017/11/04 09:38:24 INFO - jmeter.JMeter: Version 3.0 r1743807
2017/11/04 09:38:24 INFO - jmeter.JMeter: java.version=1.8.0_102
2017/11/04 09:38:24 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2017/11/04 09:38:24 INFO - jmeter.JMeter: os.name=Linux
2017/11/04 09:38:24 INFO - jmeter.JMeter: os.arch=amd64
2017/11/04 09:38:24 INFO - jmeter.JMeter: os.version=3.0.101-108.10-default
2017/11/04 09:38:24 INFO - jmeter.JMeter: file.encoding=ANSI_X3.4-1968
2017/11/04 09:38:24 INFO - jmeter.JMeter: Max memory =5726797824
2017/11/04 09:38:24 INFO - jmeter.JMeter: Available Processors =4
2017/11/04 09:38:24 INFO - jmeter.JMeter: Default Locale=English (United States)
2017/11/04 09:38:24 INFO - jmeter.JMeter: JMeter Locale=English (United States)
2017/11/04 09:38:24 INFO - jmeter.JMeter: JMeterHome=/usr/jmeter/apache-jmeter-3.0
2017/11/04 09:38:24 INFO - jmeter.JMeter: user.dir =/usr/jmeter/apache-jmeter-3.0/bin
2017/11/04 09:38:24 INFO - jmeter.JMeter: PWD =/usr/jmeter/apache-jmeter-3.0/bin
2017/11/04 09:38:24 INFO - jmeter.JMeter: IP: 44.44.44.112 Name: slave02 FullName: slave02
2017/11/04 09:38:24 INFO - jmeter.engine.RemoteJMeterEngineImpl: Starting backing engine on 1099
2017/11/04 09:38:24 INFO - jmeter.engine.RemoteJMeterEngineImpl: Resolving by name the value of System property 'java.rmi.server.hostname':44.44.44.112
2017/11/04 09:38:24 INFO - jmeter.engine.RemoteJMeterEngineImpl: Local IP address=44.44.44.112
2017/11/04 09:38:24 INFO - jmeter.engine.RemoteJMeterEngineImpl: Creating RMI registry (server.rmi.create=true)
2017/11/04 09:38:24 INFO - jmeter.engine.RemoteJMeterEngineImpl: Bound to registry on port 1099
2017/11/04 09:38:57 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2017/11/04 09:38:57 INFO - jmeter.protocol.http.control.CookieManager: Settings: Delete null: true Check: true Allow variable: true Save: false Prefix: COOKIE_
2017/11/04 09:38:57 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017/11/04 09:38:57 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017/11/04 09:38:57 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017/11/04 09:38:57 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017/11/04 09:38:57 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2017/11/04 09:38:57 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2017/11/04 09:38:57 INFO - jmeter.protocol.http.control.CacheManager: Will only cache the following methods: [GET]
2017/11/04 09:38:57 INFO - jmeter.samplers.BatchSampleSender: Using batching for this run. Thresholds: num=100, time=60000
2017/11/04 09:38:57 INFO - jmeter.samplers.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2017/11/04 09:39:00 INFO - jmeter.engine.RemoteJMeterEngineImpl: Creating JMeter engine on host slave02 base '.'
2017/11/04 09:39:00 INFO - jmeter.engine.RemoteJMeterEngineImpl: Remote client host: 44.44.44.110
2017/11/04 09:39:00 INFO - jmeter.services.FileServer: Default base='/usr/jmeter/apache-jmeter-3.0/bin'
2017/11/04 09:39:00 INFO - jmeter.services.FileServer: Set new base='.'
2017/11/04 09:39:00 INFO - jmeter.engine.StandardJMeterEngine: Applying properties {}
2017/11/04 09:39:00 INFO - jmeter.engine.RemoteJMeterEngineImpl: Running test
2017/11/04 09:39:00 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2017/11/04 09:39:00 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2017/11/04 09:39:00 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2017/11/04 09:39:00 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2017/11/04 09:39:03 ERROR - jmeter.samplers.RemoteListenerWrapper: testStarted(host) java.rmi.ConnectIOException: Exception creating connection to: 180.110.110.10; nested exception is:
java.net.NoRouteToHostException: No route to host
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:631)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:130)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
at com.sun.proxy.$Proxy1.testStarted(Unknown Source)
at org.apache.jmeter.samplers.RemoteListenerWrapper.testStarted(RemoteListenerWrapper.java:85)
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:205)
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:324)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.NoRouteToHostException: No route to host
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 10 more
你看到有什么问题吗?
感谢您的帮助。
第
答案 0 :(得分:1)
启动jmeter-server时,请确保添加
-Djava.rmi.server.hostname = Internal_IP
这将做你想要的事情
答案 1 :(得分:0)
system.properties(jmeter Windows客户端)中的配置设置诀窍java.rmi.server.hostname = 44.44.44.110