balena-labs-projects / balena-node-red

a node-red application with balena-supervisor support, can be managed remotely via balena publicURL
Apache License 2.0
60 stars 59 forks source link

Unable to login on new alpine Node-red #7

Closed TristanCP closed 6 years ago

TristanCP commented 7 years ago

I've added USERNAME and PASSWORD in "DEVICE ENVIRONMENT VARIABLES", encoding my password with "node-red-admin hash-pw" since brcyptjs is not available, but I can't login ("login failed").

What can I do to debug this ?

Here are my USERNAME and encoded PASSWORD :

USERNAME : admin PASSWORD : $2a$08$p7SNNZKTCvepTYQRxzwG0O5cVpWgoiILViIaFd7XW7FbWVcGacqMu (hash for "linc123" without quotes)

I've try to restart app and even reboot device but with no success.

I had no problem with your Node-red on debian image.

Niko-La commented 6 years ago

I am having the same issue. Can not login in the node-red console to deploy flows

TristanCP commented 6 years ago

Well apparently curcuz is not maintaining this project, or at a very low priority and it's now in an unusable state.

Just take an old commit and it will work fine on a debian image : https://github.com/resin-io-projects/resin-node-red/tree/5a0674aa8008f961bf24c35d2654c7302e50b918

curcuz commented 6 years ago

@TristanCP @Niko-La will revert back to Debian if I confirm the issue is Alpine here.

curcuz commented 6 years ago

the issue is related on how the env vars are parsed within the alpine container userspace. Hard-coding the same values in the setting.js file works. Now to discover what's the issue with alpine base images and env vars.

petrosagg commented 6 years ago

I think the reason for this problem is how our init script handles env vars. I opened an issue here https://github.com/resin-io-library/base-images/issues/317

In the meantime disabling INITSYSTEM or switching to debian should fix the problem