Skip to content

[yugabyted] Cannot start container on macOS: Failed to bind to address: 192.168.127.254:7100 #29453

@pasquale95

Description

@pasquale95

Jira Link: DB-19248

Description

Hi,
I'm trying to move to the latest yugabyte image (namely docker.io/yugabytedb/yugabyte:2025.1.2.0-b110), but I'm experiencing errors which makes not possible to run such image on macOS.
I run the following command:

bin/yugabyted start
--base_dir /var/data
--advertise_address host.docker.internal
--master_flags webserver_interface=0.0.0.0,rpc_bind_addresses=0.0.0.0:7100,minloglevel=0,stderrthreshold=0
--master_webserver_port 7001
--master_rpc_port 7100
--tserver_webserver_port 9000
--tserver_rpc_port 9100
--tserver_flags webserver_interface=0.0.0.0,webserver_port=9000,pgsql_proxy_bind_address=0.0.0.0:5435,pgsql_proxy_webserver_port=13000,cql_proxy_bind_address=0.0.0.0:9042,cql_proxy_webserver_port=12000,redis_proxy_bind_address=0.0.0.0:6379,redis_proxy_webserver_port=11000,rpc_bind_addresses=0.0.0.0:9100,minloglevel=0,stderrthreshold=0
--ysql_port 5435
--ycql_port 9042
--callhome false
--fault_tolerance none
--background false
--initial_scripts_dir /var/ybinit
--insecure

This command fails after few seconds with the following error:

Starting yugabyted...
- Starting the YugabyteDB Processes...Failed to bind to address: 192.168.127.254:7100:

If it may help, here also the error stack trace on master.err:

F1122 16:28:26.675769    45 master_main.cc:138] Network error (yb/util/net/socket.cc:326): Error binding socket to 192.168.127.254:7100: Cannot assign requested address (system error 99)
Fatal failure details written to /var/data/data/yb-data/master/logs/yb-master.FATAL.details.2025-11-22T16_28_26.pid45.txt
F20251122 16:28:26 ../../src/yb/master/master_main.cc:138] Network error (yb/util/net/socket.cc:326): Error binding socket to 192.168.127.254:7100: Cannot assign requested address (system error 99)
    @     0xaaaaada6d144  google::LogMessage::SendToLog()
    @     0xaaaaada6e064  google::LogMessage::Flush()
    @     0xaaaaada6e68c  google::LogMessageFatal::~LogMessageFatal()
    @     0xaaaaada1f1b0  main
    @     0xffffaf0ce384  __libc_start_main
    @     0xaaaaad8a5034  (unknown)

The address 192.168.127.254 is the address which resolves host.docker.internal, which is an alias that is used when working with containers on macOS to refer to the IP address of the Linux VM used to run Docker/Podman on macOS.

The problem disappears if I run the container with the following command:

# Note that:
# - all bindings are now to 127.0.0.1 instead of 0.0.0.0
# - I had to remove --advertise_address host.docker.internal
bin/yugabyted start
--base_dir /var/data
--master_flags webserver_interface=127.0.0.1,rpc_bind_addresses=127.0.0.1:7100,minloglevel=0,stderrthreshold=0
--master_webserver_port 7001
--master_rpc_port 7100
--tserver_webserver_port 9000
--tserver_rpc_port 9100
--tserver_flags webserver_interface=127.0.0.1,webserver_port=9000,pgsql_proxy_bind_address=127.0.0.1:5435,pgsql_proxy_webserver_port=13000,cql_proxy_bind_address=127.0.0.1:9042,cql_proxy_webserver_port=12000,redis_proxy_bind_address=127.0.0.1:6379,redis_proxy_webserver_port=11000,rpc_bind_addresses=127.0.0.1:9100,minloglevel=0,stderrthreshold=0
--ysql_port 5435
--ycql_port 9042
--callhome false
--fault_tolerance none
--background false
--initial_scripts_dir /var/ybinit
--insecure

but if I run the container in this way is basically useless, since other services (also running within containers) cannot connect to Yugabyte.

I don't understand why Yugabyte is not able to bind to the VM address. What I can say that is a problem specific to Yugabyte, since other containers bind to 0.0.0.0 (and therefore also to 192.168.127.254) without problems.

The very same command that now fails was working fine with docker.io/yugabytedb/yugabyte:2.20.7.0-b58 on macOS.

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ecosystemLabel for all ecosystem related projectsarea/ybdyugabyted project related Github tickets.kind/enhancementThis is an enhancement of an existing featurepriority/mediumMedium priority issuestatus/awaiting-triageIssue awaiting triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions