lhw455

Members
  • Posts

    21
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

lhw455's Achievements

Noob

Noob (1/14)

0

Reputation

  1. This please :-P This extra pretty please :-)
  2. Any updates on this? HASS is now 022.1, this is a couple versions behind?
  3. Thanks, I did some more research on having the docker image and config files on the cache drive, and it's definitely the way I want to stay. But don't change your docker just for me! I just thought I'd try and help with troubleshooting as I'm sure there must be others who have a similar setup as me and maybe want the MQTT docker.
  4. I tried the new one, same error as the old docker unfortunately. Tried experimenting a little bit more, what I found is that if I invoke the docker at the command line with different PGID and PUID I can read the config file fine, however it then complains that it can't find user mosquitto. Don't know if that helps with troubleshoting at all.
  5. Would it be possible to use the built-in MQTT server in Home Assistant on this Docker? I've tried, but am getting an error. 16-04-23 06:54:50 homeassistant.bootstrap: Error during setup of component logger Traceback (most recent call last): File "/usr/src/app/homeassistant/bootstrap.py", line 158, in _setup_component if not component.setup(hass, config): File "/usr/src/app/homeassistant/components/logger.py", line 64, in setup for key, value in config.get(DOMAIN)[LOGGER_LOGS].items(): AttributeError: 'NoneType' object has no attribute 'items' 16-04-23 06:54:51 homeassistant.components.mqtt.server: Error initializing MQTT server Traceback (most recent call last): File "/usr/local/lib/python3.4/site-packages/hbmqtt/broker.py", line 184, in _build_listeners_config listeners_config = broker_config['listeners'] KeyError: 'listeners' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/app/homeassistant/components/mqtt/server.py", line 53, in start loop.run_until_complete(start_server) File "/usr/local/lib/python3.4/asyncio/base_events.py", line 325, in run_until_complete self.run_forever() File "/usr/local/lib/python3.4/asyncio/base_events.py", line 295, in run_forever self._run_once() File "/usr/local/lib/python3.4/asyncio/base_events.py", line 1254, in _run_once handle._run() File "/usr/local/lib/python3.4/asyncio/events.py", line 125, in _run self._callback(*self._args) File "/usr/local/lib/python3.4/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/usr/src/app/homeassistant/components/mqtt/server.py", line 23, in broker_coro broker = Broker(config, loop) File "/usr/local/lib/python3.4/site-packages/hbmqtt/broker.py", line 156, in __init__ self._build_listeners_config(self.config) File "/usr/local/lib/python3.4/site-packages/hbmqtt/broker.py", line 191, in _build_listeners_config raise BrokerException("Listener config not found invalid: %s" % ke) hbmqtt.broker.BrokerException: Listener config not found invalid: 'listeners' 16-04-23 06:54:51 homeassistant.components.mqtt: Unable to start broker and auto-configure MQTT. 16-04-23 06:54:51 homeassistant.bootstrap: component mqtt failed to initialize 16-04-23 06:54:51 asyncio: Task exception was never retrieved future: <Task finished coro=<broker_coro() done, defined at /usr/src/app/homeassistant/components/mqtt/server.py:19> exception=BrokerException("Listener config not found invalid: 'listeners'",)> Traceback (most recent call last): File "/usr/local/lib/python3.4/site-packages/hbmqtt/broker.py", line 184, in _build_listeners_config listeners_config = broker_config['listeners'] KeyError: 'listeners' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/app/homeassistant/components/mqtt/server.py", line 53, in start loop.run_until_complete(start_server) File "/usr/local/lib/python3.4/asyncio/base_events.py", line 325, in run_until_complete self.run_forever() File "/usr/local/lib/python3.4/asyncio/base_events.py", line 295, in run_forever self._run_once() File "/usr/local/lib/python3.4/asyncio/base_events.py", line 1254, in _run_once handle._run() File "/usr/local/lib/python3.4/asyncio/events.py", line 125, in _run self._callback(*self._args) File "/usr/local/lib/python3.4/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/usr/src/app/homeassistant/components/mqtt/server.py", line 23, in broker_coro broker = Broker(config, loop) File "/usr/local/lib/python3.4/site-packages/hbmqtt/broker.py", line 156, in __init__ self._build_listeners_config(self.config) File "/usr/local/lib/python3.4/site-packages/hbmqtt/broker.py", line 191, in _build_listeners_config raise BrokerException("Listener config not found invalid: %s" % ke) hbmqtt.broker.BrokerException: Listener config not found invalid: 'listeners' 16-04-23 06:54:52 homeassistant.components.recorder: Found unfinished sessions
  6. Oh, and is there a way I can see the code behind the docker? I'm not a coder, but I can maybe try and help troubleshoot? *edit* some detective work (well for me anyway) and I've found the following code from your Github FROM debian:stable MAINTAINER Thomas Kerpe <[email protected]> RUN apt-get update RUN apt-get upgrade -y RUN apt-get install -y wget RUN wget -O - http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key | apt-key add - RUN wget -O /etc/apt/sources.list.d/mosquitto-repo.list http://repo.mosquitto.org/debian/mosquitto-repo.list RUN apt-get update && apt-get install -y mosquitto RUN adduser --system --disabled-password --disabled-login mosquitto COPY config /mqtt/config VOLUME ["/mqtt/config", "/mqtt/data", "/mqtt/log"] EXPOSE 1883 CMD /usr/sbin/mosquitto -c /mqtt/config/mosquitto.conf It appears from my (admittedly newbie) logic that a user called moquitto gets added to the docker file and then the service runs as that user? Following that, maybe that user dosen't have the right permissions? I looked through some other Docker examples and it appears that this may not be needed i.e. just let the docker run as the default user? Alternatively, I noticed from here (https://github.com/toke/docker-mosquitto/blob/master/Dockerfile) that this is the Dockerfile: FROM debian:jessie MAINTAINER Thomas Kerpe <[email protected]> RUN apt-get update && apt-get install -y wget && \ wget -q -O - https://repo.mosquitto.org/debian/mosquitto-repo.gpg.key | apt-key add - && \ wget -q -O /etc/apt/sources.list.d/mosquitto-jessie.list https://repo.mosquitto.org/debian/mosquitto-jessie.list && \ apt-get update && apt-get install -y mosquitto && \ adduser --system --disabled-password --disabled-login mosquitto RUN mkdir -p /mqtt/config /mqtt/data /mqtt/log COPY config /mqtt/config RUN chown -R mosquitto:mosquitto /mqtt VOLUME ["/mqtt/config", "/mqtt/data", "/mqtt/log"] EXPOSE 1883 9001 CMD /usr/sbin/mosquitto -c /mqtt/config/mosquitto.conf So maybe we need the mosqitto user to own the files in the docker image? Apologies if I'm completely off-base here!
  7. Thanks, the client ID error is because I used the default config which dosen't allow anon connections and I was trying without a username and password. I didn't even check past that point because I could clearly see that in the new location it's picking up the config file, but I can test it further if you like.
  8. OK, so it's definitely something to do with the cache drive, apologies I misread your earlier suggestion and tried it on a user defined share docker run -t -i --net="bridge" -p 1883:1883/tcp -p 9001:9001 -v /mnt/user/Music/app_config/mqtt/:/config:rw -e PGID=100 -e PUID=99 spants/mqtt *** Running /etc/my_init.d/60_update_apps.sh... (Reading database ... 13828 files and directories currently installed.) Preparing to unpack .../mosquitto_1.4.8-0mosquitto1_amd64.deb ... invoke-rc.d: policy-rc.d denied execution of stop. Unpacking mosquitto (1.4.8-0mosquitto1) over (1.4.3-0mosquitto1) ... Processing triggers for ureadahead (0.100.0-16) ... Setting up mosquitto (1.4.8-0mosquitto1) ... invoke-rc.d: policy-rc.d denied execution of start. *** Running /etc/my_init.d/80_set_config.sh... *** Running /etc/my_init.d/90_new_user.sh... ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- *** Running /etc/rc.local... *** Booting runit daemon... *** Runit started as PID 153 1460749019: mosquitto version 1.4.8 (build date Sun, 14 Feb 2016 15:48:26 +0000) starting 1460749019: Config loaded from /config/mosquitto.conf. 1460749019: Opening websockets listen socket on port 9001. 1460749019: Opening ipv4 listen socket on port 1883. 1460749019: Opening ipv6 listen socket on port 1883. 1460749019: Warning: Address family not supported by protocol Apr 15 19:36:59 19cd4dfdedb7 syslog-ng[162]: syslog-ng starting up; version='3.5.3' 1460749034: New connection from 192.168.1.52 on port 1883. 1460749034: Socket error on client <unknown>, disconnecting. 1460749034: New connection from 192.168.1.52 on port 1883. 1460749034: Socket error on client <unknown>, disconnecting.
  9. Yes, it appears to reset them upon starting and then it results in the same errors. Not sure, how do I check this? Not at home so I don't know exactly which ones I'm using. Yeah, I was trying to avoid having the disk spinning the majority of the time because of the constant log file writes I would presume this would happen on one of the (non-SSD) array disks. *edit* I'm using the following dockers: binhex/arch-couchpotato:latest binhex/arch-sonarr:latest needo/deluge:latest balloob/home-assistant:latest sdesbure/arch-jackett:latest gfjardim/nzbget:latest linuxserver/smokeping:latest aptalca/docker-zoneminder:latest I think of that list, smokeping is the only one from linuxserver.io, but it's working fine (been running it for several months) *edit2* just tried NZBhydra and it's working fine.
  10. Could be, I store the docker there because I don't want my disks spinning up all the time (cache is an SSD). I'm not that familiar with the difference (other than one is protected and another is not), but all the other ones I run (sanzb, couchpotato, sonarr) all work fine. The weird thing is I'm almost certain it's a permission thing, because when I browse the cache samba share, I can see all the config file for all the other dockers, but the MQTT folder I can't - if I change the permissions it's fine, but the config file still can't be read. Very strange.
  11. Exactly the same thing! root@NAS:~# docker run -t -i --net="bridge" -p 1883:1883/tcp -p 9001:9001 -v /mnt/cache/app_config/mqtt/:/config:rw -e PGID=100 -e PUID=99 spants/mqtt *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh... *** Running /etc/my_init.d/10_add_user_abc.sh... ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- *** Running /etc/my_init.d/60_update_apps.sh... (Reading database ... 13828 files and directories currently installed.) Preparing to unpack .../mosquitto_1.4.8-0mosquitto1_amd64.deb ... invoke-rc.d: policy-rc.d denied execution of stop. Unpacking mosquitto (1.4.8-0mosquitto1) over (1.4.3-0mosquitto1) ... Processing triggers for ureadahead (0.100.0-16) ... Setting up mosquitto (1.4.8-0mosquitto1) ... invoke-rc.d: policy-rc.d denied execution of start. *** Running /etc/my_init.d/80_set_config.sh... *** Running /etc/my_init.d/90_new_user.sh... ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- *** Running /etc/rc.local... *** Booting runit daemon... *** Runit started as PID 152 Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32764. Error: Unable to open configuration file. Apr 15 05:39:08 33c998692a79 syslog-ng[161]: syslog-ng starting up; version='3.5.3' Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32767. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32764. Error: Unable to open configuration file. ^C*** Shutting down runit daemon (PID 152)...
  12. OK, so using the command to manually start MQTT, I now get the following: (Reading database ... 13828 files and directories currently installed.) Preparing to unpack .../mosquitto_1.4.8-0mosquitto1_amd64.deb ... invoke-rc.d: policy-rc.d denied execution of stop. Unpacking mosquitto (1.4.8-0mosquitto1) over (1.4.3-0mosquitto1) ... Processing triggers for ureadahead (0.100.0-16) ... Setting up mosquitto (1.4.8-0mosquitto1) ... invoke-rc.d: policy-rc.d denied execution of start. *** Running /etc/my_init.d/80_set_config.sh... *** Running /etc/my_init.d/90_new_user.sh... ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- *** Running /etc/rc.local... *** Booting runit daemon... *** Runit started as PID 149 Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32765. Error: Unable to open configuration file. Apr 14 19:40:30 2172ea95af13 syslog-ng[156]: syslog-ng starting up; version='3.5.3' Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32765. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32767. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32766. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32765. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32767. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32764. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32765. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32766. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32764. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32764. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32766. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32766. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32764. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32766. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32764. Error: Unable to open configuration file. Error: Unable to open config file /config/mosquitto.conf Error found at /config/mosquitto.conf:32764. Error: Unable to open configuration file. So it looks like a permissioning issue. My cache drive is owned by nobody:users, is this correct? *edit* uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),281(docker) Those are my uid's it seems I don't have the uid of 99? *edit2* I see a user above had a similar problem? I've been unable to get it working thus far.
  13. Hi, I'm struggling to get the MQTT docker image up. I've set it up as follows. On setup /config/ to point /mnt/cache/docker/appdate/mqtt/config - only problem is when I browse to that directory I can't see the files for some reason, but when using midnight commander via SSH I can see and edit the files. So I tried editing the config file to allow anonymous connections, but I still don't have any luck when connecting via MQTT Spy. Any ideas? *edit* this is what the log file in docker shows me - the message from MQTT spy is connection refused ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- (Reading database ... 13828 files and directories currently installed.) Preparing to unpack .../mosquitto_1.4.8-0mosquitto1_amd64.deb ... Unpacking mosquitto (1.4.8-0mosquitto1) over (1.4.3-0mosquitto1) ... Processing triggers for ureadahead (0.100.0-16) ... Setting up mosquitto (1.4.8-0mosquitto1) ... ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- Apr 13 22:31:09 6f2cae203645 syslog-ng[161]: syslog-ng starting up; version='3.5.3' Apr 13 22:31:21 6f2cae203645 syslog-ng[161]: syslog-ng shutting down; version='3.5.3' ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- Apr 13 22:31:31 6f2cae203645 syslog-ng[62]: syslog-ng starting up; version='3.5.3' ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- Apr 13 22:31:52 6f2cae203645 syslog-ng[66]: syslog-ng starting up; version='3.5.3' ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 ----------------------------------- ----------------------------------- GID/UID ----------------------------------- User uid: 99 User gid: 100 -----------------------------------
  14. Thanks, I've discovered Home Assistant, so I've giving that a try on my Unraid box and leaving Openhab where it currently is on the Raspberry pi!