Jump to content

Recommended Posts

Posted

Ok, https://control.citadel.helioho.st/ works now, and the server is running :

server.js is running. Stop
Current memory usage: 64.07 MB
Estimated 24 hour usage: 90.10 GB - Check Load

Logs: Clear Logs - Full Logs

[2025-06-27 22:06:54] Starting server.js.
SERVER STARTED AND RUNNING
Server running on port 8080
[2025-06-28 08:26:41] Starting server.js.
SERVER STARTED AND RUNNING
Server running on port 8080

 

However, the websocketsin the game itself seem to be still be blocked :

 

network.js:3 WebSocket connection to 'wss://citadel.helioho.st/' failed:
  setupWebSocket @ network.js:3
  (anonymous) @

game.js:39

Is there something i should do in wss.citadel.helioho.st ?

Posted

Ok, I created the proxy to port 8080 on wss://wss.citadel.helioho.st and it seems to be working

root@control [~]# ./websocat wss://wss.citadel.helioho.st
hello
^C

And the logs show this

image.png.800e9f84adc47a82dd099e611b4032b5.png

Posted

Indeed it's now  working on https://wss.citadel.helioho.st/ ! Thank you !!

However https://citadel.helioho.st/ had a nicer ring to it 😄, i'm guessing it's not possible to use this domain instead, because of the websockets issue ? (swap https://citadel.helioho.st/ and https://wss.citadel.helioho.st/  ?)

 

I'm down for trying to move the files myself, but don't want to break anything in the process, as I haven't understood completely how it got solved.

 

Also, I've used the 8080 port randomly, since 3000 was taken. Is it smart to have used this one, and not a more obscure/random one ? Does it make a difference ? (since you said "There are 65535 internal ports, and only a handful are in use by other users")

 

Thanks again

Posted

Since you set up Passenger on citadel.helioho.st I assumed you wanted to put a website on that domain, so I made another domain for the websocket.

It doesn't really matter which port you use. If someone else comes along and tries to use port 8080 it will say it's already in use if your websocket is already running. If you stop your websocket and someone else starts using 8080 then you won't be able to start your websocket anymore.

Posted

ok for the port. I wish I picked a less obvious one then.

 

I'm not sure what you mean by "set up passenger" as my understanding was that it was automatically installed when we were using node.js, it wasn't a conscious choice from my side.

 

My goal was to use https://citadel.helioho.st/ as the main website (it's the only domain i have created).

Right now i can access it, and the html works, but the consol says :

network.js:3 WebSocket connection to 'wss://citadel.helioho.st/' failed: 

And it's not possible to play the game.

 

However, I can acess  https://wss.citadel.helioho.st/ and this one loads both the html and the websocket, allowing the game to be played.

 

Is that expected behaviour ? If so, is there a way for me to redirect traffic from https://citadel.helioho.st/ to https://wss.citadel.helioho.st/, so I can use the more elegant website name as an entry point for visitors ?

 

 

Posted

Ok i managed to redirect from citadel to wss.citadel using .htaccess. If it's not possible to do otherwise, i guess it will be a good enough workaround for now. Thank you very much for all your help

Posted

Passenger is only needed if you want to make a Node.js website. A Node.js websocket does not need Passenger. Since you turned on Passenger I assumed you wanted to make a Node.js website, not a websocket on that domain, so I created a different domain for the websocket.

I have disabled Passenger for you, deleted the wss subdomain, and made the citadel.helioho.st domain the websocket instead.

  • Krydos changed the title to [Solved] Websockets ports
Posted (edited)

Thank you ! However.. nothing works anymore 😄. This is the console error :

 

GET https://citadel.helioho.st/styles.css net::ERR_ABORTED 404 (Not Found)
index.html:7
 GET https://citadel.helioho.st/game.js net::ERR_ABORTED 404 (Not Found)

index.html:89 
            
            
  

However, the game.js and css files have not moved, they are in the same public folder as index.html (which seems to be foudn and opened)...

 

Is there a waiting period for the changes to fully take effect ?

 

I'm sure there is a very simple reason but i can't find it

Edited by gofterdom
Posted

@Krydos Would you please help me fix this last issue ?

Now it works because i put all my files in double, once in the public folder, and once in httpsdoc folder

If I only put them in one folder, i :

- either get an error from server.js saying that it cannot find the file, in the bot control script.

- or (if i choose the other folder), I get consoles errors from index.html saying that it cannot locate the files

 

Both seem to be looking for the files at different locations. This wasn't the case before the websocket redirect.

Could you guide me on how I could resolve this, in order to have my files in only one place ?

In my local folder, the files are in the public folder

Posted

I feel like I've already explained this several times. If you set up a websocket on a domain it can only be a websocket, and other stuff like .js files cannot be served on that domain. That's why I set up wss.citadel.helioho.st as the websocket so you could put a real website with .js files etc on citadel.helioho.st. You said "I like the sound of this better" so I wasted like 45 minutes of my time reconfiguring your account which was working perfectly fine to change the domains around for no reason other than you like the sound of it better.

Posted

@Krydos I didn't know that. I have been re-reading your messages and cannot find any mention of this anywhere

Quote

 II feel like I've already explained this several times. If you set up a websocket on a domain it can only be a websocket, and other stuff like .js files cannot be served on that domain. 

I did find this though :

Quote

We don't mind helping you learn, and walking you through it

And I also did say :

Quote

Ok i managed to redirect from citadel to wss.citadel using .htaccess. If it's not possible to do otherwise, i guess it will be a good enough workaround for now. 


I said it was good enough, I Didn't insist on you to waste your time.

The FAQ did say to open a customer ticket for this specific NGINX request, I didn't know I was supposed to understand everything at first try.

I also mentionned I was very new to all of this, my first line of code was 1 month ago, sorry for not understanding node.js, ports and websockets right away.

Also, it does work in the main citadel.helio.st domain, the files just need to be in 2 different folders, i'm sure there is a better way to do this, that is why I asked.

Thank you for your help, won't take up more of your time
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...