Closed the-digital-anarchist closed 3 years ago
Those files aren't too helpful, because those aren't the versions on your server, those are the versions from your local ansible folder.
FetchError: request to http://lemmy:8536/api/v3/site? failed, reason: getaddrinfo ENOTFOUND lemmy
That doesn't help me too much, because that's a lemmy-ui error, when the problem is likely on the back end.
There's some weird conflicting things going on with your docker-compose.
lemmy-ui:
image: dessalines/lemmy-ui:0.10.2
- LEMMY_INTERNAL_HOST=lemmy:8536
seems correct, so I'm not sure why node isn't finding that address.
run
sudo docker-compose up -d
sudo docker-compose logs lemmy
@dessalines I've set lemmy-ui version to 0.10.2 to reflect the lemmy:0.10.2 After that I did a new deploy, and run:
sudo docker-compose up -d
Output:
lemmy_postfix_1 is up-to-date
lemmy_iframely_1 is up-to-date
lemmy_postgres_1 is up-to-date
lemmy_pictrs_1 is up-to-date
lemmy_lemmy_1 is up-to-date
lemmy_lemmy-ui_1 is up-to-date
sudo docker-compose logs lemmy
Output:
lemmy_1 | thread 'main' panicked at 'Failed to load settings file: LemmyError { inner: "missing field `user`" near 11:3 }', crates/utils/src/settings/mod.rs:26:34
lemmy_1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
lemmy_1 | Panic in Arbiter thread.
These are my server config files: docker-compose.yml
version: '2.2'
services:
lemmy:
image: dessalines/lemmy:0.10.2
ports:
- "127.0.0.1:8536:8536"
restart: always
environment:
- RUST_LOG=error
volumes:
- ./lemmy.hjson:/config/config.hjson:ro
depends_on:
- postgres
- pictrs
- iframely
lemmy-ui:
image: dessalines/lemmy-ui:0.10.2
ports:
- "127.0.0.1:1235:1234"
restart: always
environment:
- LEMMY_INTERNAL_HOST=lemmy:8536
- LEMMY_EXTERNAL_HOST=***
- LEMMY_HTTPS=true
depends_on:
- lemmy
postgres:
image: postgres:12-alpine
environment:
- POSTGRES_USER=***
- POSTGRES_PASSWORD=****
- POSTGRES_DB=lemmy
volumes:
- ./volumes/postgres:/var/lib/postgresql/data
restart: always
pictrs:
image: asonix/pictrs:v0.2.6-r1
user: 991:991
ports:
- "127.0.0.1:8537:8080"
volumes:
- ./volumes/pictrs:/mnt
restart: always
mem_limit: 200m
iframely:
image: dogbin/iframely:latest
ports:
- "127.0.0.1:8061:80"
volumes:
- ./iframely.config.local.js:/iframely/config.local.js:ro
restart: always
mem_limit: 200m
postfix:
image: mwader/postfix-relay
environment:
- POSTFIX_myhostname=***
restart: "always"
lemmy.hjson
{
# for more info about the config, check out the documentation
# https://dev.lemmy.ml/docs/administration_configuration.html
# settings related to the postgresql database
database: {
# password to connect to postgres
password: "***"
# host where postgres is running
host: "postgres"
}
# the domain name of your instance (eg "dev.lemmy.ml")
hostname: "forum.forumvooranarchisme.nl"
# address where lemmy should listen for incoming requests
bind: "0.0.0.0"
# json web token for authorization between server and client
jwt_secret: "***"
# email sending configuration
email: {
# hostname of the smtp server
# smtp_server: "postfix:25"
# address to send emails from, eg "noreply@your-instance.com"
smtp_from_address: "noreply@***"
use_tls: true
# hostname and port of the smtp server
smtp_server: "smtp.transip.email:465"
# login name for smtp server
smtp_login: "noreply@***"
# password to login to the smtp server
smtp_password: "***"
}
# settings related to activitypub federation
federation: {
# whether to enable activitypub federation.
enabled: false
# Allows and blocks are described here:
# https://dev.lemmy.ml/docs/administration_federation.html#instance-allowlist-and-blocklist
#
# comma separated list of instances with which federation is allowed
# allowed_instances: ""
# comma separated list of instances which are blocked from federating
# blocked_instances: ""
}
}
The database section needs to look like this:
# settings related to the postgresql database
database: {
database: lemmy
user: lemmy
host: postgres
# password to connect to postgres
password: "***"
# host where postgres is running
port: 5432
pool_size: 5
}
So we need to add those values to the default config, or make them optional like they were before.
Oke awesome! That was the problem. I'm closing it.
Keeping this open until we release a fix.
Strangely, my site works well on v0.9.9, but while I try to upgrade it to v0.10.3, it can not start up and shows this error:
thread 'main' panicked at 'Failed to load settings file: LemmyError { inner: ExpectedArray at 77:25 at "\"\n # comma s" }', crates/utils/src/settings/mod.rs:29:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Panic in Arbiter thread.
I wonder why?
Open up a new issue and post your hjson config.
Just pulled in 0.10 lemmy-ui and lemmy. Locally everything works fine. But when I deploy it with ansible I get this error:
FetchError: request to http://lemmy:8536/api/v3/site? failed, reason: getaddrinfo ENOTFOUND lemmy
This request gets made in the server/index.js file here
But it looks like the jwt token doesn't get generated because normally it's 'http://lemmy:8536/api/v3/site?'
Here are my settings:
lemmy/ansible/templates/docker-compose.yml
lemmy/ansible/templates/config.hjson
All the passwords vars work so that's not the problem. But further I've got no idea what it could be.