Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ENOENT: no such file or directory, open '/share/zigbee2mqtt/configuration.yaml' #54

Closed
zen opened this issue Sep 22, 2018 · 19 comments

Comments

@zen
Copy link

zen commented Sep 22, 2018

Hi,

Fresh installation, HASSIO conf:
{
"data_path": "/share/zigbee2mqtt",
"homeassistant": true,
"permit_join": false,
"mqtt_base_topic": "zigbee2mqtt",
"mqtt_server": "mqtt://localhost",
"serial_port": "/dev/ttyACM0"
}

I'm getting following error:
[2018-09-22T13:31:20.544Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-22T13:31:20.561Z] PM2 log: App name:npm id:0 online

[email protected] start /zigbee2mqtt-0.1.5
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 (/zigbee2mqtt-0.1.5/lib/util/settings.js:27:29)
at Object. (/zigbee2mqtt-0.1.5/lib/util/settings.js:15:16)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596: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-09-22T11_31_27_251Z-debug.log
[2018-09-22T13:31:28.000Z] PM2 log: App [npm] with id [0] and pid [339], exited with code [1] via signal [SIGINT]
[2018-09-22T13:31:28.007Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-22T13:31:28.023Z] PM2 log: App name:npm id:0 online
[email protected] start /zigbee2mqtt-0.1.5
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 (/zigbee2mqtt-0.1.5/lib/util/settings.js:27:29)
at Object. (/zigbee2mqtt-0.1.5/lib/util/settings.js:15:16)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596: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-09-22T11_31_34_838Z-debug.log
[2018-09-22T13:31:35.394Z] PM2 log: App [npm] with id [0] and pid [355], exited with code [1] via signal [SIGINT]
[2018-09-22T13:31:35.402Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-22T13:31:35.420Z] PM2 log: App name:npm id:0 online
[email protected] start /zigbee2mqtt-0.1.5
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 (/zigbee2mqtt-0.1.5/lib/util/settings.js:27:29)
at Object. (/zigbee2mqtt-0.1.5/lib/util/settings.js:15:16)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596: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-09-22T11_31_42_152Z-debug.log
[2018-09-22T13:31:42.721Z] PM2 log: App [npm] with id [0] and pid [371], exited with code [1] via signal [SIGINT]
[2018-09-22T13:31:42.728Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-22T13:31:42.744Z] PM2 log: App name:npm id:0 online

@zen
Copy link
Author

zen commented Sep 22, 2018

After some playing, it boils down to "log_directory" option. It's optional, but addon was complaining about it, so I added it and created folder. After that even more strange error was thrown:
Traceback (most recent call last):
File "set_config.py", line 97, in
main(args.options_path, args.data_path)
File "set_config.py", line 81, in main
config.set_log_dir(data_path, options['log_directory'])
TypeError: set_log_dir() takes 2 positional arguments but 3 were given

@zen
Copy link
Author

zen commented Sep 22, 2018

Looks like commit 22861b9 broke the functionality, particularly:
22861b9 (Daniel Welch 2018-09-19 15:27:56 -0500 81) config.set_log_dir(data_path, options['log_directory'])

@nismanoke
Copy link

nismanoke commented Sep 23, 2018

Same Issue as i have. #53
I Manually added the configuration.yaml file and the addond does work than except with the error in the log

@danielwelch
Copy link
Owner

My bad everyone. I messed up a check for the option in the python script, which is where the error is coming from. My test config that I use for testing includes the option, so it didn’t catch the error. Thanks for doing the leg work of debugging, I’ll try to have a fix pushed ASAP.

@danielwelch
Copy link
Owner

hopefully this is fixed in the latest release, v0.1.5.1

@nick9one1
Copy link

nick9one1 commented Sep 24, 2018

I seem to get a very similar error -

[email protected] start /app
 node index.js
 /app/node_modules/js-yaml/lib/js-yaml/loader.js:171
  throw generateError(state, message);
  YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 9, column 1:
    
  
    at generateError (/app/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/app/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readBlockMapping (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1046:9)
    at composeNode (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1332:12)
    at readDocument (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1492:3)
    at loadDocuments (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
    at read (/app/lib/util/settings.js:28:17)
    at Object.<anonymous> (/app/lib/util/settings.js:16:16)
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-09-24T19_10_36_579Z-debug.log
[2018-09-24T19:10:37.206Z] PM2 log: App [npm] with id [0] and pid [839], exited with code [1] via signal [SIGINT]
[2018-09-24T19:10:37.212Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-24T19:10:37.228Z] PM2 log: App name:npm id:0 online
> [email protected] start /app
> node index.js
/app/node_modules/js-yaml/lib/js-yaml/loader.js:171
  throw generateError(state, message);
  ^
YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 9, column 1:
    
    ^
    at generateError (/app/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/app/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readBlockMapping (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1046:9)
    at composeNode (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1332:12)
    at readDocument (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1492:3)
    at loadDocuments (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
    at read (/app/lib/util/settings.js:28:17)
    at Object.<anonymous> (/app/lib/util/settings.js:16:16)

I've just remove/reinstalled but still on v 1.5 ?!

@danielwelch
Copy link
Owner

Needed a version update, v0.1.5.1 should be building now. Follow progress here: https://travis-ci.org/danielwelch/hassio-zigbee2mqtt/builds/432654003

@nick9one1
Copy link

nick9one1 commented Sep 25, 2018

It looks like the build has finished and has been pushed, but I still only see v0.1.5.

capture

I've removed the addon and Repository completely, rebooted hass.io, and re-added the repository .

Unfortunately it's still on 0.1.5.

@danielwelch
Copy link
Owner

Not sure what’s going on. Docker hub shows 0.1.5.1 is uploaded appropriately. Sometimes it can take some time to show up (I’ve never troubleshooted why) in the Hassio front end, but successful upload to docker hub was 19 hours ago so should be available.

@dzungpv
Copy link
Contributor

dzungpv commented Sep 25, 2018

@danielwelch zigbe2mqtt 0.1.5 has some serious bug. 0.1.6 fix the bug but the addon not realease and could not install. I see docker image to but after install it is 0.1.5. You should try tag it 0.1.6

@danielwelch
Copy link
Owner

Yes, I’ll put out a 0.1.6 release today. I wonder if there’s a way to subscribe for email updates about releases on a project...

@nick9one1
Copy link

Just noticed 1.6 is out.. Thank you!

Unfortunately I still get the same error...

here is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!
     /root/.npm/_logs/2018-09-26T18_06_23_446Z-debug.log
[2018-09-26T18:06:24.068Z] PM2 log: App [npm] with id [0] and pid [104], exited with code [1] via signal [SIGINT]
[2018-09-26T18:06:24.078Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-26T18:06:24.098Z] PM2 log: App name:npm id:0 online
> [email protected] start /zigbee2mqtt-0.1.6
> node index.js
/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:171
  throw generateError(state, message);
  ^
YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 9, column 1:
    
    ^
    at generateError (/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readBlockMapping (/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:1046:9)
    at composeNode (/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:1332:12)
    at readDocument (/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:1492:3)
    at loadDocuments (/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/zigbee2mqtt-0.1.6/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
    at read (/zigbee2mqtt-0.1.6/lib/util/settings.js:27:17)
    at Object.<anonymous> (/zigbee2mqtt-0.1.6/lib/util/settings.js:15:16)
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-09-26T18_06_30_875Z-debug.log
[2018-09-26T18:06:31.418Z] PM2 log: App [npm] with id [0] and pid [120], exited with code [1] via signal [SIGINT]
[2018-09-26T18:06:31.433Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-26T18:06:31.454Z] PM2 log: App name:npm id:0 online

@danielwelch
Copy link
Owner

@nick9one1 can you open a separate error with your log output? I think your issue is separate. Still want to help though and I think it is probably caused by a bug introduced in my refactor of options handling.

@nick9one1
Copy link

nick9one1 commented Sep 26, 2018

Thanks @danielwelch, although I think I've fixed it.
I noticed the configuration.yaml was incorrect -

image

while this is what I set in the addon

image

I set it manually and the gateway seems to be working :)

@zen
Copy link
Author

zen commented Sep 26, 2018

Seems to be fixed in 1.6. Thanks a lot mate!

@zen zen closed this as completed Sep 26, 2018
@Kepro
Copy link

Kepro commented Jul 26, 2019

today installation... version 1.5.1.1 and got
./run.sh: line 20: /share/zigbee2mqtt/configuration.yaml: No such file or directory

node index.js
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open '/share/zigbee2mqtt/configuration.yaml'

@PapaErde
Copy link

Had this too. Because of missing the directory zigbee2mqtt i created one in /share/, suddenly all files were in the directory. addon seems to run...

./run.sh: line 15: [Info] Configuration backup found in /share/zigbee2mqtt/.configuration.yaml.bk. Skipping config backup.: No such file or directory
2019-07-27T12:24:08: PM2 log: Launching in no daemon mode
2019-07-27T12:24:08: PM2 log: App [npm:0] starting in -fork mode-
2019-07-27T12:24:08: PM2 log: App [npm:0] online

[email protected] start /zigbee2mqtt-1.5.1
node index.js
zigbee2mqtt:info 7/27/2019, 12:24:13 PM Logging to directory: '/share/zigbee2mqtt/log/2019-07-27.12-24-12'
zigbee2mqtt:info 7/27/2019, 12:24:13 PM Starting zigbee2mqtt version 1.5.1 (commit #unknown)
zigbee2mqtt:info 7/27/2019, 12:24:13 PM Starting zigbee-shepherd
zigbee2mqtt:info 7/27/2019, 12:24:15 PM zigbee-shepherd started
zigbee2mqtt:info 7/27/2019, 12:24:15 PM Coordinator firmware version: '20190425'
zigbee2mqtt:info 7/27/2019, 12:24:15 PM Currently 0 devices are joined:
zigbee2mqtt:warn 7/27/2019, 12:24:15 PM permit_join set to true in configuration.yaml.
zigbee2mqtt:warn 7/27/2019, 12:24:15 PM Allowing new devices to join.
zigbee2mqtt:warn 7/27/2019, 12:24:15 PM Set permit_join to false once you joined all devices.
zigbee2mqtt:info 7/27/2019, 12:24:15 PM Zigbee: allowing new devices to join.
zigbee2mqtt:info 7/27/2019, 12:24:15 PM Connecting to MQTT server at mqtt://homeassistant:1883
zigbee2mqtt:info 7/27/2019, 12:24:15 PM zigbee-shepherd ready
zigbee2mqtt:info 7/27/2019, 12:24:16 PM Connected to MQTT server
zigbee2mqtt:info 7/27/2019, 12:24:16 PM MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
zigbee2mqtt:info 7/27/2019, 12:24:17 PM MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.5.1","commit":"unknown","coordinator":20190425,"log_level":"info","permit_join":true}'
zigbee2mqtt:info 7/27/2019, 12:25:16 PM New device 'undefined' with address 0x00158d0003230c10 connected!
zigbee2mqtt:info 7/27/2019, 12:25:16 PM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":"0x00158d0003230c10","meta":{}}'
zigbee2mqtt:warn 7/27/2019, 12:25:16 PM Device with modelID 'undefined' is not supported.
zigbee2mqtt:warn 7/27/2019, 12:25:16 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
zigbee2mqtt:warn 7/27/2019, 12:25:16 PM Device with modelID 'undefined' is not supported.
zigbee2mqtt:warn 7/27/2019, 12:25:16 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
zigbee2mqtt:warn 7/27/2019, 12:25:16 PM Device with modelID 'undefined' is not supported.
zigbee2mqtt:warn 7/27/2019, 12:25:16 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html

@NCGNConsulting
Copy link

Hello,

I'm getting this in log text. I'm using Home assistant with docker.

(node:2729) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/config/zigbee2mqtt/.yaml'

Current folder structure is /usr/share/hassio/homeassistant/zigbee2mqtt

so no config folder, and guess creating it will not help, as it is in other root folder than HA.

Can anyone help me?

Thank you.

@jaaphummel
Copy link

Hello,

I'm getting this in log text. I'm using Home assistant with docker.

(node:2729) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/config/zigbee2mqtt/.yaml'

Current folder structure is /usr/share/hassio/homeassistant/zigbee2mqtt

so no config folder, and guess creating it will not help, as it is in other root folder than HA.

Can anyone help me?

Thank you.

Did you fix this ? Im having the same issue recently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants