Core: Axis-41 not working anymore since 0.117.0b0 / httpx

Created on 26 Oct 2020  路  66Comments  路  Source: home-assistant/core

The problem


After Upgrading to 0.117.0b0 - 0.117.0b3 AXIS Cameras stopped working,
Cams are AXIS M1011, tried to remove and re-add Cams via ConfigFlow,
Config Flow says Failed to connect

Cam Image in Gui shows a broken Image.

Environment

arch | x86_64
-- | --
dev | false
docker | false
hassio | false
installation_type | Unknown
os_name | Linux
os_version | 4.19.129-kernel-x86_64
python_version | 3.8.6
timezone | Europe/Berlin
version | 0.117.0b3
virtualenv | false

  • Home Assistant Core release with the issue: 0.117.0b3
  • Last working Home Assistant Core release (if known): 0.116.4
  • Operating environment (OS/Container/Supervised/Core): Gentoo Linux
  • Integration causing this issue: axis
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/axis/

Problem-relevant configuration.yaml

no yaml config, only used config flow.

Traceback/Error logs


This is the log of the first start of 0.117.b2 with one cam correctly configured in 0.116.4

2020-10-24 14:20:53 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'binary_sensor', 'light', 'input_boolean', 'ios', 'system_health', 'kodi', 'panel_iframe', 'owntracks', 'map', 'zwave', 'zone', 'enigma', 'discovery', 'maxcube', 'input_number', 'media_player', 'axis', 'timer', 'webhook', 'history', 'mqtt', 'esphome', 'sun', 'octoprint', 'sensor', 'conversation', 'influxdb', 'mikrotik', 'mobile_app', 'camera', 'scene', 'tag', 'samsungtv', 'device_tracker', 'script', 'automation', 'weather', 'coronavirus', 'calendar', 'notify', 'sonos', 'zeroconf', 'switch', 'cert_expiry', 'tradfri'}
2020-10-24 14:20:57 INFO (MainThread) [homeassistant.setup] Setting up axis
2020-10-24 14:20:57 INFO (MainThread) [homeassistant.setup] Setup of domain axis took 0.0 seconds
2020-10-24 14:20:58 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-24 14:20:58 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
2020-10-24 14:20:58 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 5 seconds
2020-10-24 14:21:04 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-24 14:21:04 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 10 seconds
2020-10-24 14:21:15 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-24 14:21:15 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 20 seconds
2020-10-24 14:21:35 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-24 14:21:35 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 40 seconds
2020-10-24 14:22:16 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-24 14:22:16 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
2020-10-24 14:23:36 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-24 14:23:36 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
2020-10-24 14:25:10 WARNING (MainThread) [homeassistant.components.axis] Connected to device at 172.16.2.228 but not registered.
2020-10-24 14:26:02 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-24 14:29:56 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-24 14:32:42 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228

This are two attemps re-adding the cams with 0.117.0b3:

2020-10-26 18:36:52 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
2020-10-26 18:37:08 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fba96ede820>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(

This is one session trying to re-add one cam per config flow. There are some HTTP/1.1 401 Unauthorized in the tcpdump, credentials are triple-checked, also happens if I use admin's creds.

root@g18-hass:/var/log/homeassistant # tcpdump host 172.16.2.228
dropped privs to tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp11s0, link-type EN10MB (Ethernet), capture size 262144 bytes
18:43:04.173267 IP g18-hass.in.edevau.net.54568 > 172.16.2.228.http: Flags [S], seq 4184432670, win 64240, options [mss 1460,sackOK,TS val 1041864359 ecr 0,nop,wscale 7], length 0
18:43:04.173667 IP 172.16.2.228.http > g18-hass.in.edevau.net.54568: Flags [S.], seq 2013721643, ack 4184432671, win 5792, options [mss 1460,sackOK,TS val 19139209 ecr 1041864359,nop,wscale 1], length 0
18:43:04.173696 IP g18-hass.in.edevau.net.54568 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864359 ecr 19139209], length 0
18:43:04.174310 IP g18-hass.in.edevau.net.54568 > 172.16.2.228.http: Flags [P.], seq 1:227, ack 1, win 502, options [nop,nop,TS val 1041864360 ecr 19139209], length 226: HTTP: POST /axis-cgi/apidiscovery.cgi HTTP/1.1
18:43:04.174555 IP g18-hass.in.edevau.net.54568 > 172.16.2.228.http: Flags [P.], seq 227:299, ack 1, win 502, options [nop,nop,TS val 1041864360 ecr 19139209], length 72: HTTP
18:43:04.174631 IP 172.16.2.228.http > g18-hass.in.edevau.net.54568: Flags [.], ack 227, win 3432, options [nop,nop,TS val 19139209 ecr 1041864360], length 0
18:43:04.174782 IP 172.16.2.228.http > g18-hass.in.edevau.net.54568: Flags [.], ack 299, win 3432, options [nop,nop,TS val 19139209 ecr 1041864360], length 0
18:43:04.175578 IP 172.16.2.228.http > g18-hass.in.edevau.net.54568: Flags [P.], seq 1:317, ack 299, win 3432, options [nop,nop,TS val 19139209 ecr 1041864360], length 316: HTTP: HTTP/1.1 404 Not Found
18:43:04.175617 IP g18-hass.in.edevau.net.54568 > 172.16.2.228.http: Flags [.], ack 317, win 501, options [nop,nop,TS val 1041864361 ecr 19139209], length 0
18:43:04.175657 IP 172.16.2.228.http > g18-hass.in.edevau.net.54568: Flags [F.], seq 317, ack 299, win 3432, options [nop,nop,TS val 19139209 ecr 1041864360], length 0
18:43:04.177135 IP g18-hass.in.edevau.net.54568 > 172.16.2.228.http: Flags [F.], seq 299, ack 318, win 501, options [nop,nop,TS val 1041864363 ecr 19139209], length 0
18:43:04.177440 IP 172.16.2.228.http > g18-hass.in.edevau.net.54568: Flags [.], ack 300, win 3432, options [nop,nop,TS val 19139210 ecr 1041864363], length 0
18:43:04.183791 IP g18-hass.in.edevau.net.54570 > 172.16.2.228.http: Flags [S], seq 1498677439, win 64240, options [mss 1460,sackOK,TS val 1041864370 ecr 0,nop,wscale 7], length 0
18:43:04.183941 IP g18-hass.in.edevau.net.54572 > 172.16.2.228.http: Flags [S], seq 1097490274, win 64240, options [mss 1460,sackOK,TS val 1041864370 ecr 0,nop,wscale 7], length 0
18:43:04.184053 IP g18-hass.in.edevau.net.54574 > 172.16.2.228.http: Flags [S], seq 2495812729, win 64240, options [mss 1460,sackOK,TS val 1041864370 ecr 0,nop,wscale 7], length 0
18:43:04.184104 IP 172.16.2.228.http > g18-hass.in.edevau.net.54570: Flags [S.], seq 2005318933, ack 1498677440, win 5792, options [mss 1460,sackOK,TS val 19139210 ecr 1041864370,nop,wscale 1], length 0
18:43:04.184123 IP g18-hass.in.edevau.net.54570 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864370 ecr 19139210], length 0
18:43:04.184203 IP g18-hass.in.edevau.net.54576 > 172.16.2.228.http: Flags [S], seq 711587652, win 64240, options [mss 1460,sackOK,TS val 1041864370 ecr 0,nop,wscale 7], length 0
18:43:04.184253 IP 172.16.2.228.http > g18-hass.in.edevau.net.54572: Flags [S.], seq 2013418623, ack 1097490275, win 5792, options [mss 1460,sackOK,TS val 19139210 ecr 1041864370,nop,wscale 1], length 0
18:43:04.184268 IP g18-hass.in.edevau.net.54572 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864370 ecr 19139210], length 0
18:43:04.184372 IP g18-hass.in.edevau.net.54578 > 172.16.2.228.http: Flags [S], seq 4193207845, win 64240, options [mss 1460,sackOK,TS val 1041864370 ecr 0,nop,wscale 7], length 0
18:43:04.184401 IP 172.16.2.228.http > g18-hass.in.edevau.net.54574: Flags [S.], seq 2013474188, ack 2495812730, win 5792, options [mss 1460,sackOK,TS val 19139210 ecr 1041864370,nop,wscale 1], length 0
18:43:04.184421 IP g18-hass.in.edevau.net.54574 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864370 ecr 19139210], length 0
18:43:04.184502 IP g18-hass.in.edevau.net.54580 > 172.16.2.228.http: Flags [S], seq 1625944363, win 64240, options [mss 1460,sackOK,TS val 1041864370 ecr 0,nop,wscale 7], length 0
18:43:04.184720 IP 172.16.2.228.http > g18-hass.in.edevau.net.54576: Flags [S.], seq 2013546753, ack 711587653, win 5792, options [mss 1460,sackOK,TS val 19139210 ecr 1041864370,nop,wscale 1], length 0
18:43:04.184736 IP g18-hass.in.edevau.net.54576 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864371 ecr 19139210], length 0
18:43:04.184968 IP 172.16.2.228.http > g18-hass.in.edevau.net.54578: Flags [S.], seq 2018141461, ack 4193207846, win 5792, options [mss 1460,sackOK,TS val 19139210 ecr 1041864370,nop,wscale 1], length 0
18:43:04.184982 IP g18-hass.in.edevau.net.54578 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864371 ecr 19139210], length 0
18:43:04.185204 IP 172.16.2.228.http > g18-hass.in.edevau.net.54580: Flags [S.], seq 2004957693, ack 1625944364, win 5792, options [mss 1460,sackOK,TS val 19139210 ecr 1041864370,nop,wscale 1], length 0
18:43:04.185218 IP g18-hass.in.edevau.net.54580 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864371 ecr 19139210], length 0
18:43:04.185820 IP g18-hass.in.edevau.net.54570 > 172.16.2.228.http: Flags [P.], seq 1:201, ack 1, win 502, options [nop,nop,TS val 1041864372 ecr 19139210], length 200: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.Properties HTTP/1.1
18:43:04.186067 IP g18-hass.in.edevau.net.54572 > 172.16.2.228.http: Flags [P.], seq 1:204, ack 1, win 502, options [nop,nop,TS val 1041864372 ecr 19139210], length 203: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.StreamProfile HTTP/1.1
18:43:04.186135 IP 172.16.2.228.http > g18-hass.in.edevau.net.54570: Flags [.], ack 201, win 3432, options [nop,nop,TS val 19139210 ecr 1041864372], length 0
18:43:04.186317 IP 172.16.2.228.http > g18-hass.in.edevau.net.54572: Flags [.], ack 204, win 3432, options [nop,nop,TS val 19139210 ecr 1041864372], length 0
18:43:04.186340 IP g18-hass.in.edevau.net.54574 > 172.16.2.228.http: Flags [P.], seq 1:196, ack 1, win 502, options [nop,nop,TS val 1041864372 ecr 19139210], length 195: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.Brand HTTP/1.1
18:43:04.186601 IP 172.16.2.228.http > g18-hass.in.edevau.net.54574: Flags [.], ack 196, win 3432, options [nop,nop,TS val 19139210 ecr 1041864372], length 0
18:43:04.186865 IP g18-hass.in.edevau.net.54576 > 172.16.2.228.http: Flags [P.], seq 1:197, ack 1, win 502, options [nop,nop,TS val 1041864373 ecr 19139210], length 196: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.IOPort HTTP/1.1
18:43:04.187079 IP g18-hass.in.edevau.net.54578 > 172.16.2.228.http: Flags [P.], seq 1:196, ack 1, win 502, options [nop,nop,TS val 1041864373 ecr 19139210], length 195: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.Input HTTP/1.1
18:43:04.187156 IP 172.16.2.228.http > g18-hass.in.edevau.net.54576: Flags [.], ack 197, win 3432, options [nop,nop,TS val 19139210 ecr 1041864373], length 0
18:43:04.187383 IP 172.16.2.228.http > g18-hass.in.edevau.net.54578: Flags [.], ack 196, win 3432, options [nop,nop,TS val 19139210 ecr 1041864373], length 0
18:43:04.187759 IP g18-hass.in.edevau.net.54580 > 172.16.2.228.http: Flags [P.], seq 1:197, ack 1, win 502, options [nop,nop,TS val 1041864374 ecr 19139210], length 196: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.Output HTTP/1.1
18:43:04.188056 IP 172.16.2.228.http > g18-hass.in.edevau.net.54580: Flags [.], ack 197, win 3432, options [nop,nop,TS val 19139211 ecr 1041864374], length 0
18:43:04.192521 IP 172.16.2.228.http > g18-hass.in.edevau.net.54574: Flags [P.], seq 1:542, ack 196, win 3432, options [nop,nop,TS val 19139211 ecr 1041864372], length 541: HTTP: HTTP/1.1 401 Unauthorized
18:43:04.192541 IP g18-hass.in.edevau.net.54574 > 172.16.2.228.http: Flags [.], ack 542, win 501, options [nop,nop,TS val 1041864378 ecr 19139211], length 0
18:43:04.192615 IP 172.16.2.228.http > g18-hass.in.edevau.net.54574: Flags [F.], seq 542, ack 196, win 3432, options [nop,nop,TS val 19139211 ecr 1041864372], length 0
18:43:04.193883 IP g18-hass.in.edevau.net.54574 > 172.16.2.228.http: Flags [F.], seq 196, ack 543, win 501, options [nop,nop,TS val 1041864380 ecr 19139211], length 0
18:43:04.194188 IP 172.16.2.228.http > g18-hass.in.edevau.net.54574: Flags [.], ack 197, win 3432, options [nop,nop,TS val 19139211 ecr 1041864380], length 0
18:43:04.195588 IP g18-hass.in.edevau.net.54582 > 172.16.2.228.http: Flags [S], seq 2144521068, win 64240, options [mss 1460,sackOK,TS val 1041864381 ecr 0,nop,wscale 7], length 0
18:43:04.195953 IP 172.16.2.228.http > g18-hass.in.edevau.net.54582: Flags [S.], seq 2013789356, ack 2144521069, win 5792, options [mss 1460,sackOK,TS val 19139211 ecr 1041864381,nop,wscale 1], length 0
18:43:04.195971 IP g18-hass.in.edevau.net.54582 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864382 ecr 19139211], length 0
18:43:04.196456 IP g18-hass.in.edevau.net.54582 > 172.16.2.228.http: Flags [P.], seq 1:484, ack 1, win 502, options [nop,nop,TS val 1041864382 ecr 19139211], length 483: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.Brand HTTP/1.1
18:43:04.196795 IP 172.16.2.228.http > g18-hass.in.edevau.net.54582: Flags [.], ack 484, win 3432, options [nop,nop,TS val 19139211 ecr 1041864382], length 0
18:43:04.198349 IP 172.16.2.228.http > g18-hass.in.edevau.net.54570: Flags [P.], seq 1:542, ack 201, win 3432, options [nop,nop,TS val 19139212 ecr 1041864372], length 541: HTTP: HTTP/1.1 401 Unauthorized
18:43:04.198378 IP g18-hass.in.edevau.net.54570 > 172.16.2.228.http: Flags [.], ack 542, win 501, options [nop,nop,TS val 1041864384 ecr 19139212], length 0
18:43:04.198431 IP 172.16.2.228.http > g18-hass.in.edevau.net.54570: Flags [F.], seq 542, ack 201, win 3432, options [nop,nop,TS val 19139212 ecr 1041864372], length 0
18:43:04.199795 IP g18-hass.in.edevau.net.54570 > 172.16.2.228.http: Flags [F.], seq 201, ack 543, win 501, options [nop,nop,TS val 1041864386 ecr 19139212], length 0
18:43:04.200117 IP 172.16.2.228.http > g18-hass.in.edevau.net.54570: Flags [.], ack 202, win 3432, options [nop,nop,TS val 19139212 ecr 1041864386], length 0
18:43:04.201214 IP g18-hass.in.edevau.net.54584 > 172.16.2.228.http: Flags [S], seq 378480010, win 64240, options [mss 1460,sackOK,TS val 1041864387 ecr 0,nop,wscale 7], length 0
18:43:04.201549 IP 172.16.2.228.http > g18-hass.in.edevau.net.54584: Flags [S.], seq 2008744811, ack 378480011, win 5792, options [mss 1460,sackOK,TS val 19139212 ecr 1041864387,nop,wscale 1], length 0
18:43:04.201575 IP g18-hass.in.edevau.net.54584 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864387 ecr 19139212], length 0
18:43:04.202035 IP g18-hass.in.edevau.net.54584 > 172.16.2.228.http: Flags [P.], seq 1:494, ack 1, win 502, options [nop,nop,TS val 1041864388 ecr 19139212], length 493: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.Properties HTTP/1.1
18:43:04.202389 IP 172.16.2.228.http > g18-hass.in.edevau.net.54584: Flags [.], ack 494, win 3432, options [nop,nop,TS val 19139212 ecr 1041864388], length 0
18:43:04.203947 IP 172.16.2.228.http > g18-hass.in.edevau.net.54572: Flags [P.], seq 1:542, ack 204, win 3432, options [nop,nop,TS val 19139212 ecr 1041864372], length 541: HTTP: HTTP/1.1 401 Unauthorized
18:43:04.203960 IP g18-hass.in.edevau.net.54572 > 172.16.2.228.http: Flags [.], ack 542, win 501, options [nop,nop,TS val 1041864390 ecr 19139212], length 0
18:43:04.204019 IP 172.16.2.228.http > g18-hass.in.edevau.net.54572: Flags [F.], seq 542, ack 204, win 3432, options [nop,nop,TS val 19139212 ecr 1041864372], length 0
18:43:04.205108 IP g18-hass.in.edevau.net.54572 > 172.16.2.228.http: Flags [F.], seq 204, ack 543, win 501, options [nop,nop,TS val 1041864391 ecr 19139212], length 0
18:43:04.205424 IP 172.16.2.228.http > g18-hass.in.edevau.net.54572: Flags [.], ack 205, win 3432, options [nop,nop,TS val 19139212 ecr 1041864391], length 0
18:43:04.206099 IP g18-hass.in.edevau.net.54586 > 172.16.2.228.http: Flags [S], seq 352177040, win 64240, options [mss 1460,sackOK,TS val 1041864392 ecr 0,nop,wscale 7], length 0
18:43:04.206420 IP 172.16.2.228.http > g18-hass.in.edevau.net.54586: Flags [S.], seq 2017413255, ack 352177041, win 5792, options [mss 1460,sackOK,TS val 19139212 ecr 1041864392,nop,wscale 1], length 0
18:43:04.206436 IP g18-hass.in.edevau.net.54586 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864392 ecr 19139212], length 0
18:43:04.206895 IP g18-hass.in.edevau.net.54586 > 172.16.2.228.http: Flags [P.], seq 1:500, ack 1, win 502, options [nop,nop,TS val 1041864393 ecr 19139212], length 499: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.StreamProfile HTTP/1.1
18:43:04.207238 IP 172.16.2.228.http > g18-hass.in.edevau.net.54586: Flags [.], ack 500, win 3432, options [nop,nop,TS val 19139212 ecr 1041864393], length 0
18:43:04.210201 IP 172.16.2.228.http > g18-hass.in.edevau.net.54580: Flags [P.], seq 1:542, ack 197, win 3432, options [nop,nop,TS val 19139213 ecr 1041864374], length 541: HTTP: HTTP/1.1 401 Unauthorized
18:43:04.210238 IP g18-hass.in.edevau.net.54580 > 172.16.2.228.http: Flags [.], ack 542, win 501, options [nop,nop,TS val 1041864396 ecr 19139213], length 0
18:43:04.210724 IP 172.16.2.228.http > g18-hass.in.edevau.net.54580: Flags [F.], seq 542, ack 197, win 3432, options [nop,nop,TS val 19139213 ecr 1041864396], length 0
18:43:04.211536 IP g18-hass.in.edevau.net.54580 > 172.16.2.228.http: Flags [F.], seq 197, ack 543, win 501, options [nop,nop,TS val 1041864397 ecr 19139213], length 0
18:43:04.211875 IP 172.16.2.228.http > g18-hass.in.edevau.net.54580: Flags [.], ack 198, win 3432, options [nop,nop,TS val 19139213 ecr 1041864397], length 0
18:43:04.213045 IP g18-hass.in.edevau.net.54588 > 172.16.2.228.http: Flags [S], seq 2804787572, win 64240, options [mss 1460,sackOK,TS val 1041864399 ecr 0,nop,wscale 7], length 0
18:43:04.213372 IP 172.16.2.228.http > g18-hass.in.edevau.net.54588: Flags [S.], seq 2011876642, ack 2804787573, win 5792, options [mss 1460,sackOK,TS val 19139213 ecr 1041864399,nop,wscale 1], length 0
18:43:04.213387 IP g18-hass.in.edevau.net.54588 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864399 ecr 19139213], length 0
18:43:04.213818 IP g18-hass.in.edevau.net.54588 > 172.16.2.228.http: Flags [P.], seq 1:486, ack 1, win 502, options [nop,nop,TS val 1041864400 ecr 19139213], length 485: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.Output HTTP/1.1
18:43:04.214172 IP 172.16.2.228.http > g18-hass.in.edevau.net.54588: Flags [.], ack 486, win 3432, options [nop,nop,TS val 19139213 ecr 1041864400], length 0
18:43:04.216206 IP 172.16.2.228.http > g18-hass.in.edevau.net.54578: Flags [P.], seq 1:542, ack 196, win 3432, options [nop,nop,TS val 19139213 ecr 1041864373], length 541: HTTP: HTTP/1.1 401 Unauthorized
18:43:04.216240 IP g18-hass.in.edevau.net.54578 > 172.16.2.228.http: Flags [.], ack 542, win 501, options [nop,nop,TS val 1041864402 ecr 19139213], length 0
18:43:04.216718 IP 172.16.2.228.http > g18-hass.in.edevau.net.54578: Flags [F.], seq 542, ack 196, win 3432, options [nop,nop,TS val 19139213 ecr 1041864402], length 0
18:43:04.217590 IP g18-hass.in.edevau.net.54578 > 172.16.2.228.http: Flags [F.], seq 196, ack 543, win 501, options [nop,nop,TS val 1041864403 ecr 19139213], length 0
18:43:04.217935 IP 172.16.2.228.http > g18-hass.in.edevau.net.54578: Flags [.], ack 197, win 3432, options [nop,nop,TS val 19139214 ecr 1041864403], length 0
18:43:04.218960 IP g18-hass.in.edevau.net.54590 > 172.16.2.228.http: Flags [S], seq 1556481262, win 64240, options [mss 1460,sackOK,TS val 1041864405 ecr 0,nop,wscale 7], length 0
18:43:04.219299 IP 172.16.2.228.http > g18-hass.in.edevau.net.54590: Flags [S.], seq 2004604627, ack 1556481263, win 5792, options [mss 1460,sackOK,TS val 19139214 ecr 1041864405,nop,wscale 1], length 0
18:43:04.219318 IP g18-hass.in.edevau.net.54590 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864405 ecr 19139214], length 0
18:43:04.219785 IP g18-hass.in.edevau.net.54590 > 172.16.2.228.http: Flags [P.], seq 1:484, ack 1, win 502, options [nop,nop,TS val 1041864406 ecr 19139214], length 483: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.Input HTTP/1.1
18:43:04.220110 IP 172.16.2.228.http > g18-hass.in.edevau.net.54590: Flags [.], ack 484, win 3432, options [nop,nop,TS val 19139214 ecr 1041864406], length 0
18:43:04.223091 IP 172.16.2.228.http > g18-hass.in.edevau.net.54576: Flags [P.], seq 1:542, ack 197, win 3432, options [nop,nop,TS val 19139214 ecr 1041864373], length 541: HTTP: HTTP/1.1 401 Unauthorized
18:43:04.223120 IP g18-hass.in.edevau.net.54576 > 172.16.2.228.http: Flags [.], ack 542, win 501, options [nop,nop,TS val 1041864409 ecr 19139214], length 0
18:43:04.223629 IP 172.16.2.228.http > g18-hass.in.edevau.net.54576: Flags [F.], seq 542, ack 197, win 3432, options [nop,nop,TS val 19139214 ecr 1041864409], length 0
18:43:04.224212 IP g18-hass.in.edevau.net.54576 > 172.16.2.228.http: Flags [F.], seq 197, ack 543, win 501, options [nop,nop,TS val 1041864410 ecr 19139214], length 0
18:43:04.224530 IP 172.16.2.228.http > g18-hass.in.edevau.net.54576: Flags [.], ack 198, win 3432, options [nop,nop,TS val 19139214 ecr 1041864410], length 0
18:43:04.225835 IP g18-hass.in.edevau.net.54592 > 172.16.2.228.http: Flags [S], seq 1340265552, win 64240, options [mss 1460,sackOK,TS val 1041864412 ecr 0,nop,wscale 7], length 0
18:43:04.226173 IP 172.16.2.228.http > g18-hass.in.edevau.net.54592: Flags [S.], seq 2016489323, ack 1340265553, win 5792, options [mss 1460,sackOK,TS val 19139214 ecr 1041864412,nop,wscale 1], length 0
18:43:04.226191 IP g18-hass.in.edevau.net.54592 > 172.16.2.228.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1041864412 ecr 19139214], length 0
18:43:04.226662 IP g18-hass.in.edevau.net.54592 > 172.16.2.228.http: Flags [P.], seq 1:486, ack 1, win 502, options [nop,nop,TS val 1041864412 ecr 19139214], length 485: HTTP: GET /axis-cgi/param.cgi?action=list&group=root.IOPort HTTP/1.1
18:43:04.227003 IP 172.16.2.228.http > g18-hass.in.edevau.net.54592: Flags [.], ack 486, win 3432, options [nop,nop,TS val 19139214 ecr 1041864412], length 0
18:43:04.388667 IP 172.16.2.228.http > g18-hass.in.edevau.net.54582: Flags [P.], seq 1:444, ack 484, win 3432, options [nop,nop,TS val 19139231 ecr 1041864382], length 443: HTTP: HTTP/1.1 200 OK
18:43:04.388692 IP g18-hass.in.edevau.net.54582 > 172.16.2.228.http: Flags [.], ack 444, win 501, options [nop,nop,TS val 1041864574 ecr 19139231], length 0
18:43:04.458647 IP 172.16.2.228.http > g18-hass.in.edevau.net.54590: Flags [P.], seq 1:291, ack 484, win 3432, options [nop,nop,TS val 19139238 ecr 1041864406], length 290: HTTP: HTTP/1.1 200 OK
18:43:04.458696 IP g18-hass.in.edevau.net.54590 > 172.16.2.228.http: Flags [.], ack 291, win 501, options [nop,nop,TS val 1041864644 ecr 19139238], length 0
18:43:04.459666 IP 172.16.2.228.http > g18-hass.in.edevau.net.54582: Flags [F.], seq 444, ack 484, win 3432, options [nop,nop,TS val 19139238 ecr 1041864574], length 0
18:43:04.460041 IP 172.16.2.228.http > g18-hass.in.edevau.net.54590: Flags [F.], seq 291, ack 484, win 3432, options [nop,nop,TS val 19139238 ecr 1041864644], length 0
18:43:04.482048 IP 172.16.2.228.http > g18-hass.in.edevau.net.54588: Flags [P.], seq 1:292, ack 486, win 3432, options [nop,nop,TS val 19139240 ecr 1041864400], length 291: HTTP: HTTP/1.1 200 OK
18:43:04.482101 IP g18-hass.in.edevau.net.54588 > 172.16.2.228.http: Flags [.], ack 292, win 501, options [nop,nop,TS val 1041864668 ecr 19139240], length 0
18:43:04.482615 IP 172.16.2.228.http > g18-hass.in.edevau.net.54588: Flags [F.], seq 292, ack 486, win 3432, options [nop,nop,TS val 19139240 ecr 1041864668], length 0
18:43:04.493812 IP 172.16.2.228.http > g18-hass.in.edevau.net.54586: Flags [P.], seq 1:237, ack 500, win 3432, options [nop,nop,TS val 19139241 ecr 1041864393], length 236: HTTP: HTTP/1.1 200 OK
18:43:04.493835 IP g18-hass.in.edevau.net.54586 > 172.16.2.228.http: Flags [.], ack 237, win 501, options [nop,nop,TS val 1041864680 ecr 19139241], length 0
18:43:04.500117 IP 172.16.2.228.http > g18-hass.in.edevau.net.54584: Flags [P.], seq 1:237, ack 494, win 3432, options [nop,nop,TS val 19139242 ecr 1041864388], length 236: HTTP: HTTP/1.1 200 OK
18:43:04.500190 IP g18-hass.in.edevau.net.54584 > 172.16.2.228.http: Flags [.], ack 237, win 501, options [nop,nop,TS val 1041864686 ecr 19139242], length 0
18:43:04.505364 IP g18-hass.in.edevau.net.54582 > 172.16.2.228.http: Flags [.], ack 445, win 501, options [nop,nop,TS val 1041864691 ecr 19139238], length 0
18:43:04.515378 IP g18-hass.in.edevau.net.54590 > 172.16.2.228.http: Flags [.], ack 292, win 501, options [nop,nop,TS val 1041864701 ecr 19139238], length 0
18:43:04.535444 IP g18-hass.in.edevau.net.54588 > 172.16.2.228.http: Flags [.], ack 293, win 501, options [nop,nop,TS val 1041864721 ecr 19139240], length 0
18:43:04.549835 IP 172.16.2.228.http > g18-hass.in.edevau.net.54592: Flags [P.], seq 1:237, ack 486, win 3432, options [nop,nop,TS val 19139247 ecr 1041864412], length 236: HTTP: HTTP/1.1 200 OK
18:43:04.549853 IP g18-hass.in.edevau.net.54592 > 172.16.2.228.http: Flags [.], ack 237, win 501, options [nop,nop,TS val 1041864736 ecr 19139247], length 0
18:43:04.674641 IP 172.16.2.228.http > g18-hass.in.edevau.net.54592: Flags [F.], seq 237, ack 486, win 3432, options [nop,nop,TS val 19139259 ecr 1041864736], length 0
18:43:04.715473 IP g18-hass.in.edevau.net.54592 > 172.16.2.228.http: Flags [.], ack 238, win 501, options [nop,nop,TS val 1041864901 ecr 19139259], length 0
18:43:04.762383 IP 172.16.2.228.http > g18-hass.in.edevau.net.54584: Flags [P.], seq 237:1370, ack 494, win 3432, options [nop,nop,TS val 19139268 ecr 1041864686], length 1133: HTTP
18:43:04.762429 IP g18-hass.in.edevau.net.54584 > 172.16.2.228.http: Flags [.], ack 1370, win 501, options [nop,nop,TS val 1041864948 ecr 19139268], length 0
18:43:04.762887 IP 172.16.2.228.http > g18-hass.in.edevau.net.54584: Flags [F.], seq 1370, ack 494, win 3432, options [nop,nop,TS val 19139268 ecr 1041864948], length 0
18:43:04.805373 IP g18-hass.in.edevau.net.54584 > 172.16.2.228.http: Flags [.], ack 1371, win 501, options [nop,nop,TS val 1041864991 ecr 19139268], length 0
18:43:05.109625 IP 172.16.2.228.http > g18-hass.in.edevau.net.54586: Flags [.], seq 237:1685, ack 500, win 3432, options [nop,nop,TS val 19139303 ecr 1041864680], length 1448: HTTP
18:43:05.109688 IP g18-hass.in.edevau.net.54586 > 172.16.2.228.http: Flags [.], ack 1685, win 501, options [nop,nop,TS val 1041865295 ecr 19139303], length 0
18:43:05.109729 IP 172.16.2.228.http > g18-hass.in.edevau.net.54586: Flags [P.], seq 1685:2467, ack 500, win 3432, options [nop,nop,TS val 19139303 ecr 1041864680], length 782: HTTP
18:43:05.109748 IP g18-hass.in.edevau.net.54586 > 172.16.2.228.http: Flags [.], ack 2467, win 496, options [nop,nop,TS val 1041865296 ecr 19139303], length 0
18:43:05.109822 IP 172.16.2.228.http > g18-hass.in.edevau.net.54586: Flags [F.], seq 2467, ack 500, win 3432, options [nop,nop,TS val 19139303 ecr 1041864680], length 0
18:43:05.165362 IP g18-hass.in.edevau.net.54586 > 172.16.2.228.http: Flags [.], ack 2468, win 501, options [nop,nop,TS val 1041865351 ecr 19139303], length 0

Additional information

after downgrading to a pre-httpx version (0.116.4) with axis-37 all cams work again.

axis

All 66 comments

axis documentation
axis source
(message by IssueLinks)

Thanks for reporting. Can you Enable debug logs?

Hey there @kane610, mind taking a look at this issue as its been labeled with an integration (axis) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

This did not change anything.
I have set:

logger:
  default: info
  logs:
    homeassistant.components.axis: debug

server.log:

2020-10-26 19:24:39 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at 172.16.2.228
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7f9b2c4d2c40>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 19:25:36 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net

I'll downgrade, add one cam again, and restart the broken version.

add also axis: debug

Also: what firmware version is installed on device

AXIS M1011 Network CameraFirmware version: 5.20.3, this is most recent available..

This is the log with debug enabled adding the first cam on 0.116.4 with axis-37:

2020-10-26 19:34:31 INFO (MainThread) [homeassistant.setup] Setting up axis
2020-10-26 19:34:31 INFO (MainThread) [homeassistant.setup] Setup of domain axis took 0.0 seconds
2020-10-26 19:34:32 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.axis
2020-10-26 19:34:32 INFO (MainThread) [homeassistant.components.camera] Setting up camera.axis
2020-10-26 19:34:32 INFO (MainThread) [homeassistant.components.light] Setting up light.axis
2020-10-26 19:34:32 INFO (MainThread) [homeassistant.components.switch] Setting up switch.axis
2020-10-26 19:34:32 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new camera.axis entity: camera.m1011_0

Now I'll upgade again to 0.117.b3.

   [1]   root@g18-hass:/etc/homeassistant # tail -f /var/log/homeassistant/server.log | grep axis
2020-10-26 19:38:26 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'input_number', 'octoprint', 'samsungtv', 'binary_sensor', 'esphome', 'mikrotik', 'light', 'zwave', 'coronavirus', 'device_tracker', 'history', 'automation', 'zone', 'sensor', 'tradfri', 'axis', 'weather', 'panel_iframe', 'sun', 'enigma', 'mqtt', 'mobile_app', 'cert_expiry', 'calendar', 'switch', 'tag', 'webhook', 'notify', 'owntracks', 'ios', 'timer', 'maxcube', 'map', 'input_boolean', 'influxdb', 'scene', 'sonos', 'system_health', 'discovery', 'zeroconf', 'camera', 'kodi', 'script', 'media_player', 'conversation'}
2020-10-26 19:38:28 INFO (MainThread) [homeassistant.setup] Setting up axis
2020-10-26 19:38:28 INFO (MainThread) [homeassistant.setup] Setup of domain axis took 0.0 seconds
2020-10-26 19:38:29 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 19:38:29 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 5 seconds
2020-10-26 19:38:35 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 19:38:35 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 10 seconds
2020-10-26 19:38:45 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 19:38:45 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 20 seconds

Seems the debug setting is not working. So I set default logging to debug:

   [130]   root@g18-hass:/etc/homeassistant # tail -f /var/log/homeassistant/server.log | grep axis | grep -v zeroconf


2020-10-26 19:41:37 DEBUG (MainThread) [homeassistant.setup] Dependency axis will wait for after dependencies ['mqtt']
2020-10-26 19:41:39 INFO (MainThread) [homeassistant.setup] Setting up axis
2020-10-26 19:41:39 INFO (MainThread) [homeassistant.setup] Setup of domain axis took 0.0 seconds
2020-10-26 19:41:39 DEBUG (MainThread) [axis.api] {}
2020-10-26 19:41:39 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi {'json': {'method': 'getApiList', 'apiVersion': '1.0', 'context': 'Axis library'}}
2020-10-26 19:41:41 DEBUG (MainThread) [httpx._client] HTTP Request: POST http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi "HTTP/1.1 404 Not Found"
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] <Response [404 Not Found]>, 404 Client Error: Not Found for url: http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi
2020-10-26 19:41:41 DEBUG (MainThread) [axis.api] ''
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties {}
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand {}
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile {}
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input {}
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort {}
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output {}
2020-10-26 19:41:41 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:41 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:41 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:41 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:41 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:41 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:41 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 19:41:41 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 5 seconds
2020-10-26 19:41:41 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=axis>
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:42 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:46 DEBUG (MainThread) [axis.api] {}
2020-10-26 19:41:46 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi {'json': {'method': 'getApiList', 'apiVersion': '1.0', 'context': 'Axis library'}}
2020-10-26 19:41:46 DEBUG (MainThread) [httpx._client] HTTP Request: POST http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi "HTTP/1.1 404 Not Found"
2020-10-26 19:41:46 DEBUG (MainThread) [axis.vapix] <Response [404 Not Found]>, 404 Client Error: Not Found for url: http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi
2020-10-26 19:41:46 DEBUG (MainThread) [axis.api] ''
2020-10-26 19:41:46 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties {}
2020-10-26 19:41:46 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand {}
2020-10-26 19:41:46 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile {}
2020-10-26 19:41:46 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input {}
2020-10-26 19:41:46 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort {}
2020-10-26 19:41:46 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output {}
2020-10-26 19:41:46 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:46 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:46 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:46 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:46 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:46 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:47 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:47 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 19:41:47 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 10 seconds
2020-10-26 19:41:47 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:47 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:47 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:47 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:47 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:57 DEBUG (MainThread) [axis.api] {}
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi {'json': {'method': 'getApiList', 'apiVersion': '1.0', 'context': 'Axis library'}}
2020-10-26 19:41:57 DEBUG (MainThread) [httpx._client] HTTP Request: POST http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi "HTTP/1.1 404 Not Found"
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] <Response [404 Not Found]>, 404 Client Error: Not Found for url: http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi
2020-10-26 19:41:57 DEBUG (MainThread) [axis.api] ''
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties {}
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand {}
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile {}
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input {}
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort {}
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output {}
2020-10-26 19:41:57 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:57 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:57 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:57 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:57 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:57 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output "HTTP/1.1 401 Unauthorized"
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:57 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 19:41:57 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 20 seconds
2020-10-26 19:41:57 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:58 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:58 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:41:58 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:42:17 DEBUG (MainThread) [axis.api] {}
2020-10-26 19:42:17 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi {'json': {'method': 'getApiList', 'apiVersion': '1.0', 'context': 'Axis library'}}
2020-10-26 19:42:17 DEBUG (MainThread) [httpx._client] HTTP Request: POST http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi "HTTP/1.1 404 Not Found"
2020-10-26 19:42:17 DEBUG (MainThread) [axis.vapix] <Response [404 Not Found]>, 404 Client Error: Not Found for url: http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi
2020-10-26 19:42:17 DEBUG (MainThread) [axis.api] ''
2020-10-26 19:42:17 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties {}
2020-10-26 19:42:17 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand {}
2020-10-26 19:42:17 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile {}
2020-10-26 19:42:17 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input {}
2020-10-26 19:42:17 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort {}
2020-10-26 19:42:17 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output {}
2020-10-26 19:42:17 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input "HTTP/1.1 401 Unauthorized"
2020-10-26 19:42:17 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand "HTTP/1.1 401 Unauthorized"
2020-10-26 19:42:17 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort "HTTP/1.1 401 Unauthorized"
2020-10-26 19:42:17 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties "HTTP/1.1 401 Unauthorized"
2020-10-26 19:42:17 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output "HTTP/1.1 401 Unauthorized"
2020-10-26 19:42:17 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile "HTTP/1.1 401 Unauthorized"
2020-10-26 19:42:18 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:42:18 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 19:42:18 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 40 seconds
2020-10-26 19:42:18 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:42:18 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:42:18 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:42:18 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 19:42:18 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection

Well you're lucky that its worked so far, I've never run the integration with a 5.20 device.

2020-10-26 19:41:41 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection

My bet is that there is some difference between requests and httpx, maybe requests fall back to basic authentication. How does your device web server configuration look? Can you make it to only digest?

Yes, found this setting:

Bildschirmfoto 2020-10-26 um 20 05 14

but this did not change much:

2020-10-26 20:08:03 DEBUG (MainThread) [axis.api] {}
2020-10-26 20:08:03 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi {'json': {'method': 'getApiList', 'apiVersion': '1.0', 'context': 'Axis library'}}
2020-10-26 20:08:04 DEBUG (MainThread) [httpx._client] HTTP Request: POST http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi "HTTP/1.1 404 Not Found"
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] <Response [404 Not Found]>, 404 Client Error: Not Found for url: http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi
2020-10-26 20:08:04 DEBUG (MainThread) [axis.api] ''
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties {}
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand {}
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile {}
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input {}
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort {}
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output {}
2020-10-26 20:08:04 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:04 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:04 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:04 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:04 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:04 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:04 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:08:04 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 40 seconds
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:04 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:05 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:25 DEBUG (MainThread) [homeassistant.setup] Dependency axis will wait for after dependencies ['mqtt']
2020-10-26 20:08:28 INFO (MainThread) [homeassistant.setup] Setting up axis
2020-10-26 20:08:28 INFO (MainThread) [homeassistant.setup] Setup of domain axis took 0.0 seconds
2020-10-26 20:08:28 DEBUG (MainThread) [axis.api] {}
2020-10-26 20:08:28 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi {'json': {'method': 'getApiList', 'apiVersion': '1.0', 'context': 'Axis library'}}
2020-10-26 20:08:29 DEBUG (MainThread) [httpx._client] HTTP Request: POST http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi "HTTP/1.1 404 Not Found"
2020-10-26 20:08:29 DEBUG (MainThread) [axis.vapix] <Response [404 Not Found]>, 404 Client Error: Not Found for url: http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi
2020-10-26 20:08:29 DEBUG (MainThread) [axis.api] ''
2020-10-26 20:08:29 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties {}
2020-10-26 20:08:29 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand {}
2020-10-26 20:08:29 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile {}
2020-10-26 20:08:29 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input {}
2020-10-26 20:08:29 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort {}
2020-10-26 20:08:29 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output {}
2020-10-26 20:08:29 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:29 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:29 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:30 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:30 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:30 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:30 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:30 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:30 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:08:30 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 5 seconds
2020-10-26 20:08:30 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=axis>
2020-10-26 20:08:30 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:30 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:30 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:30 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:35 DEBUG (MainThread) [axis.api] {}
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi {'json': {'method': 'getApiList', 'apiVersion': '1.0', 'context': 'Axis library'}}
2020-10-26 20:08:35 DEBUG (MainThread) [httpx._client] HTTP Request: POST http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi "HTTP/1.1 404 Not Found"
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] <Response [404 Not Found]>, 404 Client Error: Not Found for url: http://axis02.in.edevau.net:80/axis-cgi/apidiscovery.cgi
2020-10-26 20:08:35 DEBUG (MainThread) [axis.api] ''
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties {}
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand {}
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile {}
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input {}
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort {}
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output {}
2020-10-26 20:08:35 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.StreamProfile "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:35 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Input "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:35 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Properties "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:35 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Brand "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:35 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.Output "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:35 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://axis02.in.edevau.net:80/axis-cgi/param.cgi?action=list&group=root.IOPort "HTTP/1.1 401 Unauthorized"
2020-10-26 20:08:35 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:35 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:08:35 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 10 seconds
2020-10-26 20:08:36 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:36 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:36 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:36 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection
2020-10-26 20:08:36 DEBUG (MainThread) [axis.vapix] peer unexpectedly closed connection

And: during error state (with the broken cam's not removed), the box runs out of filehandles after ~20 hours:

2020-10-26 15:37:41 ERROR (MainThread) [homeassistant.components.rest.data] Error fetching data: http://172.16.4.37/status failed with [Errno 24] Too many open files
2020-10-26 15:37:41 ERROR (MainThread) [homeassistant.components.rest.data] Error fetching data: http://172.16.4.37/status failed with [Errno 24] Too many open files
2020-10-26 15:37:41 ERROR (MainThread) [homeassistant.components.rest.data] Error fetching data: http://172.16.4.37/status failed with [Errno 24] Too many open files
2020-10-26 15:37:41 ERROR (MainThread) [homeassistant.components.rest.data] Error fetching data: http://172.16.4.37/status failed with [Errno 24] Too many open files

but I am not sure if this is caused by this error, I'll remove the broken camera and let it run.
This is a new behavior since 0.117.0b, 0.116.4 did run 1 week with the same config.

The file handle error is probably a point where clean up isn't handled properly

Now I set anonymous viewing to on.
Also tried the other two switches in the HTTP section.
Still the same.

What do you mean by: And: during error state (with the broken cam's not removed), the box runs out of filehandles after ~20 hours

The camera shouldn't load with the integration if setup fails

Not sure if this is related, this message appears ~10 times/minute, afaik axis is currently the only component calling httpx.

/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7f9b2c4d2c40>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(

after approx. 20 hours, the webserver stopped working, and the log is filled with messages like that:

2020-10-26 16:25:59 ERROR (MainThread) [homeassistant.components.rest.switch] Error while fetching data: Cannot connect to host 172.16.4.37:80 ssl:default [Too many open files]
2020-10-26 16:25:59 ERROR (MainThread) [homeassistant.components.rest.data] Error fetching data: http://172.16.4.37/status failed with [Errno 24] Too many open files
...
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 172.16.4.37:80 ssl:default [Too many open files]
2020-10-26 15:44:27 ERROR (MainThread) [homeassistant.components.rest.switch] Error while fetching data: Cannot connect to host 172.16.4.37:80 ssl:default [Too many open files]
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 907, in _connect_sock
    sock = socket.socket(family=family, type=type_, proto=proto)
  File "/usr/lib/python3.8/socket.py", line 231, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 24] Too many open files

It seems to load with 0.117.0b3:
Bildschirmfoto 2020-10-26 um 20 39 27

Yes, I will fix that. When it fails to connect it doesn't clean up the httpx session 馃憤馃徎

It seems to load with 0.117.0b3:
Bildschirmfoto 2020-10-26 um 20 39 27

Ok, but it doesn't work?

Nope. Entity not available, Lovelace shows a broken Image:
Bildschirmfoto 2020-10-26 um 20 43 59

I tried a 5.75 device I have and it worked fine to add to hass and loaded as expected. I don't have any device old enough to try. I can possibly try to get a hold of one tomorrow.

Ah cool. If you can't get one, just let me know, we can set up access for you on one of mine.
Yes I know these are old. But they still do OK.

We can try that directly if you want to, I'd rather look at it some more right now :)

sure, give me a minute.

The failed connections appear more often than I thought:

2020-10-26 20:42:32 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:42:32 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
2020-10-26 20:43:53 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:43:53 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde79727b50>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 20:45:14 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:45:14 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde670b8c10>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 20:46:34 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:46:34 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde6cd6dd00>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 20:47:55 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:47:55 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde7973f070>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 20:49:16 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:49:16 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
2020-10-26 20:50:36 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:50:36 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde691eb340>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 20:51:57 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:51:57 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde89e0e580>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde6cf1bf40>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde6672d370>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 20:53:18 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:53:18 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde7973b0d0>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 20:54:38 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:54:38 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
2020-10-26 20:55:59 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:55:59 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde881d1250>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 20:57:19 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:57:19 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
2020-10-26 20:58:40 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 20:58:40 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde7970e130>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 21:00:01 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 21:00:01 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde667bad90>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 21:01:22 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 21:01:22 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde6cd013a0>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 21:02:42 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 21:02:42 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde89dce730>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 21:04:03 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 21:04:03 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde6671cd90>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 21:05:23 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 21:05:23 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde6f912b50>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
  warnings.warn(
2020-10-26 21:06:44 ERROR (MainThread) [homeassistant.components.axis] Error connecting to the Axis device at axis02.in.edevau.net
2020-10-26 21:06:44 WARNING (MainThread) [homeassistant.config_entries] Config entry for axis not ready yet. Retrying in 80 seconds
/usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7fde670cd9a0>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.

It would have to if it should fill the file descriptors :)

can I write you a private message with ip and credentials?
or can we limit access to a fixed ip of yours?

PM me on hass forum or on discord (Robban)

you have mail.

I'm way down in httpx code right now and can't really find anything special, for some reason the camera disconnects from the web request. Could you do a network trace and compare what is sent to the camera to see if there are any http options that differ between old and new implementations?

It might be that this old firmware doesn't actually follow the specification properly.

Good morning. Sure, tcpdump or wireshark?

I just looked at your tcpdump above and you get multiple HTTP: HTTP/1.1 200 OK from the device meaning it should say that authentication has been ok. Just a short break down; if you get 401 unauthorised the client retries by authenticating using the digest authentication method, which is default for all devices.

If you can catch for both tcpdump and Wireshark would be great

If you want to simplify for yourself you would just run the axis library from the command line; python3 -m axis 192.168.0.90 root pass -p 80 --params -D

OK, thanks, this is a big help, now I can leave the production box untouched.

And I discovered another strange thing: On my Python 3.8 test box I have a environment variable with a http proxy set: export http_proxy=ampx.in.edevau.net:3128. Looks like this is honored, with this one set, axis-41 behaves very different, it has nearly the same console output as the (working) axis-37 (ending with two set of curly brackets), at least it does not die with a bunch of python exceptions. I have the same http proxy set in the production HA box, but there this variable seems not to be honored when the component is called from HA. I could not find requests in the proxie's access log. If I make sure the env is set in the shell HA runs, I can see requests at the proxy from the axis component, but the behavior is the same, the debug outputs include the /usr/lib/python3.8/site-packages/httpx/_client.py:1781: UserWarning: Unclosed <httpx.AsyncClient object at 0x7ffa08074730> we saw yesterday.

I now have 9 files for you:

  • One with the tcpdump -ni console output,
  • one with the output of the axis component,
  • and a pcap dump, captured at the ethernet interface of the testbox,

for each:

  • axis-37
  • axis-41 (directly to cam), dies with exceptions
  • axis-41 (with http proxy set)

I set a filter, only relevant packets should be stored/shown:

172.16.2.228 cam
172.16.2.4   proxyserver
172.16.2.23  testbox

axis-41.tcpdump.txt
axis-41.pcap.zip
axis-41.consoleoutput.txt
axis-41_via_proxy.tcpdump.txt
axis-41_via_proxy.pcap.zip
axis-41_via_proxy.consoleoutput.txt
axis-37.tcpdump.txt
axis-37.pcap.zip
axis-37.consoleoutput.txt

If you need anything else, just let me know.

Looking at the axis-41.pcap it seems all data is sent back to the client. So it seems that it responds properly on the first two requests looking at it. And after that it fails. A difference here is that the library has changed to do multiple requests at once and then wait on all responses.

A different perspective of this issue; since you're running pre 5.50 firmware the only thing the Axis integration offers compared to the generic camera platform is some specialised device data, if we don't get this solved you can just run the camera platform as a work around.

Yep.

camera:
  - platform: mjpeg
    mjpeg_url: http://axis02.in.edevau.net/mjpg/video.mjpg
    still_image_url: http://axis02.in.edevau.net/jpg/1/image.jpg
    username: hass
    password: !secret axispx
    authentication: digest
    name: frontdoor

just did the job. Sorry for not having this idea :-)
Was so focused on the axis component, it did it's work well for years.
I wonder how many of these older cams live out there, perhaps this is worth mentioning in the docs.

For me it's OK now, if you want to debug further, let me know how I can help.
If it's OK for you, please close this Ticket.

Thanks a lot for your work on Home Assitant.

This is still a possible issue for users, I'd like to keep it open to see if others get the same issue and on what kind of setups as well.

Thanks for your help!

You are very welcome!

I've got the same problem with the released 0.117.

AXIS M1025 with firmware version: 5.51.7.1.

Happy to do any captures, I'll try get some debug logs on the next restart if you like

If you can try to get better logs out of the camera that would be good. It seems I will need to get a hold of a 5.51 device myself

Same here after installing 0.117
Running an old M1011 with firmware 5.20.3

can confirm - same problem here.

homeassistant on docker 0.117
AXIS M1114 Network Camera, Firmware version: 5.51.5.1

@Kane610 if you can use my very old one I can turn on the DNAT again.

@Kane610 if you can use my very old one I can turn on the DNAT again.

Thanks! Maybe if the httpx guys needs a device to query, I'll get back to you in that case!

I'll turn it on over the weekend, just in case.

Axis M3024-Lve firmware 5.51.7.1 also stopped working on HA 0117.1

The same issue with my Axis M1034-W with firmware 5.51.7.1.
Stopped working on HA 0.117.0 and HA 1.117.1 (failed to connect).

Please refrain from doing me too posts. Do a like on the first post unless you have other data to share than is already available. There is a forum thread for this I think.

I'm awaiting a response from the httpx developers right now. I think it's a combination of the library and the older webbserver of the affected firmware

@onkelbeh I've shared the credentials with a HTTPx developer, can you keep the device available some more time?

Good afternoon!
After updating HA 0.117.0. AXIS M1011 has stopped working.
The HA 0.117.2 update did not fix the problem.
I still get: Failed to connect.

Logger: homeassistant.components.axis
Source: components / axis / device.py: 287
Integration: Axis (documentation, issues)
First occurred: 14:43:01 (1 occurrences)
Last logged: 14:43:01

Error connecting to the Axis device at 10.123.10.102

No changes has been made since we're still investigating why certain releases doesn't work

@Kane610 sure, as long you don't tell anyone what we are doing here.
please let me know if one of our cars gets stolen rofl

Thanks @onkelbeh

Seems they found at least one case HTTPx doesn't handle compared to requests: https://github.com/encode/httpx/issues/1378

There are some solution to that ? Our cameras still not working. Thanks to help us

you could do what i did to get it at least working a bit; add this in your configuration.yaml:

camera:
  - platform: mjpeg
    mjpeg_url: http://<ip_of_your_cam>/mjpg/video.mjpg
    still_image_url: http://<ip_of_your_cam>/jpg/1/image.jpg
    username: username
    password: password
    authentication: digest
    name: <name_of_your_camera>

works again, but refresh rate is ~1s or so. better than nothing.

you could do what i did to get it at least working a bit; add this in your configuration.yaml:

camera:
  - platform: mjpeg
    mjpeg_url: http://<ip_of_your_cam>/mjpg/video.mjpg
    still_image_url: http://<ip_of_your_cam>/jpg/1/image.jpg
    username: username
    password: password
    authentication: digest
    name: <name_of_your_camera>

works again, but refresh rate is ~1s or so. better than nothing.

Hello I already had the camera working by - platform: ffmpeg, is very stable and works, but for me is not a solution because with integration we had all the camera sensors avilibles in HA. Presence sensor is basic, sound detection and so one..
I don't know why is not solved yet

Same type of issue for me.
AXIS P3343
Firmware version: 5.51.6

upgraded core to 0.117.5 and no more camera.

/Micke

No real progress except that the cause has been identified and the lib will probably not fix it. I am swamped at work for another week before I can get back at anything ha related

No real progress except that the cause has been identified and the lib will probably not fix it. I am swamped at work for another week before I can get back at anything ha related

Appreciate all the effort. Thanks!

That's a bad thing when a replacement library does not support everything what the old one did. Unfortunately there's no way to update the webserver on the cams. First I thought: woww, a great new library, looked like many integrations are migrating to it. Just looked at the upstream lib's ticket, there seems to be progress.

For me it's OK now, cleaned up and changed my cam setup, got a discarded QNAP from work, which now replaces my much older QNAP, this one has QVR Pro for 16 cams installed, so I now went to the pyqvrpro component, much easier for the cams now, they have to send only one stream, and the QNAP feeds Home Assistants views. And this pulls in the motion sensors again.

Thanks a lot for your work.
I turned off the NAT to the old cam, let me know if you need it again.

There is a PR open to add support for the non-rfc compliant line endings here https://github.com/python-hyper/h11/pull/115

Thanks for the update @bdraco ! Hadn't heard anything for some time so I was ready to revert back to requests

That's a bad thing when a replacement library does not support everything what the old one did. Unfortunately there's no way to update the webserver on the cams. First I thought: woww, a great new library, looked like many integrations are migrating to it. Just looked at the upstream lib's ticket, there seems to be progress.

For me it's OK now, cleaned up and changed my cam setup, got a discarded QNAP from work, which now replaces my much older QNAP, this one has QVR Pro for 16 cams installed, so I now went to the pyqvrpro component, much easier for the cams now, they have to send only one stream, and the QNAP feeds Home Assistants views. And this pulls in the motion sensors again.

Thanks a lot for your work.
I turned off the NAT to the old cam, let me know if you need it again.

The main issue is that there are so many Axis devices with different firmware versions so its hard for me to verify changes properly. But lets hope it gets fixed going forward :)

@onkelbeh the developer working on fixing the issue in the lower library (@cdeler) would like access to the device to verify improvements work as expected. Would you mind exposing it once more?

Waiting for @onkelbeh may I help with one of my Axis? @Kane610 sent PM on Hass forum

Thanks @wonderiuy! I've shared the details with @cdeler

Same problem here with a M1054W cam. Seems like the integration is trying to reach /axis-cgi/apidiscovery.cgi and this does not exist on the cam. Cam is returning HTTP 404 to HA, that error is incorrectly handled as "unable to connect".

Same problem with a AXIS M3203 Network Camera.

Any news on this issue?

They are touching up the last details. https://github.com/python-hyper/h11/pull/115#issuecomment-733189772

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sogeniusio picture sogeniusio  路  3Comments

sh0rez picture sh0rez  路  3Comments

Konstigt picture Konstigt  路  3Comments

flsabourin picture flsabourin  路  3Comments

neonandu picture neonandu  路  3Comments