Problem when using yugabyte with persistence volume in docker. On first run everything work fine, but when re-create container with existing volume, it fail to start:
master.err :
./../src/yb/master/master_main.cc:131] Network error (yb/util/net/socket.cc:325): Error binding socket to 172.28.0.3:7100: Cannot assign requested address (system error 99)
@ 0x2938618 google::LogMessage::SendToLog()
@ 0x29394d3 google::LogMessage::Flush()
@ 0x29399cf google::LogMessageFatal::~LogMessageFatal()
@ 0x2677cde main
@ 0x7fb112f46825 __libc_start_main
@ 0x260802e _start (edited)
There is a yugabyted.conf in yb-data/conf with the ip is written there When we re-create container the container will get new ip but the ip in yugabyted.conf is old ip address of container
...
"advertise_address": "172.28.0.3",
...
When starting with
yugabyted, the directory set by--base_dirholds the configuration inconf/yugabyted.conf, and the data directory indatawhich is set by--fs_data_dirswhen startingyb-masterandyb-tserver.If you want the data directory in the volume but not the configuration, you can set it with:
and leave --base_dir within the container
Another possibility if you want the configuration in the external volume is to use a configuration that is not dependent on container addresses, like with:
which will listen on all interfaces