Git Product home page Git Product logo

Comments (11)

ciotlosm avatar ciotlosm commented on August 23, 2024 1

@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.

danielwelch avatar danielwelch commented on August 23, 2024

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.

ciotlosm avatar ciotlosm commented on August 23, 2024

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.

ciotlosm avatar ciotlosm commented on August 23, 2024

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.

danielwelch avatar danielwelch commented on August 23, 2024

@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.

ciotlosm avatar ciotlosm commented on August 23, 2024

@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.

danielwelch avatar danielwelch commented on August 23, 2024

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.

ciotlosm avatar ciotlosm commented on August 23, 2024

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.

ciotlosm avatar ciotlosm commented on August 23, 2024

@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.

james-fry avatar james-fry commented on August 23, 2024

@danielwelch

Does this happen with other add-ons you've built locally?

No - all working well

@ciotlosm

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.

james-fry avatar james-fry commented on August 23, 2024

OK started this again.

  1. Deleted all zigbee2mqtt addons
  2. Deleted any related images
  3. Downloaded the zip from GH
  4. Extracted the zigbee2mqtt folder to hassio addons
  5. Edited config.json to remove image
  6. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.