【问题标题】:Kubernetes Distributed testing - Jmeter won't start; sun.rmi.transport.tcp.TCPConnection closeKubernetes 分布式测试 - Jmeter 不会启动; sun.rmi.transport.tcp.TCPConnection 关闭
【发布时间】:2022-10-14 13:05:12
【问题描述】:

我的架构:kubernetes 中的命名空间位于代理、防火墙和其他交换机后面。 我的主人向奴隶发送任务,当脚本结束时,它会关闭奴隶和主人。我已经配置并运行了 netpols、入口和出口。我在 3 端口范围内有开放端口,例如60000-60002、1099-1101。

我的问题:通常,当我开始测试时,主人应该发送日志,例如:

"Oct 12, 2022 11:31:39 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Creating summariser <summary>
Created the tree successfully using /mount/10_2022/scenario.jmx
Configuring remote engine: slave-1
Using local port: 60000
Starting distributed test with remote engines: [slave-1] @ October 12, 2022 11:31:41 AM CEST (1665567101036)
Remote engines have been started:[opl-jmeter-distributed-slave-1]
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445"

当主服务器发送日志时:

"Oct 12, 2022 11:31:39 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Creating summariser <summary>
Created the tree successfully using /mount/10_2022/scenario.jmx
Configuring remote engine: slave-1
Using local port: 60000
Starting distributed test with remote engines: [slave-1] @ October 12, 2022 11:31:41 AM CEST (1665567101036)

<这行之间大约有7-10分钟的休息时间。>

"Remote engines have been started:[opl-jmeter-distributed-slave-1]
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445"

之后什么都没有发生,除了日志错误,例如:

"2022-10-12 11:40:30,274 ERROR o.a.j.s.RemoteListenerWrapper: testStarted(host) on slave-1
java.rmi.ConnectException: Connection refused to host: <MASTER'S IP>; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out)"

和

"2022-10-12 11:49:18,668 ERROR o.a.j.s.BatchSampleSender: sampleOccurred
java.rmi.ConnectException: Connection refused to host: <MASTER'S IP>; nested exception is:java.net.ConnectException: Connection timed out (Connection timed out)"

我开始调试我的操作,这是我从主日志中得到的:

"Oct 13, 2022 10:45:37 AM sun.rmi.transport.tcp.TCPChannel free
FINE: RMI RenewClean-[172.16.28.15:60000,SSLRMIClientSocketFactory(keyStoreLocation=/mount/keyStore/rmi_keystore.jks, type=JKS, trustStoreLocation=/mount/keyStore/rmi_keystore.jks, type=JKS, alias=rmi)]: create reaper
Oct 13, 2022 10:45:52 AM sun.rmi.transport.tcp.TCPChannel$1 run
FINER: RMI Scheduler(0): wake up
Oct 13, 2022 10:45:52 AM sun.rmi.transport.tcp.TCPChannel freeCachedConnections
FINER: RMI Scheduler(0): connection timeout expired
Oct 13, 2022 10:45:52 AM sun.rmi.transport.tcp.TCPConnection close
FINE: RMI Scheduler(0): close connection"

我开始调试我的操作,这是我从主日志中得到的:

Oct 13, 2022 10:45:37 AM sun.rmi.transport.tcp.TCPChannel free
FINE: RMI RenewClean-[172.16.28.15:60000,SSLRMIClientSocketFactory(keyStoreLocation=/mount/keyStore/rmi_keystore.jks, type=JKS, trustStoreLocation=/mount/keyStore/rmi_keystore.jks, type=JKS, alias=rmi)]: create reaper
Oct 13, 2022 10:45:52 AM sun.rmi.transport.tcp.TCPChannel$1 run
FINER: RMI Scheduler(0): wake up
Oct 13, 2022 10:45:52 AM sun.rmi.transport.tcp.TCPChannel freeCachedConnections
FINER: RMI Scheduler(0): connection timeout expired
Oct 13, 2022 10:45:52 AM sun.rmi.transport.tcp.TCPConnection close
FINE: RMI Scheduler(0): close connection

请帮忙。有什么线索吗?为什么我的测试没有开始?

【问题讨论】:

    标签: kubernetes jmeter distributed


    【解决方案1】:

    很可能您的RMI configuration 不正确

    您需要创建一个Service 并公开以下端口:

    • 1099 或您的 server_port
    • 4000 或您的 server.rmi.localport

    就像在从站的 Dockerfile 中一样:

    EXPOSE 1099 4000
        
    

    在 k8s 服务 YAML

    spec:
      clusterIP: None
      ports:
        - port: 1099
          name: server_port
          targetPort: 1099
        - port: 4000
          name: server_rmi_localport
          targetPort: 4000
    

    并对 JMeter 主端的client.rmi.localport 执行相同的操作。

    更多信息:JMeter Distributed Testing with Docker

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多