Giter Site home page Giter Site logo

Websocket config? about foundryvtt-docker HOT 7 CLOSED

felddy avatar felddy commented on June 11, 2024
Websocket config?

from foundryvtt-docker.

Comments (7)

felddy avatar felddy commented on June 11, 2024

@MacDork, that is frustrating. There isn't anything in the container that is modifying the networking. It's a pretty straightforward containerized node application , with some installation/authentication sauce on the front.

If you are connecting directly to Foundry without the proxy you will be using http: and ws:. When the proxy is in place with TLS, you will be connecting using https and wss. So seeing wss is normal in the mode you describe.

I think that Apache log message is the most telling. It seems that your browser can talk to Apache, but Apache cannot reach port 30000. I read some of your chat messages in #troubleshooting where you were working on firewall configs. I'm assuming that Apache and the Docker container are on the same machine.

Confirm with the container running that it is listening on all interfaces:

❱ netstat -an | grep 30000
tcp46      0      0  *.30000                *.*                    LISTEN     

Verify that you can connect to port 30000 on the same box:

wget -O - http://localhost:30000

It might be worth trying nginx or caddy as the proxy to rule out an Apache config error, or a firewall issue.

I am working on a Docker composition with an included proxy since this is a very common deployment. If the problem doesn't reveal itself by then, it might be a good solution. I hope it is working for you before then.

from foundryvtt-docker.

MacDork avatar MacDork commented on June 11, 2024

Ahh. wss makes sense, now.

I've got other services proxied behind Apache, so I don't think I can have another service (like nginx) listening on 443 (can I?), but the netstat does seem to show that it's not listening for ipv4.

tcp6 0 0 :::30000 :::* LISTEN

Disabling ufw yields the same result, so I think the fw is out of the equation. Do you have any other guidance that might help?

from foundryvtt-docker.

felddy avatar felddy commented on June 11, 2024

That is strange... we either need to get Docker listening on IPv4 or change your Apache config to use ::1. Take a look at this link for some ideas:

https://stackoverflow.com/questions/29957143/make-docker-use-ipv4-for-port-binding

from foundryvtt-docker.

MacDork avatar MacDork commented on June 11, 2024

Thanks for the help -- I don't think it's the container's fault. wget works fine, and on my :30000, i'm able to access foundry wonderfully. I'm still running a Fantasy Grounds campaign, so it'll be a long while before I'm ready to fully make the move. Thank you for your time, and for the tips, and for creating this container. I'll probably continue to use it after I work out the socket issue. If you'd like to close this out, please do.

from foundryvtt-docker.

MacDork avatar MacDork commented on June 11, 2024

FWIW, I have the same issue w/ the Node install, and leave the Docker container off.

from foundryvtt-docker.

felddy avatar felddy commented on June 11, 2024

Wow. Still happens with just Node? I'd keep digging on those IPv6/IPv4 binding configurations.

I'm glad you plan on using the container. Let me know if you have any more questions either here or in Discord.

Good luck!

from foundryvtt-docker.

MacDork avatar MacDork commented on June 11, 2024

I got it working.

I needed to add a Rewrite to my Apache2 virtualhost settings:

  RewriteEngine          on
  RewriteCond %{HTTP:Upgrade} =websocket [NC]
  RewriteRule ^/socket.io/(.*)  ws://localhost:30000/socket.io/$1 [P,L]
  SSLProxyEngine         on

from foundryvtt-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.