hassio-addons / addon-tasmoadmin

TasmoAdmin - Home Assistant Community Add-ons
https://addons.community
MIT License
229 stars 32 forks source link

cannot use DNS names #31

Closed vajonam closed 5 years ago

vajonam commented 6 years ago

Problem/Motivation

I cannot specify dns names for my Tasmota devices on my network

Expected behavior

Should be able to use dns or ip address to search for tasmota devices

Actual behavior

can only use IP address

Steps to reproduce

search for a device with dns names, also tried searching from just the container.

$ docker exec -it addon_somehex_sonweb /bin/bash
root@a0d7b954-sonweb:/$ nslookup google.com
nslookup: can't resolve '(null)': Name does not resolve

nslookup: can't resolve 'google.com': Try again
root@a0d7b954-sonweb:/$ nslookup nodemcu_01
nslookup: can't resolve '(null)': Name does not resolve

nslookup: can't resolve 'nodemcu_01': Try again
root@a0d7b954-sonweb:/$ 

Proposed changes

add the ability to specify dns names by either mapping /etc/resolv.conf from the dns hosts or provide it the config.json as section to specify dns

addons-assistant[bot] commented 6 years ago

:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

frenck commented 6 years ago

Please provide the add-on logs.

vajonam commented 6 years ago

Not sure you can see anything from the logs this a name resolution issue. nodemcu_02 resolves fine by the way on my network.

Here is an image.

https://imgur.com/a/doQ2haA

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-tasmoadmin: applying... 
[fix-attrs.d] 01-tasmoadmin: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 

-----------------------------------------------------------
 Hass.io Add-on: TasmoAdmin v0.6.0

 Centrally manage all your Sonoff-Tasmota devices

 From: Community Hass.io Add-ons
 By: Franck Nijhof <frenck@addons.community>
-----------------------------------------------------------
 amd64 / Ubuntu 18.04.1 LTS / HA 0.79.1 / SU 132 / beta
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 

INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 11-nginx.sh: executing... 
[cont-init.d] 11-nginx.sh: exited 0.
[cont-init.d] 12-migrate.sh: executing... 
[cont-init.d] 12-migrate.sh: exited 0.
[cont-init.d] 13-persistent-data.sh: executing... 
[cont-init.d] 13-persistent-data.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Imgur
Imgur
Imgur
addons-assistant[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

frenck commented 5 years ago

@vajonam I totally missed this one! So sorry!

Ubuntu 18.04.1 LTS My guess, is you are running an incorrect version of Docker. Please be sure you are using Docker 18.09.

vajonam commented 5 years ago

Good point, just upgraded my installation to docker-ce,

docker --version

Docker version 18.09.0, build 4d60db4

still seeing the same issue.

When i open a bash into the container.

root@a0d7b954-sonweb:/$ ping 10.1.1.125 PING 10.1.1.125 (10.1.1.125): 56 data bytes 64 bytes from 10.1.1.125: seq=0 ttl=253 time=85.321 ms 64 bytes from 10.1.1.125: seq=1 ttl=253 time=163.802 ms ^C --- 10.1.1.125 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 85.321/124.561/163.802 ms

root@a0d7b954-sonweb:/$ ping shelly1_03 ping: bad address 'shelly1_03'

root@a0d7b954-sonweb:/$ cat /etc/resolv.conf nameserver 127.0.0.11 options ndots:0

On Mon, Dec 10, 2018 at 6:45 AM Franck Nijhof notifications@github.com wrote:

@vajonam https://github.com/vajonam I totally missed this one! So sorry!

Ubuntu 18.04.1 LTS My guess, is you are running an incorrect version of Docker. Please be sure you are using Docker 18.09.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hassio-addons/addon-tasmoadmin/issues/31#issuecomment-445787915, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJTtQqKBrAr8lDNU1VjNP8BqC1yvdPvks5u3klBgaJpZM4XB7eU .

frenck commented 5 years ago

Well the DNS is provided by Hass.io in this case and not in control of the add-on. I would recommend you to open an issue with the Hass.io repository (or check similar issues in the history of the Hass.io repository).

Sorry m8! 😞

vajonam commented 5 years ago

Yes got it thanks, FQDN seems to work okay. i.e. host.domain.com resolves but host does not sort of makes sense. Guess the hassio needs to propagate the search domain to the various addon containers.

On Mon, Dec 10, 2018 at 1:23 PM Franck Nijhof notifications@github.com wrote:

Well the DNS is provided by Hass.io in this case and not in control of the add-on. I would recommend you to open an issue with the Hass.io repository (or check similar issues in the history of the Hass.io repository).

Sorry m8! 😞

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hassio-addons/addon-tasmoadmin/issues/31#issuecomment-445918798, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJTtR8UBoHY6nw9ImQXBc8HmE_O6Tiiks5u3qaQgaJpZM4XB7eU .

vajonam commented 5 years ago

please go ahead and close or invalidate.

addons-assistant[bot] commented 5 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.