TECH7Fox / asterisk-hass-addons

Asterisk add-on for Home Assistant

Home Page:https://tech7fox.github.io/sip-hass-docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Addon Ver.4.0.2 freezes the HA

alex-v-fraser opened this issue · comments

Hello!
Addon Ver.3 worked fine.
Addon Ver.4.0.2 freezes the HA. After installing addon I go to its settings, fill AMI Password and the Auto add secret and enable auto add extension for HA users, then push "Save" and "Start addon" - After that it freezes, I can't open Addons page, then I go to logs and I can't read Asterisk and Supervisor logs. I even can't open Backups page. I have to reload raspberrypi with sudo shutdown - r now comand and then HA starts for a very long time (about 10-15mins). Asterisk Addon doesn't start, though I set it to start when system starts. Then I can see Backups page and restore my HA from backup. I did it 2 times. Please help.

System Information

version core-2023.3.6
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.10
os_name Linux
os_version 5.15.76-v8+
arch aarch64
config_dir /config
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Debian GNU/Linux 11 (bullseye)
update_channel stable
supervisor_version supervisor-2023.03.2
agent_version 1.4.1
docker_version 20.10.22
disk_total 113.1 GB
disk_used 11.8 GB
healthy true
supported true
supervisor_api ok
version_api ok
installed_addons Mosquitto broker (6.1.3), Zigbee2MQTT (1.30.2-1), File editor (5.5.0), ESPHome (2023.3.1), Studio Code Server (5.5.4), Samba share (10.0.0)
Dashboards
dashboards 1
resources 0
views 1
mode storage
Recorder
oldest_recorder_run March 24, 2023 at 12:59 PM
current_recorder_run March 27, 2023 at 4:35 PM
estimated_db_size 827.49 MiB
database_engine sqlite
database_version 3.38.5

I had the same issues.

I'm mirating my Home Assistant OS to proxmox enviroment manually.

It freeze the home assistant when installing the Asterisk Add Ons

"Can't install ghcr.io/tech7fox/asterisk-hass-addon:4.0.2: 404 Client Error for http+docker://localhost/v1.41/images/ghcr.io/tech7fox/asterisk-hass-addon:4.0.2/json: Not Found ("no such image: ghcr.io/tech7fox/asterisk-hass-addon:4.0.2: No such image: ghcr.io/tech7fox/asterisk-hass-addon:4.0.2")"

it shows while installing

@Sashik259 what hardware do you have? Raspberry 4?
Do you also get the message "can't install ghcr.io/tech7fox/asterisk-hass-addon:4.0.2"?

@radoprajitno what hardware are you running it on?

And @radoprajitno can you try again? GitHub had some issues lately.

If it was Github packages not working, HA couldn't find the image so it tried to build it itself, but on a Raspberry that takes quite a long time. Should be fixed now though. Please try again and see if the issue remains.

Hi @TECH7Fox ..
Thanks for the replies.. Admire and love your works here..

Ive just tried. Still the same issues..

Weird. I just tried it on my raspberry pi 3b+ and it seems to be downloading and starting just fine.

[supervisor.docker.interface] Downloading docker image ghcr.io/tech7fox/asterisk-hass-addon with tag 4.0.2.
23-03-28 14:16:38 INFO (MainThread) [supervisor.addons] Add-on 'b35499aa_asterisk' successfully installed

Raspberry 4?

Yes. I tried to install it just now.

Do you also get the message "can't install ghcr.io/tech7fox/asterisk-hass-addon:4.0.2"?

No. Addon is installed, but it can't start (pressing "Start" freezes everything as I described above)

After 15 minutes after installing Addon and pressing "Start" I try to show Addons page:
screenshot

@TECH7Fox Can I give you more info or restore my HA from backup?

I changed the way the images are built drastically. Now we use Buildx to build the multi-platform images and have them all pushed under the same tag (https://github.com/users/TECH7Fox/packages/container/package/asterisk-hass-addon). Whereas before there was a tag for each architecture.

The new format is the modern one since Docker registry support multiple archs in the same tag. Some add-ons, like Frigate, uses this approach as well (without issues I guess).

Let's try to isolate the issue:

@Sashik259 @radoprajitno what are the architectures you are running on?

linux/arm/v6
linux/arm/v7
linux/arm64

@TECH7Fox which one did you try and worked?

@felipecrs Full system info is at start of the issue

Arm64. @TECH7Fox I guess your R3b+ is armv7 or something, right?

Hi @felipecrs ,

im runing on amd64..
do you need some more infos? Ill try to post out the infos.

amd64? I'm also running on amd64 without any problems...

Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:125
Integration: Home Assistant Supervisor
First occurred: 7:54:54 PM (2 occurrences)
Last logged: 8:46:47 PM

Failed to to call /addons/3e533915_asterisk/install - Can't install ghcr.io/tech7fox/asterisk-hass-addon:4.0.2: 404 Client Error for http+docker://localhost/v1.41/images/ghcr.io/tech7fox/asterisk-hass-addon:4.0.2/json: Not Found ("no such image: ghcr.io/tech7fox/asterisk-hass-addon:4.0.2: No such image: ghcr.io/tech7fox/asterisk-hass-addon:4.0.2")

the time are in GMT+7 (jakarta Time)

@felipecrs hmmm.. Ive just try to install other add on and it works normal.
can i provide you more info?

I'm mirating my Home Assistant OS to proxmox enviroment manually.

@felipecrs He (radoprajitno) told something about proxmox VE
I guess I don't know about it, but if it is helpfull

Well, @radoprajitno, your issue apparently has nothing to do with @Sashik259 issue. Can you open a separate issue?

@felipecrs sure. Thanks anw

Just to summarize, ARM64 variant seems to be causing HaOS to freeze. It would be nice if we could get the add-on logs with log level "all" when this happens.

@Sashik259 is there any chance you can provide that?

It would be nice to have someone else try the same with ARM64 to check if it's only you or not.

@felipecrs my pi should be aarch64.

Ok... last hope seems to be the logs then. :)

Maybe it has something to do with the initialization logic causing some kind of infinite loop. Logs would supposedly help with that.

I can't load logs
screenshot3
screenshot2

With the SSH community add-on with protection mode disabled, you have access to docker. Maybe, before starting the add-on, keep the command prepared:

docker logs -f addon_b35499aa_asterisk

And when you start the add-on, immediately also start the docker logs command. Maybe that helps.

I don't know what went wrong with my HA, but after installing and starting SSH addon I got the same issue: everything freezes, can't load logs and backups. After restoring from backup I tried to get Supervisor log - it was impossible too (error 502).
I found this article and did as described there. Now I can see all logs and Asterisk addon works fine!
Thank You very much!
[Mar 29 15:21:04] == Manager registered action DeviceStateList
[Mar 29 15:21:04] == res_manager_devicestate.so => (Manager Device State Topic Forwarder)
[Mar 29 15:21:05] Asterisk Ready.

Interesting. Happy that it ended up working for you.