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

Update Caddyfile to fix the Web Socket and event #106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amitshuklabag
Copy link

@amitshuklabag amitshuklabag commented Oct 11, 2024

Please make sure to check the following tasks before opening and submitting a PR

  • I understand and have followed the contribution guide
  • I have tested my changes locally and they are working as intended

@MarioninD
Copy link

MarioninD commented Oct 11, 2024

Not sure why you changed the 9000->14703 WEBSocket event.
Since if you look at the docker ps:

revolt_api_1 ./revolt-delta Up 8000/tcp
revolt_autumn_1 ./autumn Up 3000/tcp
revolt_caddy_1 caddy run --config /etc/ca ...   Up 2019/tcp, 0.0.0.0:443->443/tcp,:::443->443/tcp, 443/udp, 0.0.0.0:80->80/tcp,:::80->80/tcp
revolt_createbuckets_1 /bin/sh -c /usr/bin/mc co ...   Up
revolt_database_1 docker-entrypoint.sh mongod Up 27017/tcp
revolt_events_1 ./revolt-bonfire Up 9000/tcp
revolt_january_1 ./january Up 7000/tcp
revolt_minio_1 /usr/bin/docker-entrypoint ...   Up 9000/tcp
revolt_redis_1 docker-entrypoint.sh keydb ...   Up 6379/tcp
revolt_web_1 docker-entrypoint.sh yarn ...   Up 5000/tcp

@amitshuklabag
Copy link
Author

amitshuklabag commented Oct 11, 2024

You can see the docker logs of the event container it was running on 14703 and also WS failed if you used the 9000.

I see the error in the Frontend console for WS failed but after changing the port in the file it works fine.

@MarioninD
Copy link

Maybe I'm looking in the wrong place?

root@srv:/opt/revolt# docker-compose logs events
Attaching to revolt_events_1
events_1         |  INFO  revolt_config > Starting revolt-bonfire@0.7.16
events_1         |  ERROR os_info::architecture > Cannot invoke 'uname` to get architecture type: Os { code: 2, kind: NotFound, message: "No such file or directory" }
events_1         |  INFO  revolt_bonfire        > Listening on host 0.0.0.0:9000
root@srv:/opt/revolt# docker-compose logs caddy
Attaching to revolt_caddy_1
caddy_1          | {"level":"info","ts":1728648584.9283273,"msg":"using config from file","file":"/etc/caddy/Caddyfile"}
caddy_1          | {"level":"info","ts":1728648584.9417162,"msg":"adapted config to JSON","adapter":"caddyfile"}
caddy_1          | {"level":"info","ts":1728648584.964457,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
caddy_1          | {"level":"info","ts":1728648584.964795,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
caddy_1          | {"level":"info","ts":1728648584.9648235,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
caddy_1          | {"level":"info","ts":1728648584.9786484,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
caddy_1          | {"level":"info","ts":1728648584.9788485,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details."}
caddy_1          | {"level":"info","ts":1728648584.9791305,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
caddy_1          | {"level":"info","ts":1728648584.9792416,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}
caddy_1          | {"level":"info","ts":1728648584.9792528,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["chat.sohocom.ru"]}
caddy_1          | {"level":"info","ts":1728648584.9808626,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00021a500"}
caddy_1          | {"level":"info","ts":1728648584.9810252,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"50a09397-dd12-40d3-9257-034cca6af7f2","try_again":1728734984.9810236,"try_again_in":86399.999999572}
caddy_1          | {"level":"info","ts":1728648584.9811287,"logger":"tls","msg":"finished cleaning storage units"}
caddy_1          | {"level":"info","ts":1728648584.9811795,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
caddy_1          | {"level":"info","ts":1728648584.9811926,"msg":"serving initial configuration"}

@amitshuklabag
Copy link
Author

Not sure, why your and my was different.

As I'm using the same https://github.com/revoltchat/self-hosted/blob/master/compose.yml#L50C12-L50C32 with latest tag.
and here are my logs:

docker-compose logs events
app-events-1  |  INFO  revolt_config > Starting revolt-bonfire@0.7.18
app-events-1  |  ERROR os_info::architecture > Cannot invoke 'uname` to get architecture type: Os { code: 2, kind: NotFound, message: "No such file or directory" }
app-events-1  |  INFO  revolt_bonfire        > Listening on host 0.0.0.0:14703
app-events-1  |  INFO  revolt_bonfire        > User connected from 172.21.0.5:45426
app-events-1  |  INFO  revolt_bonfire::websocket > User 172.21.0.5:45426 provided protocol configuration (version = 1, format = Json)
app-events-1  |  INFO  revolt_bonfire::websocket > User 172.21.0.5:45426 authenticated as @TheBoss

@MarioninD
Copy link

I got it, I'm sorry. 🐱‍👤

@JoCat
Copy link

JoCat commented Oct 15, 2024

with latest tag

Then you should probably have specified the tag too, otherwise it will cause problems as the specified version is still running on the old port.

@amitshuklabag
Copy link
Author

I got it, I'm sorry. 🐱‍👤

What was the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Untriaged
Development

Successfully merging this pull request may close these issues.

3 participants