Comments (32)
Confirmed. It is working now!
Good job!
from asterisk-hass-addons.
The issue only happens from the image built from GitHub Actions, it does not happen when building locally, either with or without Buildkit.
from asterisk-hass-addons.
[cont-init.d] asterisk.sh: exited 0.
[cont-init.d] asterisk_mbox.sh: executing...
[cont-init.d] asterisk_mbox.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[...]
[20:46:17] INFO: Successfully send discovery information to Home Assistant.
[20:46:18] INFO: Starting Asterisk...
[20:46:20] INFO: Starting Asterisk...
[20:46:22] INFO: Starting Asterisk...
[20:46:23] INFO: Starting Asterisk...
[20:46:25] INFO: Starting Asterisk...
[20:46:26] INFO: Starting Asterisk...
[20:46:28] INFO: Starting Asterisk...
[20:46:29] INFO: Starting Asterisk...
[20:46:31] INFO: Starting Asterisk...
[20:46:32] INFO: Starting Asterisk...
[20:46:33] INFO: Starting Asterisk...
[20:46:34] INFO: Starting Asterisk...
[20:46:35] INFO: Starting Asterisk...
[20:46:37] INFO: Starting Asterisk...
[20:46:38] INFO: Starting Asterisk...
[20:46:40] INFO: Starting Asterisk...
[20:46:41] INFO: Starting Asterisk...
[20:46:43] INFO: Starting Asterisk...
[20:46:46] INFO: Starting Asterisk...
[20:46:47] INFO: Starting Asterisk...
[20:46:48] INFO: Starting Asterisk...
[20:46:49] INFO: Starting Asterisk...
[20:46:52] INFO: Starting Asterisk...
[20:46:54] INFO: Starting Asterisk...
[20:46:56] INFO: Starting Asterisk...
UPDATE: ok, it seems to be restarting.....
from asterisk-hass-addons.
I do not see any output from asterisk in the log.
However, when I run a shell in the container I can see that it seems to be running.
When trying to do a asterisk -rvvvvdddd
it crashed with an illegal instruction.
Wrong architecture packaged?
from asterisk-hass-addons.
@TECH7Fox
Can you give a hint how exactly you created the docker images?
Have you used something like this?
docker run \
--rm \
-it \
--name builder \
--privileged \
-v /home/tech7fox/asterisk-addon/Asterisk-add-on/asterisk:/data \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
homeassistant/amd64-builder \
-t /data \
--all\
--test \
-i asterisk-addon-{arch} \
-d ghcr.io/tech7fox
This would built images for all architectures....
from asterisk-hass-addons.
That's it. It gets built automatically by this.
from asterisk-hass-addons.
from asterisk-hass-addons.
Apparently, it was trying to run an instruction for AVX2 architecture on a system which lacks support for AVX2 instruction set.
from asterisk-hass-addons.
So, it seems that Asterisk isn't built in a portable way. It gets tied to the environment which first built it.
I suspect there is something in the Makefile to tweak this behavior.
For example, that BUILD_NATIVE.
from asterisk-hass-addons.
I just verfied that my host CPU supports AVX and AVX2 instructions.
So maybe it is not related not it.
I wonder if BUILD_NATIVE was really set when compiling started.
When experimenting with it, I also realized that sometimes an enabled option was disabled again.
However, I verfied that the current source works with builing locally on HAOS and prebuilt with the builder provided by HA.
Strange....
from asterisk-hass-addons.
However, I verfied that the current source works with builing locally on HAOS and prebuilt with the builder provided by HA.
Exactly, that's how we didn't catch it in our tests.
from asterisk-hass-addons.
Let's try to isolate the issue at least. I'm using amd64 and I can replicate the issue. Is there anyone here who is using ARM and also faces the issue?
from asterisk-hass-addons.
I can confirm the issue happens when I build and push the image by myself, with or without Docker Buildkit.
docker build asterisk --push
From my PC, then HA downloads it and same issue happens.
from asterisk-hass-addons.
Fix: #128
from asterisk-hass-addons.
@stefanschoemaker Just out of curiosity: What system do you have?
I am using a Synology DS1821+. It has a AMD Ryzen V1500B CPU.
Home Assistant is installed in a Synology VMM virtual machine using HA OS.
from asterisk-hass-addons.
I'm running a Proxmox host with a Ryzen 3700X and installed HassIO with the original VM image using the following script:
https://raw.githubusercontent.com/Kanga-Who/home-assistant/master/hassos_install.sh
from asterisk-hass-addons.
I have an Intel J4125 Gemini Lake btw.
from asterisk-hass-addons.
v2.0.1 is out, with a fix for this. Could someone other than me test and confirm?
from asterisk-hass-addons.
Yes, I will test it right now.
from asterisk-hass-addons.
I have removed the addon and reinstalled with everyhting clean.
Unfortunately, it does not seem to work properly during startup.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Add-on: Asterisk
PBX server for SIP devices like doorbells and phones
-----------------------------------------------------------
Add-on version: 2.0.1
You are running the latest version of this add-on.
System: Home Assistant OS 7.5 (amd64 / qemux86-64)
Home Assistant Core: 2022.3.5
Home Assistant Supervisor: 2022.03.4
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] asterisk.sh: executing...
[13:47:21] INFO: Configuring certificate...
[13:47:21] INFO: Using existing certificate as 'generate_ssl_certificate' is disabled...
[13:47:21] INFO: Configuring Asterisk...
sending incremental file list
./
sent 2,634 bytes received 20 bytes 5,308.00 bytes/sec
total size is 693,679 speedup is 261.37
[cont-init.d] asterisk.sh: exited 0.
[cont-init.d] asterisk_mbox.sh: executing...
[cont-init.d] asterisk_mbox.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[13:47:22] INFO: Starting Asterisk...
[services.d] done.
[cmd] /bin/bash exited 0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
/usr/lib/bashio/config.sh: line 56: printf: write error: Broken pipe
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
from asterisk-hass-addons.
I have started the container manually with a shell.
I am able to start asterisk without any crash now.
from asterisk-hass-addons.
So something seems to wrong with the init system.
Any new ideas?
from asterisk-hass-addons.
This the command start the container starts:
/init /bin/bash -euxo pipefail -c '#(nop) ' 'ENV ASTERISK_VERSION=18.10.1'
Is this supposed to be like that?
Most other containers with S6 just do:
/init
from asterisk-hass-addons.
Checking
from asterisk-hass-addons.
Ok, I can replicate the issue here.
BTW, we don't change CMD, which gets inherited from the addon-debian-base (which is /init). That's weird. However, this instruction is exactly how we set the SHELL. But that was only meant to be effective in the Dockerfile itself.
from asterisk-hass-addons.
This guy here had the same issue: https://community.home-assistant.io/t/help-figuring-out-why-my-addon-wont-start/326976
It seems he solved it by addig this in his addon docker file:
https://github.com/YoloDev/hass-addons/blob/main/enet/Dockerfile#L25-L26
from asterisk-hass-addons.
I think #130 may also fix the issue.
from asterisk-hass-addons.
@felipecrs
Could you please explain why enabling buildkit solves the issue?
I would like to learn something new… 😉
from asterisk-hass-addons.
Confirmed that it solves the issue:
❯ docker run --pull=always --rm -d ghcr.io/tech7fox/amd64-addon-asterisk:2.0.1 && docker ps | grep asterisk
fa8a0664d824 ghcr.io/tech7fox/amd64-addon-asterisk:2.0.1 "/init /bin/bash -eu…" Less than a second ago Up Less than a second sweet_villani
❯ docker run --pull=always --rm -d ghcr.io/tech7fox/amd64-addon-asterisk:2.0.2 && docker ps | grep asterisk
df7969e82321 ghcr.io/tech7fox/amd64-addon-asterisk:2.0.2 "/init" 1 second ago Up Less than a second magical_nash
from asterisk-hass-addons.
Here's what I found:
The issue only happens when:
Using addon-builder WITHOUT buildkit
That's it.
from asterisk-hass-addons.
@felipecrs Could you please explain why enabling buildkit solves the issue? I would like to learn something new… 😉
Idk why, but buildkit produces different (more modern and less cluttered) image manifests. In the manifest, you can see the CMD being set. So, I had the idea to build with buildkit (which is the default nowadays, the addon-builder is probably lagging behind).
I can't explain why exactly the issue happened.
from asterisk-hass-addons.
I just installed 2.0.2 in my HA and it's working. Can someone else confirm?
from asterisk-hass-addons.
Related Issues (20)
- Improve docker build time when cache misses HOT 3
- Default STUN server timeout in local network HOT 2
- Custom Audio files not working HOT 18
- Mailbox server broken HOT 1
- CI failing HOT 4
- Failed to Install add-on HOT 3
- Revert temp fix for build HOT 3
- Setup a trunk for outbound calls HOT 18
- Addon DNS HOT 15
- Add TFTPD option HOT 10
- No audio when outside my LAN HOT 2
- /config/asterisk/default/pjsip_custom.conf is purged at addon restart HOT 4
- stuff from custom does not make it to default HOT 5
- Asterisk GUI HOT 2
- Help needed: Install addon with docker-compose (without supervisor) HOT 5
- BUG: Can't edit the allowed networks for Manager login HOT 31
- BUG: Can't edit the allowed networks for Manager login HOT 1
- rtsp-app not available on Pi builds HOT 10
- ARM support for app_rtsp_sip HOT 4
- Addon watchdog HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asterisk-hass-addons.