Docker: Unexpected Result From API on Login

When I try to run HAss Docker image linked to MariaDB image, I get this error on login (with or without password in config): “Unexpected Result From API”.

Here is the command line:
docker run -d --name=“home-assistant” --restart=unless-stopped --device=/dev/zwave:/dev/zwave:rwm -v /home/hass:/config -v /etc/localtime:/etc/localtime:ro --link mariadb:mysql -p 1883:1883 -p 8123:8123 homeassistant/home-assistant

When I run HAss image with –net=host, it works fine, but I can’t use MariaDB from the other image.

Thanks!

First verify mariaDB is connecting from inside Ha
Next, verify you are using correct ip address for MariaDB

Using --net=host you affectively make HA port and ip same as host machine.
When you replace that with --link HA sees MariaDB on another ip(172.17.0.somethinglikethis)

I imagine your config is pointing to your normal network ip for MariaDB. This is why --net=host works.
You need to know what the container internal networking has MariaDB set to.

The error means HA is not receiving the expected response from the server when using the supplied api…aka…HA can’t communicate with server.