Open devlie opened 2 years ago
I noticed running hostname -i
would return the loopback address sometimes, but I haven't seen ifconfig eth0
fail to get a good IP address yet. Try adding the below -Djava.rmi.server.hostname
snippet to your "jmeter_workers" commands
section in main.tf
/entrypoint.sh -s -J server.rmi.ssl.disable=true -Djava.rmi.server.hostname=$(ifconfig eth0 | grep 'inet addr:' | awk '{gsub(\"addr:\", \"\"); print $2}')
It will grep for the "inet addr:" line and pull just the IP address out of it, then pass it to jmeter using the workaround from the link you shared. It's not a perfect fix since each system may have different ifconfig
output, but in this container we should get the same results.
@dagrooms52 Thanks for the tip! Works like a charm.
Using the docker image from the example as is, I would often hit the below error when starting worker. It's bizarre since the whole point of container is it's supposed to run the same way every time 🤷.
According to this SO post, it's an issue JMeter patched back in 2010. The workaround is to specify java.rmi.server.hostname, but we can't know the IP until we start the instance, and ACI doesn't support static IP for instances.
Has anybody hit this issue and is aware of a resolution? Thanks.