Cannot assign requested address

Hi,

I am on CentOS, and this is the Linux tuning I use:

echo “Linux Tuning”
sudo sh -c “printf ‘* soft nofile 65535 \n* hard nofile 65535’ >> /etc/security/limits.conf”
sudo sh -c “printf ‘UseLogin yes’ >> /etc/ssh/sshd_config”

more ports for testing

sudo sysctl -w net.ipv4.ip_local_port_range=“1025 65535”

increase the maximum number of possible open file descriptors:

echo 300000 | sudo tee /proc/sys/fs/nr_open
echo 300000 | sudo tee /proc/sys/fs/file-max

However, I am regularly seeing the error “Cannot assign requested address”. I wondered if there was any more OS tuning I need to do?

Aidy

there’s a few possibilities without the detailed exception,
but likely running out of ephemeral/local ports can you run the following during the issue?

$ netstat -na|grep tcp|awk ‘{print $NF}’|sort|uniq -c|sort -nr

12 TIME_WAIT

7 LISTEN

2 ESTABLISHED

Hi Alex,

I wrapped your commands in an infinite loop. When the problem occurred these stats were printing

25719 TIME_WAIT
55 ESTABLISHED
11 LISTEN
6 FIN_WAIT1
2 SYN_SENT

I’ll print the stack trace to console.

Aidy

Hi Alex,

The exception seems to be coming from Netty:

I have raised it as an issue:

https://github.com/gatling/gatling/issues/2265

Aidy