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

Can't access Homer using hom7-json-influx #48

Open
lminiero opened this issue Nov 6, 2019 · 1 comment
Open

Can't access Homer using hom7-json-influx #48

lminiero opened this issue Nov 6, 2019 · 1 comment

Comments

@lminiero
Copy link

lminiero commented Nov 6, 2019

Hi guys,

being a docker dummy, I wanted to try to get my hands "dirty", and launch Homer using one of the available scripts. I started with hom7-json-influx, that seemed like a good place to start, but even though the docker compose process seems to start things correctly, I can't access the Homer UI. More precisely, if I open localhost:9080 with a browser, I'm presented with a login page, but inserting the credentials provided in the README nothing happens: after a while, I get an error on a JWT token not being returned, which suggests a DB error.

Looking at the docker-compose output, I see a couple of things that seem out of place and that may be the cause of the issue:

hepsub            | 
hepsub            | > [email protected] start /app
hepsub            | > nodejs helloworld.js
hepsub            | 
kapacitor_1       | ts=2019-11-06T15:34:37.697Z lvl=info msg="listening for signals" service=run
hepsub            | sh: nodejs: not found
hom7-hep-influx_provisioning_1 exited with code 0
hepsub            | npm ERR! file sh
hepsub            | npm ERR! code ELIFECYCLE
hepsub            | npm ERR! errno ENOENT
hepsub            | npm ERR! syscall spawn
hepsub            | npm ERR! [email protected] start: `nodejs helloworld.js`
hepsub            | npm ERR! spawn ENOENT
hepsub            | npm ERR! 
hepsub            | npm ERR! Failed at the [email protected] start script.
hepsub            | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
hepsub            | 
hepsub            | npm ERR! A complete log of this run can be found in:
hepsub            | npm ERR!     /root/.npm/_logs/2019-11-06T15_34_41_966Z-debug.log
db_1              | 2019-11-06 15:34:42.165 UTC [73] FATAL:  password authentication failed for user "homer"
db_1              | 2019-11-06 15:34:42.165 UTC [73] DETAIL:  Role "homer" does not exist.
db_1              | 	Connection matched pg_hba.conf line 95: "host all all all md5"
homer-webapp      | error: password authentication failed for user "homer"
homer-webapp      |     at Connection.parseE (/app/node_modules/pg/lib/connection.js:545:11)
homer-webapp      |     at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:370:19)
homer-webapp      |     at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:113:22)
homer-webapp      |     at emitOne (events.js:116:13)
homer-webapp      |     at Socket.emit (events.js:211:7)
homer-webapp      |     at addChunk (_stream_readable.js:263:12)
homer-webapp      |     at readableAddChunk (_stream_readable.js:250:11)
homer-webapp      |     at Socket.Readable.push (_stream_readable.js:208:10)
homer-webapp      |     at TCP.onread (net.js:601:20)
hepsub exited with code 1
db_1              | 2019-11-06 15:34:42.864 UTC [74] ERROR:  role "postgres" does not exist
db_1              | 2019-11-06 15:34:42.864 UTC [74] STATEMENT:  GRANT postgres to homer_user;
heplify-server    | 2019/11/06 15:34:42.864657 rotator.go:364: WARN pq: role "postgres" does not exist

The first is the nodejs error: this might be because most nodejs installations now only install /usr/bin/node and not /usr/bin/nodejs. I thought this was tied to my local installation (which does lack a nodejs executable), but even adding a symbolic link the error remained, so it's likely a missing executable inside the image itself. Not sure if that can be the cause of the issue, though.

Another likely culprit seems to be the password authentication failed for user "homer", which seems to indeed suggest a DB error: for some reason the application can't contact Postgres at startup, which may be why the login process timeouts when I try it later on. I already tried removing the influx and postgres-data folders more than once and bring the image back up using docker-compose, but nothing changed.

Unfortunately, since everything is retrieved and deployed automatically via docker, I have no idea on how I can mess with the image to see if I can fix things myself manually. Any hint on what may be going wrong, and/or how I can fix it?

Thanks!

@negbie
Copy link
Member

negbie commented Nov 8, 2019

Hi @lminiero. Maybe you could directly jump to the 7.7 branch? https://github.com/sipcapture/homer7-docker/tree/7.7/hepop/hom7-json-influx

Don't really know if it's ready for daily use yet maybe @lmangani can give you an eta.

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

2 participants