Starting v.0.40 problem with mqtt configuration

originally i have version 0.39.3 and no problem.
i upgrade to v 0.40 and has this mqtt config error.
upgrade to v.0.40.1 also still have this issue.
am i missing something?

17-03-17 12:19:12 ERROR (MainThread) [homeassistant.setup] Error during setup of component mqtt
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/setup.py", line 184, in _async_setup_component
    result = yield from component.async_setup(hass, processed_config)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/mqtt/__init__.py", line 338, in async_setup
    success = yield from hass.data[DATA_MQTT].async_connect()
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/mqtt/__init__.py", line 446, in async_connect
    None, self._mqttc.connect, self.broker, self.port, self.keepalive)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/root/.homeassistant/deps/paho/mqtt/client.py", line 686, in connect
    return self.reconnect()
  File "/root/.homeassistant/deps/paho/mqtt/client.py", line 821, in reconnect
    ciphers=self._tls_ciphers)
  File "/usr/lib/python3.4/ssl.py", line 887, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python3.4/ssl.py", line 577, in __init__
    self.do_handshake()
  File "/usr/lib/python3.4/ssl.py", line 804, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
17-03-17 12:19:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service_data=title=Invalid config, message=The following components and platforms could not be set up:
* [mqtt](https://home-assistant.io/components/mqtt/)
Please check your config, notification_id=invalid_config, service_call_id=3052638192-1, service=create>
17-03-17 12:19:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state persistent_notification.invalid_config=The following components and platforms could not be set up:
* [mqtt](https://home-assistant.io/components/mqtt/)
Please check your config; title=Invalid config @ 2017-03-17T12:19:12.444652-07:00>, entity_id=persistent_notification.invalid_config, old_state=None>

configuration.yaml

# MQTT server
mqtt: !include mqtt.yaml

mqtt.yaml

broker: localhost
port: 8883
client_id: home-assistant-1
keepalive: 60
username: home
password: xxxx
#certificate: /etc/mosquitto/conf.d/ca.crt
#client_key: /etc/mosquitto/conf.d/ca.key
#client_cert: /etc/mosquitto/conf.d/ca.crt
protocol: 3.1
1 Like

Maybe related to this?

I don’t use mqtt message, but i use for owntrack

tracker.yaml

- platform: owntracks
#  max_gps_accuracy: 150
  waypoints: True
  waypoint_whitelist:
    - samsung
    - iphone5s
    - iphone7p

Or maybe missing broker adress in config?
broker: 127.0.0.1

has already
broker : localhost

That missed in your first post.
Sorry, then i give up for now.

Like I said, it was OK in v.0.39.3 but problem starts v.0.40
Anyway, thank you for looking into it

Hey, you had the same problem last year! :slight_smile:

it’s different problem
last year problem due to SSL enable
but since then i disable SSL
you can see SSL certificates have been commented out also in mqtt.yaml

Your port is still set to 8883. For unencrypted connections, this is normally 1883. Is it possible that your broker is now listening on its normal port?

mosquitto.conf

allow_anonymous false
autosave_interval 1800

connection_messages true
log_dest stderr
log_dest topic
log_type error
log_type warning
log_type notice
log_type information
log_type all
log_type debug
log_timestamp true

#message_size_limit 10240

password_file /etc/mosquitto/passwd
#acl_file jp.acl

persistence true
persistence_file mosquitto.db
persistent_client_expiration 1m

#pid_file xxxx

retained_persistence true

#listener 1883
#listener 1883 127.0.0.1

listener 8883
#bind_address localhost
#tls_version tlsv1
#cafile /etc/mosquitto/conf.d/ca.crt
#certfile /etc/mosquitto/conf.d/localhost.crt
#keyfile /etc/mosquitto/conf.d/localhost.key
#require_certificate false
#use_identity_as_username false

@dony71, i think the port might be the problem.

This line seems significant

 It seems that it is no longer allowed to use the default SSL port (8883) without actually using SSL.

Can you try changing your port back to 1883 to see if that fixes it?

Yeahh … change port to 1883 fix the issue
Thank you for your support

after upgrade is OK, however if I restart homeassistant then I got tons of error
only working 1st time upgrade … strange … any idea?

root@RetrOrangePi:~/.homeassistant# cat home-assistant.log | grep ERROR
17-03-20 23:46:31 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.http. Make sure all dependencies are installed
17-03-20 23:46:31 ERROR (MainThread) [homeassistant.loader] Unable to find component http
17-03-20 23:46:31 ERROR (MainThread) [homeassistant.setup] Setup failed for http: Component not found.
17-03-20 23:46:31 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.device_tracker. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component device_tracker
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.setup] Setup failed for device_tracker: Component not found.
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.history. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component history
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Component not found.
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.media_player. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component media_player
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.setup] Setup failed for media_player: Component not found.
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.logbook. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component logbook
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Component not found.
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.automation. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component automation
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.setup] Setup failed for automation: Component not found.
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.device_tracker. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component device_tracker
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading proximity dependency: device_tracker
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.setup] Setup failed for proximity: Unable to resolve component or dependencies.
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.camera. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component camera
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.setup] Setup failed for camera: Component not found.
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.frontend. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component frontend
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Component not found.
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.notify.html5. Make sure all dependencies are installed
17-03-20 23:46:32 ERROR (MainThread) [homeassistant.loader] Unable to find component notify.html5
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.scene.homeassistant. Make sure all dependencies are installed
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Unable to find component scene.homeassistant
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform scene.homeassistant: Platform not found.
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.scene.homeassistant. Make sure all dependencies are installed
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Unable to find component scene.homeassistant
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform scene.homeassistant: Platform not found.
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.scene.homeassistant. Make sure all dependencies are installed
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Unable to find component scene.homeassistant
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform scene.homeassistant: Platform not found.
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.scene.homeassistant. Make sure all dependencies are installed
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Unable to find component scene.homeassistant
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform scene.homeassistant: Platform not found.
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.scene.homeassistant. Make sure all dependencies are installed
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.loader] Unable to find component scene.homeassistant
17-03-20 23:46:33 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform scene.homeassistant: Platform not found.
17-03-20 23:46:34 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.scene.homeassistant. Make sure all dependencies are installed
17-03-20 23:46:34 ERROR (MainThread) [homeassistant.loader] Unable to find component scene.homeassistant
17-03-20 23:46:34 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform scene.homeassistant: Platform not found.
17-03-20 23:47:20 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.light. Make sure all dependencies are installed
17-03-20 23:47:20 ERROR (MainThread) [homeassistant.loader] Unable to find component light
17-03-20 23:47:20 ERROR (MainThread) [homeassistant.setup] Setup failed for light: Component not found.

I think this is a replica of this thread

which is related to this bug

totally broken, even going back to 39.3 still have same issue
stuck now, cannot use my homeassistant :frowning:

How are you starting/restarting HA?

Hi all,

I decided yesterday to upgrade HA from 38.4 to 40.0 but it gives an error:

17-03-22 07:34:51 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.input_slider. Make sure all dependencies are installed

–> this error is random but it is always complaining about the dependencies and a reinstall to 38.3 or 38.4 did not work after a :

sudo service hass-daemon restart or sudo reboot

Please advice :slight_smile:

I guess same like this issue below
Restarting HA won’t help either
Just need to wait community to fix this issue