Giter Club home page Giter Club logo

Comments (8)

carldebilly avatar carldebilly commented on June 12, 2024 2

That's a docker limitation, not a problem with Zigbee2Mqtt.

When using the address 127.0.0.1, you're resolving this in your container namespace, not on the host itself, which is elsewhere.

You can name your containers using --hostname mqttserver and use this name instead to read your MQTT server.

from zigbee2mqttassistant.

philhawthorne avatar philhawthorne commented on June 12, 2024 1

Hmm don't think this should be closed. This is still very much a limitation of this container.

Your solution requires me to go ahead and update all of my other containers and internal DNS, because I can't use the host network with this container. The only reason I can't use the host network, is because I can't change the HTTP port from 80 to something else.

Unfortunately Docker runs on many types of systems. And sometimes there are reasons why assigning a hostname to a container can't work (one of those is when the MQTT container is using the host network for another reason entirely)

So for now the "fix" is to go ahead and update all my other Docker containers to point to the MQTT hostname. Seems quite the wrong way to do it.

from zigbee2mqttassistant.

philhawthorne avatar philhawthorne commented on June 12, 2024 1

That did it!

Thanks

from zigbee2mqttassistant.

krasnoukhov avatar krasnoukhov commented on June 12, 2024

It worked for me when I gave it the "public" ip of the host that's running mqtt. For example: Z2MA_SETTINGS__MQTTSERVER=192.168.1.2

from zigbee2mqttassistant.

carldebilly avatar carldebilly commented on June 12, 2024

That's odd.

No tests has been done right now with --net=host because it's not required by this software to have a direct access to your network.

Let's me try it on my side.

I'm glad it's working on Synology NAS ;-). What is the CPU architecture ? Intel or ARM ?

from zigbee2mqttassistant.

carldebilly avatar carldebilly commented on June 12, 2024

@philhawthorne Did you try with latest version, now using the alpine images?

from zigbee2mqttassistant.

philhawthorne avatar philhawthorne commented on June 12, 2024

@carldebilly is it possible to change the HTTP port this service is exposed on from something other than 80?

Right now I can't use --net=host for this container because port 80 is used by the Synology Admin Panel. If I can tel this service to be exposed on another port, then I can use --net=host to expose this to my network, and not conflict with Synology.

from zigbee2mqttassistant.

carldebilly avatar carldebilly commented on June 12, 2024

Yep it is possible. As described in another issue #67, you can use the following method:

To set port tcp/5000 for http, use the following environment variable:

ASPNETCORE_URLS=http://*:5000

Please close the issue if it fixes your problem :-).

from zigbee2mqttassistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.