issues with redis while trying to upgrade nodebb
-
Following up from GH, https://github.com/NodeBB/NodeBB/issues/5270#issuecomment-265897561
If you can give us more info as per the comments in that link hopefully we can help you out
-
The config.json file is below
{ "url": "NODEBB_URL", "secret": "NODEBB_SECRET", "database": "redis", "redis": { "host": "NODEBB_REDIS_HOST", "port": "NODEBB_REDIS_PORT", "password": "", "database": "3" }, "app_url": "http://example.com", "smtp_from_name": "example" }
and command to run the docker container before running the
./nodebb upgrade
commanddocker run -it \ -h nodebb \ -e NODEBB_CONFIG_ENV='config.json' \ -e NODEBB_REDIS_HOST='redis.elasticache.amazonaws.com' \ -e NODEBB_REDIS_PORT='6379' \ -e NODEBB_SECRET='xxxxxx' \ -e NODEBB_URL='https://forums.example.com' \ -v /var/log/nodebb:/app/logs \ -v /var/opt/nodebb/uploads:/app/public/uploads \ -p 8080:4567 \ --name nodebb \ example/nodebb:production bash
hope all this information and help figure out what the issue is. I thought it was a popular issue that will be figured out quickly; surprised i had to add all these info.
Thanks.
-
not sure it was really necessary to link my github (privacy???)
-
@ubern00b Both this site and GitHub are public sites, there's no reason @psychobunny would think not to link the two issues together.
It is very difficult to debug issues otherwise, when relevant information is posted in multiple places.
-
@julian
Seems you don't understand what privacy is.
I did not in anyway mention i opened same exact issue on github or suggest i want to link myself with both sites, i may simply want to separate my github account from this forum account.
Normally i try to edit my questions whenever am posting to a few sources i need help mainly because of abuse of privacy like this. -
@ubern00b I think you mistake anonymity (you walking on the street) for privacy (you walking or doing whatever pleases you in your apartment). Posting on different public websites is more related to anonymity than it is to privacy.
-
@ubern00b The NodeBB upgrade is failing because the config.json isn't actually being populated with any of the environment variables. It's literally trying to connect to "NODEBB_REDIS_HOST" as the hostname of your redis instance.
Check that your Dockerfile specifies an entrypoint script that actually generates a config.json. Also, you're declaring two persistent volumes (for logs and uploads) - if config.json isn't stored on a persistent volume, it'll need to be re-generated at every run... which might be what you're intending to do.
Alternatively, the "quick fix" would be to edit the config.json inside your container and substitute the variable names for their actual values, then run ./nodebb upgrade.