VityaSchel / bunsogs

Session Open Group Server (SOGS) implementation written in JavaScript with bun.sh. Antispam, anticsam, captcha plugins. Compatible with pysogs.
GNU General Public License v3.0
6 stars 1 forks source link

Debug `rejected` message from bunsogs in LXC container #3

Closed slfhstr closed 3 months ago

slfhstr commented 3 months ago

I have bunsogs running in a LXC container on a VPS. I can ping the container from the host. But I am getting connection errors from a browser. So diagnosing on the VPS, when I try curl from the VPS host :

user:~/lxc-apps# curl -v http://10.230.54.209:3333/lobby?public_key=d1da796ac112884bd651a7979a6420513cdd4826687b29cb33bc7683c157824f
*   Trying 10.230.54.209:3333...
* connect to 10.230.54.209 port 3333 from 10.230.54.1 port 38972 failed: Connection refused
* Failed to connect to 10.230.54.209 port 3333 after 0 ms: Couldn't connect to server
* Closing connection

I know you can't debug the overall setup, but I would have thought curl from the VPS host to the running bunsogs would work (I checked it is still running).

Any thoughts / tests ?

slfhstr commented 3 months ago
user:~# netstat -tuln | grep 3333
tcp        0      0 127.0.0.1:3333          0.0.0.0:*               LISTEN

iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
VityaSchel commented 3 months ago

Sorry if I give you stupid advices, as I have no experience with lxc containers. Can you verify that you're binding correct hostname so that outer connections from outside of container can reach bunsogs server? Usually if you bind to localhost/127.0.0.1 and try to reach server on it via external Ip you won't be able to do that unless you configure reverse proxy. Try changing HOSTNAME env variable to external ip of your container or set up reverse proxy such as nginx that listens for outer connections and proxies to localhost

slfhstr commented 3 months ago

Thank you !

VityaSchel commented 3 months ago

If your issue was resolved, can you please let me know or close this issue? :)

slfhstr commented 3 months ago

Sorry, I had an urgent trip. Issue seems to be due networking, not the app, so good to close, thanks for your help.