I have done clean installation of Raspberry Pi OS, Weewx (APT method) and WeeWX-MQTTSubscribe. Before installing MQTTSubscribe everything was going without problems (no errors in weewx.log). But after install of MQTTSubscribe, when trying to restart Weewx, I still got the message in the log:
Jul 27 09:52:19 pogoda weewx[3676]: Stopping weewx weather system: weewx not running....
Jul 27 09:52:20 pogoda weewx[3698] INFO main: Initializing weewx version 4.1.1
Jul 27 09:52:20 pogoda weewx[3698] INFO main: Using Python 3.7.3 (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0]
Jul 27 09:52:20 pogoda weewx[3698] INFO main: Platform Linux-5.4.51-v7+-armv7l-with-debian-10.4
Jul 27 09:52:20 pogoda weewx[3698] INFO main: Locale is 'en_US.UTF-8'
Jul 27 09:52:20 pogoda weewx[3698] INFO main: PID file is /var/run/weewx.pid
Jul 27 09:52:20 pogoda weewx[3702] INFO main: Using configuration file /etc/weewx/weewx.conf
Jul 27 09:52:20 pogoda weewx[3702] INFO main: Debug is 0
Jul 27 09:52:20 pogoda weewx[3702] INFO weewx.engine: Loading station type MQTTSubscribeDriver (user.MQTTSubscribe)
Jul 27 09:52:20 pogoda weewx[3686]: Starting weewx weather system: weewx.
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Version is 1.6.1
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Log level: 0
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Log debug setting: 0
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Log console: None
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Log file: None
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) overlap is 0.0
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) message_callback_provider_name is user.MQTTSubscribe.MessageCallbackProvider
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) clientid is MQTTSubscribe-5908
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) client_session is True
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) host is localhost
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) port is 1883
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) keepalive is 60
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) username is None
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) password is set
Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Archive topic is None
Jul 27 09:52:20 pogoda weewx[3702] ERROR weewx.engine: Import of driver failed: [Errno 111] Connection refused (<class 'ConnectionRefusedError'>)
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: Traceback (most recent call last):
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/share/weewx/weewx/engine.py", line 103, in setupStation
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: self.console = loader_function(config_dict, self)
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/share/weewx/user/MQTTSubscribe.py", line 1521, in loader
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: ** return MQTTSubscribeDriver(config_dict[DRIVER_NAME])
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/share/weewx/user/MQTTSubscribe.py", line 1542, in init
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: self.subscriber = MQTTSubscribe(stn_dict, self.logger)
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/share/weewx/user/MQTTSubscribe.py", line 1324, in init
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: self.client.connect(host, port, keepalive)
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 937, in connect
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: return self.reconnect()
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1071, in reconnect
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: sock = self._create_socket_connection()
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/lib/python3.7/socket.py", line 727, in create_connection
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: raise err
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/lib/python3.7/socket.py", line 716, in create_connection
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: sock.connect(sa)
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: ConnectionRefusedError: [Errno 111] Connection refused
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL main: Unable to load driver: [Errno 111] Connection refused
Jul 27 09:52:20 pogoda weewx[3702] CRITICAL main: Exiting...
What is going on? I don't understand which connection is refused. MQTTSubscribe looks good in the logfile.
I have done clean installation of Raspberry Pi OS, Weewx (APT method) and WeeWX-MQTTSubscribe. Before installing MQTTSubscribe everything was going without problems (no errors in weewx.log). But after install of MQTTSubscribe, when trying to restart Weewx, I still got the message in the log:
Jul 27 09:52:19 pogoda weewx[3676]: Stopping weewx weather system: weewx not running.... Jul 27 09:52:20 pogoda weewx[3698] INFO main: Initializing weewx version 4.1.1 Jul 27 09:52:20 pogoda weewx[3698] INFO main: Using Python 3.7.3 (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0] Jul 27 09:52:20 pogoda weewx[3698] INFO main: Platform Linux-5.4.51-v7+-armv7l-with-debian-10.4 Jul 27 09:52:20 pogoda weewx[3698] INFO main: Locale is 'en_US.UTF-8' Jul 27 09:52:20 pogoda weewx[3698] INFO main: PID file is /var/run/weewx.pid Jul 27 09:52:20 pogoda weewx[3702] INFO main: Using configuration file /etc/weewx/weewx.conf Jul 27 09:52:20 pogoda weewx[3702] INFO main: Debug is 0 Jul 27 09:52:20 pogoda weewx[3702] INFO weewx.engine: Loading station type MQTTSubscribeDriver (user.MQTTSubscribe) Jul 27 09:52:20 pogoda weewx[3686]: Starting weewx weather system: weewx. Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Version is 1.6.1 Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Log level: 0 Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Log debug setting: 0 Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Log console: None Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Log file: None Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) overlap is 0.0 Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) message_callback_provider_name is user.MQTTSubscribe.MessageCallbackProvider Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) clientid is MQTTSubscribe-5908 Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) client_session is True Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) host is localhost Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) port is 1883 Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) keepalive is 60 Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) username is None Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) password is set Jul 27 09:52:20 pogoda weewx[3702] INFO user.MQTTSubscribe: (Driver) Archive topic is None Jul 27 09:52:20 pogoda weewx[3702] ERROR weewx.engine: Import of driver failed: [Errno 111] Connection refused (<class 'ConnectionRefusedError'>) Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: Traceback (most recent call last): Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/share/weewx/weewx/engine.py", line 103, in setupStation Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: self.console = loader_function(config_dict, self) Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/share/weewx/user/MQTTSubscribe.py", line 1521, in loader Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: ** return MQTTSubscribeDriver(config_dict[DRIVER_NAME]) Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/share/weewx/user/MQTTSubscribe.py", line 1542, in init Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: self.subscriber = MQTTSubscribe(stn_dict, self.logger) Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/share/weewx/user/MQTTSubscribe.py", line 1324, in init Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: self.client.connect(host, port, keepalive) Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 937, in connect Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: return self.reconnect() Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1071, in reconnect Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: sock = self._create_socket_connection() Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: return socket.create_connection(addr, source_address=source, timeout=self._keepalive) Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/lib/python3.7/socket.py", line 727, in create_connection Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: raise err Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: File "/usr/lib/python3.7/socket.py", line 716, in create_connection Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: sock.connect(sa) Jul 27 09:52:20 pogoda weewx[3702] CRITICAL weewx.engine: ConnectionRefusedError: [Errno 111] Connection refused Jul 27 09:52:20 pogoda weewx[3702] CRITICAL main: Unable to load driver: [Errno 111] Connection refused Jul 27 09:52:20 pogoda weewx[3702] CRITICAL main: Exiting...
What is going on? I don't understand which connection is refused. MQTTSubscribe looks good in the logfile.