Comments (11)
@james-fry maybe when you copied the files don't have correct permissions and the entry point script didn't get into your container.
You could try docker exec -it <your_local_container_name> /bin/bash
and then explore a bit what's inside the /app
Also make sure you have the latest changes from the repo.
from hassio-zigbee2mqtt.
This is an odd one. I've tested building locally both on my raspberry pi 3 running hassio and with a hassio vagrant box, and haven't run into this issue. I'll keep looking into it, but can't reproduce it locally. Does this happen with other add-ons you've built locally?
from hassio-zigbee2mqtt.
Later edit: I think I had the version before the last commit to set_config.py
. It is now working on the Orange Pi. I will now look into pm2
.
I was able to reproduce startup errors with the latest build. I had to dig a lot to fix basic starting problems on my new orange pi (see home-assistant/supervisor#477) but It was really annoying to build locally on a rpi1 :-)
The errors I see so far - that I will try to patch today:
Traceback (most recent call last):
File "/data/options.json", line 3, in <module>
"homeassistant": true,
NameError: name 'true' is not defined
> [email protected] start /app
> node index.js
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open '/share/zigbee2mqtt/configuration.yaml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at read (/app/lib/util/settings.js:32:24)
at Object.<anonymous> (/app/lib/util/settings.js:7:12)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-05-22T20_04_11_944Z-debug.log
from hassio-zigbee2mqtt.
It doesn't build locally now on my Orange Pi
18-05-23 17:32:02 ERROR (SyncWorker_14) [hassio.docker.addon] Can't build local/aarch64-addon-zigbee2mqtt:1.0: The command '/bin/sh -c apk add --update --no-cache jq nodejs nodejs-npm python3 python3-dev python2 make gcc g++ linux-headers udev git && pip3 install PyYAML && git clone -b master --single-branch --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /app' returned a non-zero code: 159
from hassio-zigbee2mqtt.
@ciotlosm Can't replicate that. That's an issue at the Dockerfile / container creation level, which hasn't changed in over a week. Is the 159
error code indicative of running out of resources?
from hassio-zigbee2mqtt.
@danielwelch I never tried to build on generic linux or orange pi. Previously I had a RPI1 which was killing me at how slow it was doing things, so this is a new setup. I don't know what to try to fix it.
It seems even a simple command like 18-05-23 17:47:07 ERROR (SyncWorker_17) [hassio.docker.addon] Can't build local/aarch64-addon-zigbee2mqtt:1.0: The command '/bin/sh -c apk update' returned a non-zero code: 159
fails
I think it has something to do with apk and what it's being used as BUILD_FROM
from hassio-zigbee2mqtt.
I've successfully built locally on Raspberry pi 3 as well as virtualbox linux, and of course the travis build is successful if the Docker image is built successfully (which is your problem here). Wouldn't think it'd be a resources issue if you didn't have this problem on Rpi1 but are having it now with new hardware.
from hassio-zigbee2mqtt.
Let me try on RPI3 (production) with same setup to eliminate human error on my side :-)
Update: On the RPI3 it builds, so it must be a build dependency not specified that it's missing on the host OS for Orange Pi
from hassio-zigbee2mqtt.
@danielwelch Found the problem I think. It's the same stupid seccomp. I removed it from addon start, but not from addon build. I'll have to patch the supervisor again ....
from hassio-zigbee2mqtt.
Does this happen with other add-ons you've built locally?
No - all working well
You could try docker exec -it <your_local_container_name> /bin/bash and then explore a bit what's inside the /app
Its not so easy since the container quits as soon as it starts due to the issue with the CMD. You can only attach to a running container...
So I ran:
docker export addon_local_zigbee2mqtt_jf > addon_local_zigbee2mqtt_jf.tar
then explored the image fs in the resulting tar.
I can see nothing wrong with the image... the /app dir has run.sh and set_config.py present.
run.sh is executable (+x)
I'm going to try it again from scratch... but I am pretty sure I will see the same.
from hassio-zigbee2mqtt.
OK started this again.
- Deleted all zigbee2mqtt addons
- Deleted any related images
- Downloaded the zip from GH
- Extracted the zigbee2mqtt folder to hassio addons
- Edited config.json to remove image
- Installed the local addon to trigger build.
Build log from hassio supervisor:
18-05-23 21:37:01 INFO (MainThread) [hassio.addons.addon] Create Home-Assistant addon data folder /data/addons/data/local_zigbee2mqtt
18-05-23 21:37:01 INFO (SyncWorker_4) [hassio.docker.addon] Start build local/amd64-addon-zigbee2mqtt:test
18-05-23 21:38:32 INFO (SyncWorker_4) [hassio.docker.addon] Build local/amd64-addon-zigbee2mqtt:test done
... and it works!
😄
Dunno what when wrong before.
from hassio-zigbee2mqtt.
Related Issues (20)
- Feature - unsupported devices wizard/report tool HOT 4
- Can't remove deprecated options from configuration HOT 10
- OSRAM AC03648 randomly loosing connection
- Switching from Z-Stack 3.0.x to 1.2 returns error "Backup is only supported for Z-Stack 3" and zigbee2mqtt doesn't start HOT 2
- [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart' HOT 22
- Syntax error when adding new device HOT 2
- Socat unable to create Serial Device in /dev HOT 4
- Addon will not start with shae.sh RPi4 HASS HOT 1
- friendly_name shoud atleast be 1 char long HOT 7
- Ignore serial: section in configuration.yaml HOT 4
- Zigbee2MQTT:error HOT 3
- Template variable warning: 'dict object' has no attribute 'operation_mode'
- Archive this repository HOT 4
- 502 Bad Gateway HOT 2
- 502 bad gateway with zigbee CC2652R stick HOT 10
- Ikea Tradfri GU10 bulb issue TRADFRIbulbGU10WS345lm HOT 5
- 502: Bad gateway on new install with Con Bee 2 as addon to HA placed on VM HOT 5
- Sonoff Zigbee 3.0 USB Dongle Plus - is it bricked?
- ENOENT: no such file or directory, open '/config/zigbee2mqtt/secret.yaml'
- Error: unknown resource type "addons"
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 hassio-zigbee2mqtt.