self-host-csmm-support

textPage 68 of 373
50 messages on this page
Sunday, April 23, 2023
Avatar for 0f10b2c5d0c74912d151db191dc0fc1ca56d3104b715a68eaa45de87f7e55d68
User 0f10b2
both?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Are you using the latest (and/or the same) version for both the containers?
Avatar for 0f10b2c5d0c74912d151db191dc0fc1ca56d3104b715a68eaa45de87f7e55d68
User 0f10b2
Still have this:

message.txt

TXT2.5 KB

Avatar for 0f10b2c5d0c74912d151db191dc0fc1ca56d3104b715a68eaa45de87f7e55d68
User 0f10b2
Still not working, and logs last with:
csmm-migrations_1  | No migrations were executed, database schema was already up to date.
Avatar for 0f10b2c5d0c74912d151db191dc0fc1ca56d3104b715a68eaa45de87f7e55d68
User 0f10b2
Nice! Thank you!
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Are you using the docker-compose? There's a container specifically for that: https://github.com/CatalysmsServerManager/7-days-to-die-server-manager/blob/master/docker-compose.yml#L33
Start that one with
docker-compose start csmm-migrations
and it should run the migrations for you. You can use
docker-compose logs csmm-migrations
to check if there were any errors
Avatar for 0f10b2c5d0c74912d151db191dc0fc1ca56d3104b715a68eaa45de87f7e55d68
User 0f10b2
I did know how to do it with npm but now I’m with docker, I got no idea. 😢
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
You need to run database migrations
Avatar for 0f10b2c5d0c74912d151db191dc0fc1ca56d3104b715a68eaa45de87f7e55d68
User 0f10b2
I got this:

message.txt

TXT2.4 KB

Friday, April 21, 2023
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Any errors when you try and delete or edit a variable
Could also be useful to look at the network tab of your browser dev tools too, if you know how to ^^
Avatar for 0f10b2c5d0c74912d151db191dc0fc1ca56d3104b715a68eaa45de87f7e55d68
User 0f10b2
It was working until I update to last version. I installed through docker. I’ll check logs when I will be home. Is there something particular I gotta check?
Thursday, April 20, 2023
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Since you are self hosting there could be a lot of stuff wrong. Did you try debugging? Check csmm logs, check browser error logs
Avatar for 0f10b2c5d0c74912d151db191dc0fc1ca56d3104b715a68eaa45de87f7e55d68
User 0f10b2
Hello, i got something weird in experiments: I cannot delete neither edit variables. Something I missed?
Wednesday, April 19, 2023
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Nice one! Glad you got it going :D
Tuesday, April 18, 2023
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
Hey, me again.
I'm sorry I've been such a pain the last few days.
I just wanted to thank you again for the quick and competent help. Honestly. Thank you so much. I could never have done this without your help.
turning the command off was a very good hint.
That and a little google was needed and it works <:peepoBigSmile:914044529978507345>
its_working.png

its_working.png

PNG19.4 KB

Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
You can't have Caddy running in docker AND the systemd service running. Delete/disable the systemd service
About your caddy config: this is Docker networking again so use the DNS names of containers you want to route to instead of localhost
Monday, April 17, 2023
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
rottenredemption.duckdns.org {
reverse_proxy localhost:1337
}
Error: sending configuration to instance: performing request: Post "http://localhost:2019/load": dial tcp [::1]:2019: connect: connection refused
Doesn't seem to be that simple, or I did something wrong again.
By the way, what else I noticed:
● caddy.service - Caddy
Loaded: loaded (/lib/system/system/caddy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2023-04-17 20:26:42 UTC; 1h 0min ago
Docs: https://caddyserver.com/docs/
Main PID: 958870 (code=exited, status=1/FAILURE)
Status: "loading new config: http app module: start: listening on :80: listen tcp :80: bind: address already in use"
CPU: 40ms
Could this be the reason why caddy is having problems?
I will have a look at it in the days. If I can do it alone, rather unlikely.
Nevertheless, I thank you very much for all the help.
Really. Thanks a lot
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
About Caddy, I don't really know what's going wrong, it's hard to pinpoint.
Currently, you're using the command method of Caddy to create the reverse proxy, that doesn't require a config file. You can try turning that command off and creating a config file yourself with their reverse proxy config https://caddyserver.com/docs/caddyfile/patterns#reverse-proxy
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Okay, if you use http (no https) with port 1337 it works 🎉 So indeed, still something wrong with Caddy
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
Looks good.
Bot is also displayed as online.
Now the only question is what I have to do to reach the web interface.
At the moment I still get HTTP ERROR 502 resp.
ERR_SSL_PROTOCOL_ERROR at the duckdns domain with port 1337
I guess this has something to do with the configfile of caddy?
Only as I said, under /etc/caddy/Caddyfile I have no file or the folder caddy is not to be found under /etc.
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
So it looks like Caddy is okay now, judging from what your domain is returning now. The issue is that Caddy -> CSMM is erroring now. Your CSMM logs show that error
Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.
You need to enable those in the Discord developer dashboard for your server
image.png

image.png

PNG87.2 KB

Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
I'm sorry, but no matter what I try, I can't get the csmm-worker to work.
I don't know what to look for with the worker either.
Does this have something to do with Discord?
I have checked everything in the discord developers section.
SteamKey, Ownerid, token, client secred and cliendid. Everything is correct so far.
The only thing I noticed in the worker logs is the following:
WARNING
You are not using https in your CSMM_HOSTNAME. This is insecure!
Please consider adding a reverse proxy to your deployment
In other words: Caddy still doesn't seem to run. That's why the config file has not been created yet.
I have already left the caddy logs above. I don't see any error messages or warnings, so it looks good to me.
I don't know how to proceed again.
I check the same things over and over again.
Can you please tell me again what to look for?
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
No content

worker_logs.txt

TXT6.3 KB

Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
"Once Caddy is installed, it will have created a default config file in /etc/caddy/Caddyfile".
under "etc" I have no folder "caddy" let alone a config file. Does this mean that something is missing or caddy is not running properly yet?
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
No content

caddylogs.txt

TXT2.1 KB

Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
okay and one step further again.
Also Caddy does not give any more error messages.
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
So either you need to change the CSMM service name
OR
it already has that name but CSMM is not running
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Which makes sense actually because the default name for the csmm container is
csmm-web
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
in how far this message is relevant would have to be explained to me.
It means it tried to DNS lookup
csmm
and couldn't find it.
127.0.0.11:53
is the docker internal DNS server
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
No content

message.txt

TXT7.4 KB

Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
Thank you. I am so free and post the logs here. I myself can do with it only limited what.
"lookup csmm on 127.0.0.11:53: no such host".
in how far this message is relevant would have to be explained to me.
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
or
docker-compose logs caddy
would also do it
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
It's a container, so
docker logs <container id>
would be a way to get those logs
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
Yes, I changed csmm.yourdomain.com in the compose file to my duckdns domain.
How can I tell that Caddy is working? It runs under the processes, but how do I know it is working?
I can't find any logs from caddy. I have looked under "/home/csmm" and "/var/log". Where would I find the logs?
caddy.png

caddy.png

PNG53.1 KB

Sunday, April 16, 2023
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Oh, and did you check Caddy logs for any errors
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
The Discord privileged intents error can be fixed if you go to your Discord bot dashboard and enable the intents there
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Does Caddy work, I'm guessing no? Did you edit the
csmm.yourdomain.com
part?
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
No content

message.txt

TXT55.0 KB

Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
short update: so far everything looks quite good, no more "Access denied" messages.
The status of "manager_csmm-web" and "manager-db-1" is now set to "healthy".
Only the "csmm-worker" does not want to start now.
Oh and regarding Caddy, I don't have a configfile under "/etc/caddy/Caddyfile".
I have
caddy:
    restart: unless-stopped
    image: caddy
    ports:
      - 80:80
      - 443:443
    command: caddy reverse-proxy --to csmm:1337 --from csmm.yourdomain.com
    volumes:
      - ./caddy/config:/config/caddy:Z
      - ./caddy/data:/data/caddy:Z
added to the docker compose file, but still the config file is not created.
I have already deleted and recreated the docker image, but doesn't seem to have done much.
Here again some logs from the worker:
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Similar issue as Redis, need to use Docker networking here
image.png

image.png

PNG50.9 KB

Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
No content

message.txt

TXT74.1 KB

Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
it's not. Still getting some errors
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Unless you have something running to act on it, I don't think so
Is CSMM working now?
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
thank you very much
but now the status is displayed as "unhealthy". Does this affect anything if the status is not "healthy"?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
You inside Docker networks, you need to use the Docker DNS name of redis. 127.0.0.1 point to the local container, but redis is running in another container.
Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
the connection to the database seems to work now.
Error: A hook (
session
) could not be loaded!
Error: Failed to lift app: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379 {"address": "127.0.0.1", "code": "ECONNREFUSED", "errnrror: connect ECONNREFUSED 127.0.0.1:6379\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)", "syscall": "connect"}
The password I assigned is correct.
The port is also correct. What else could be the problem?
csmmstatus.png

csmmstatus.png

PNG39.1 KB

Avatar for 7043bcd6eea1c598329f323b118b3e725a981888cd605e52d8ed76026963bf2b
User 7043bc
But if docker creates the user for me, how would I know what to enter here:
DBSTRING=mysql2://csmm:your-db-password@db:3306/csmm
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Making an extra user if fine though
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Depends on the mysql version you're running, but the Docker install will automatically create the user for you