Core: Unifi spams the log

Created on 12 May 2017  Â·  38Comments  Â·  Source: home-assistant/core

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
$ /srv/homeassistant/bin/hass --version
0.44.1

Python release (python3 --version):
$ python3 --version
Python 3.4.2

Component/platform:
$ cat /etc/debian_version
8.0
$ uname -a
Linux hassbian 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux

Description of problem:

2017-05-11 17:53:22 WARNING (Thread-5) [py.warnings] /srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

2017-05-11 17:53:23 WARNING (Thread-5) [py.warnings] /srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

2017-05-11 17:53:23 WARNING (Thread-11) [py.warnings] /srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

2017-05-11 17:53:36 WARNING (Thread-1) [py.warnings] /srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

2017-05-11 17:53:49 WARNING (Thread-4) [py.warnings] /srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

Expected:
None of this in the logs

Problem-relevant configuration.yaml entries and steps to reproduce:

- alias: 'Update Available Notifications'
  trigger:
    platform: state
    entity_id: updater.updater
  action:
    service: notify.pushover
    data:
      message: 'Update for Home Assistant is available.'


    1. 2.
  1. 3.

Traceback (if applicable):


Additional info:

unifi

Most helpful comment

@hnnweb This is being actively worked on. I hope to have an update in the next release.

All 38 comments

Modify your config to only display errors and exclude warnings:

logger:
  default: error

Thats like painting over rust on your car.

The errors link to the solution.

I dont know Python, so i filed a bug report instead.

lör 13 maj 2017 kl. 00:53 skrev Alok Saboo notifications@github.com:

Modify your config to only display errors and exclude warnings:

logger:
default: error

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/7567#issuecomment-301203467,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADsgkAuQpboSJcIcF6oLjxrpNw81CjaZks5r5OL4gaJpZM4NZuOy
.

>


Henrik Norrman

E-mail: [email protected]
Cellphone: +46 (0) 706 - 19 42 00


NOTICE
The contents of this e-mail are confidential to the
person it was addressed, and may also be privileged.
If you are not the addressee of this e-mail you may
not copy, forward, disclose or otherwise use it or any
part of it in any form. If you have received this e-mail
in error or is not the addressee please return it to the sender.

Did you know that Every A4 paper consumes 10 L water? Please consider the
environment before printing this e-mail.


This is not the updater component.

Do you use unifi?

Yes.

With a certificate from letsencrypt

lör 13 maj 2017 kl. 07:56 skrev Paulus Schoutsen notifications@github.com:

This is not the updater component.

Do you use unifi?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/7567#issuecomment-301227726,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADsgkCnqQzVha46GRYXuwAgEh9icB6o5ks5r5UYggaJpZM4NZuOy
.

>


Henrik Norrman

E-mail: [email protected]
Cellphone: +46 (0) 706 - 19 42 00


NOTICE
The contents of this e-mail are confidential to the
person it was addressed, and may also be privileged.
If you are not the addressee of this e-mail you may
not copy, forward, disclose or otherwise use it or any
part of it in any form. If you have received this e-mail
in error or is not the addressee please return it to the sender.

Did you know that Every A4 paper consumes 10 L water? Please consider the
environment before printing this e-mail.


@hnnweb This is being actively worked on. I hope to have an update in the next release.

There's a second, potentially related, log spew problem that occurs if the unifi component loses the controller (i.e. restarting a cloud key). Just ran into an issue earlier where the pyunifi logging filled my root drive and hosed the box.

Still an issue with 0.45

Hi,

For me the temporary solution was:

logger:
  default: error
  logs:
    requests.packages.urllib3.connectionpool: critical #for this item anything below error will not be logged
    py.warnings: critical

Until there is a better way.

@finish06 Has there been any progress on this front? I would love to use the Unifi tracker component again. If there is anything I can contribute to help, please let me know. I am not a python expert, but I can share logs or something. :)

Hi, just wondering if there is anything new to share about addressing this error ?

@finish06 Are you still working on this? I might give it a shot but I do not want to step on your toes.

@amelchio I have a pull request currently pending. Thank you for the offer! #7899

Please confirm if this is still a issue with 0.47 code update. If corrected, please close the ticket.

Thanks!

@finish06 This is still happening in 0.50.1

@finish06 I am currently on .48 and I have not had this issue return since upgrading to .047
My Unifi device tracker has been dead-on accurate without issue ever since.
Thank you!

@syphernl How do you have logging set in the configuration.yaml file?

Like this:

logger:
  default: warn
  logs:
    pylgtv.webos_client: critical
    requests.packages.urllib3.connectionpool: critical

Op 31 jul. 2017 20:44 schreef Caleb notifications@github.com:@syphernl How do you have logging set in the configuration.yaml file?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

This is may be occurring because you have the log level set to warn. Try adjusting homeassistant.components.device_tracker to error.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

This is still occurring.

I have the same issue here, with logger default set to warning, error, fatal, and critical. For the unifi component I've set verify_ssl: false. With logger set to critical the _only_ messages I'm seeing are these damned errors. The only way I've found to stop it is to comment out the UniFi component.

Currently on hass 0.57.2, python 3.6.1, and UniFi 5.6.20 Stable

Is it the InsecureRequestWarning error?

That is correct. I've since resolved the issue by deploying my CA's cert to HASS (which is the CA used for my UniFi system's cert), and setting verify_ssl: true.

That probably isn't a solid general-purpose solution for most users. I've written up more details on what I observed in my installation in the forums here: https://community.home-assistant.io/t/endless-insecurerequestwarning-errors-with-unifi/31831

Replying to myself above - that resolution turned out not to work. This issue is still present in 0.62.

Home Assistant 0.67.1
journalctl spammed as hell:

Apr 24 17:16:40 hassbian hass[26606]: /srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certif
Apr 24 17:16:40 hassbian hass[26606]: InsecureRequestWarning)

Hi there,

Is there any news about that topic? I am totally new in hass, and just noticed this periodically (every 10 seconds) message... Is the only Solution still to "paint over rust" ? ;-)
I don't understand where ist this message coming from? I have just a fresh installed HomeAssistant and noticed this Message.

(homeassistant) hass@Server:~$ uname -a
Linux Server 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
(homeassistant) hass@Server:~$ python3 --version
Python 3.6.5
(homeassistant) hass@Server:~$ hass --version
0.69.1
(homeassistant) hass@Server:~$ hass
...
/home/hass/homeassistant/lib/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
/home/hass/homeassistant/lib/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
...

Same here,

Home Assistant 0.72.1
Unifi Controller 5.8.24

- platform: unifi
  host: 192.168.1.151
  port: 8443
  username: ************
  password: *******************
  site_id: default
  verify_ssl: false
  track_new_devices: yes
  consider_home: 10

Every 10 seconds in logs:

/home/hass/homeassistant/lib/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)

/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings | stdout
-- | --

Same here,
HA 72.1 in Python Virt Env
Unifi Controller 5.6.39

-  platform: unifi
   host: 192.168.0.10
   port: 8443
   verify_ssl: false
   username: ****
   password: ****
   ssid_filter:
      - 'myssid'

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

I'm still seeing the error in my logs. But I have to verify that it comes from the unifi component.

Same issue. Every 10-seconds, the same message. I have been unable to find any configuration that mutes these messages.

same issue also here. unifi 5.9.29. latest hassio version 81.5.
not 100% confirmed, but seems that hassio interface becomes unresponsive after ~ half day (had to do a second restart in 1 day)

I don't think this is unifi specific. I get the same warning with this:

camera:
  - platform: synology
    url: https://192.168.0.10:5001
    timeout: 15
    username: <username>
    password: <password>
    verify_ssl: False

and I get:

/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

I would have thought that verify_ssl: False would have suppressed the warning.

I met memory leak when config verify ssl to false resulting oom.

Looks like pyunifi and python-synology both use requests which uses urllib3.

I think it has something to do with this:

https://github.com/urllib3/urllib3/blob/d0255e01b616f02b45eb207459937a9666e13af6/src/urllib3/connectionpool.py#L841

That if checks to see if it is valid and blindly warns if not. That checks also needs to check to see if it should validate (verify_ssl flag).

It has been a while - Is this still an issue you are experiencing? Can you please try upgrading to the latest version of Home Assistant (0.90) and report back if this is still a problem? Thanks!

@iamelk Yes, this is still happening in 0.90.1.

This is standard behavior for urllib3 and not a Home Assistant bug. My suggestions would be to either fix your SSL so it's a legitimately accepted certificate or get a fix implemented in the underlying pyUnifi library.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sogeniusio picture sogeniusio  Â·  3Comments

Elmardus picture Elmardus  Â·  3Comments

i-am-shodan picture i-am-shodan  Â·  3Comments

bdraco picture bdraco  Â·  3Comments

Konstigt picture Konstigt  Â·  3Comments