Closed Fedora7 closed 2 years ago
cant reproduce may be some additional info ? @Fedora7
After more investigations, I found that my compiler Clang 's io_uring option is turned on. Since ubuntu 22.04 is the first version that io_uring is supported by default. This compile option caused problem that the port is not released after remote control code stop. So this is not a bug of cartridge code.
ubuntu 22.04 x86 + tarantool 2.10.2 + cartridge 9/13/2022 git commit 56bbc13a07b74bfbd703e347d7c550fbbd776978
The following are the log message after running "cartridge start" (cartridge cli version 2.12.2). It showed the tcp_server socket for remote_control was closed: "Remote control stopped".
But when cartridge tried to listen to the same port (from advertise_uri in instances.yml) and use it for tarantool binary protocol communication, it found the port is not released to OS. "netstat -anptu" showed that the port was still in "LISTEN" state. Only after kill -9 pid on the tarantool process, the port was fully released and no long showed in the output of " "netstat -anptu".
Changing listening ip address to 192.168.. or 10.0., or 0.0.0.0 doesn't help.
022-09-22 21:37:11.611 [338676] main/113/checkpoint_daemon I> scheduled next checkpoint for Thu Sep 22 23:27:43 2022 2022-09-22 21:37:11.611 [338676] main/118/guard of feedback_daemon I> fiber exit! 2022-09-22 21:37:11.613 [338676] main/120/guard of feedback_daemon I> fiber exit! 2022-09-22 21:37:11.615 [338676] main/110/lua I> set 'log_format' configuration option to "plain" 2022-09-22 21:37:11.615 [338676] main/122/guard of feedback_daemon I> fiber exit! 2022-09-22 21:37:11.616 [338676] main/110/lua I> set 'read_only' configuration option to true 2022-09-22 21:37:11.617 [338676] main/110/lua I> Making sure user "admin" exists... 2022-09-22 21:37:11.617 [338676] main/110/lua I> Remote control stopped 2022-09-22 21:37:11.618 [338676] main/109/remote_control/0.0.0.0:3401 I> stopped 2022-09-22 21:37:11.618 [338676] main/110/lua evio.c:372 E> tx_binary: failed to bind on 0.0.0.0:3401: bind, called on fd 17, aka 0.0.0.0:0: Address already in use 2022-09-22 21:37:11.618 [338676] main/110/lua I> tx_binary: stopped