In some cases jmeter-server process cannot start because it cannot bind itself to a correct IP address, throwing "Server Failed To Start: Java.rmi.RemoteException: Cannot Start ..." exception. This issue often happens on Amazon EC2 instances. But there is a simple and straightforward solution. You just need to modify your jmeter-server shell script:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public_ip=$(curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//') | |
RMI_HOST_DEF=-Djava.rmi.server.hostname=$public_ip | |
${DIRNAME}/jmeter ${RMI_HOST_DEF} -Dserver_port=${SERVER_PORT:-1099} -s -j jmeter-server.log "$@" |