JMeter - 在 Linux 上启动 jmeter-server 时出现环回地址错误 [英] JMeter - Loopback address error when launching jmeter-server on Linux

查看:52
本文介绍了JMeter - 在 Linux 上启动 jmeter-server 时出现环回地址错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 JMeter 设置分布式负载测试环境.我需要使用诸如 Linux Live CD 之类的便携式设备来设置远程客户端,但是每当我尝试在 Linux 中启动 jmeter-server 时,我都会收到以下错误...

I'm trying to set up a distributed load testing environment using JMeter. I need to set up the remote clients using something portable like a Linux Live CD, but whenever I attempt to launch jmeter-server in Linux, I receive the following error...

Created remote object: UnicastServerRef [liveRef: [endpoint:[127.0.0.1:49018](local),objID:[3b0d3d42:12985b7a49b:-7fff, -8459389540436649718]]]
    Server failed to start: java.rmi.RemoteException: Cannot start. testbox01.qa.nwr.lan is a loopback address.

经过广泛的谷歌搜索后,我能找到的唯一补救措施是编辑/etc/hosts 文件,以便主机名映射到 127.0.0.1 环回地址以外的其他内容.我已经使用 Ubuntu、Fedora 和 CentOS 尝试过这个,显然它们都默认将主机名设置为 127.0.0.l.

After extensive googling, the only remedy I can find is to edit the /etc/hosts file so the hostname maps to something other than the 127.0.0.1 loopback address. I've tried this using Ubuntu, Fedora and CentOS, and apparently they all default to setting the hostname to 127.0.0.l.

在我看来,我有四种选择...

The way I see it, I have four options...

1) 为我设置的每个远程测试盒自定义/etc/hosts 文件,其中涉及超过 20-50 个动态 DHCP 分配的 IP 地址.

1) Customize the /etc/hosts file for every remote test box I set up, which involves upwards of 20-50 dynamically DHCP-assigned IP addresses.

2) 找出一种方法来强制 Linux 自己默认将主机名分配给它的 DHCP IP 地址.这当然是更优雅的解决方案,但我不知道如何做到这一点.有人知道吗?

2) Figure out a way to force Linux itself to assign the hostname to its DHCP IP address by default. This is certainly the more graceful solution, but I have no idea how to do this. Anyone know?

3) 查找并使用可用作 Live CD 的 Linux 发行版,该发行版默认情况下不会将其主机名映射到 127.0.0.1.有人知道吗?

3) Find and use a Linux distro available as a Live CD that doesn't map its hostname to 127.0.0.1 by default. Anyone know one?

4) 深入研究 JMeter 的代码并开始拉扯电线,但如果涉及到这一点,我会尽快使用另一个具有更精简功能集的开源工具,但其分布式架构不会受到此问题的影响.

4) Dive into JMeter's code and start yanking wires, but if it comes to this, I'd just as soon use another open source tool with a slimmer feature set, but whose distributed architecture doesn't suffer from this issue.

如果有人有任何建议,我将不胜感激.谢谢!

If anyone has any advice, I'd be grateful. Thanks!

推荐答案

在最新版本中,您可以通过以下方式运行您的脚本:

In latest version, you can run your script with:

./jmeter-server -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx

将xxx.xxx.xxx.xxx替换为此服务器的IP地址,即控制jmeter机器将用于连接到该服务器的IP地址.

Replace xxx.xxx.xxx.xxx with this server's IP address, i.e., the IP address that the controlling jmeter machine will use to connect to this server.

这篇关于JMeter - 在 Linux 上启动 jmeter-server 时出现环回地址错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆