Jump to content

gofterdom

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by gofterdom

  1. @Krydos I didn't know that. I have been re-reading your messages and cannot find any mention of this anywhere : I did find this though : And I also did say : 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
  2. @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
  3. 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
  4. 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
  5. 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 ?
  6. 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
  7. 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 ?
  8. Thanks a lot ! I have moved the files. I am going to bed now but will carry on first thing tomorrow
  9. I am unsure if there is something else I can do from my side ? You said : we need to either add another subdomain to access /bot_control/ or you'll need to disable Passenger. I am down for either, but as I mentioned, I am lost. Is there a tutorial I can follow for any one of these options ? I'll be glad to stop bothering you, I just don't know what i'm supposed to do next
  10. I thought the whole point was that no port was available ;( that's why i didn't try further I switched to 8080 and it works now indeed : server.js is running. Stop Current memory usage: 62.12 MB Estimated 24 hour usage: 87.36 GB - Check Load However on the main game itself : network.js:3 WebSocket connection to 'wss://citadel.helioho.st/' failed: setupWebSocket @ network.js:3 (anonymous) @ game.js:39 Is that where nginx/apache are needed ? I've been able to stop the script as well server.js is not running. Start - Check Load Logs: Clear Logs - Full Logs [2025-06-27 21:48:01] Stop action requested for server.js. [2025-06-27 21:48:38] Stop action requested for server.js. [2025-06-27 21:50:19] Stop action requested for server.js. [2025-06-27 21:52:03] Stopping server.js.
  11. thank you, it seems to work ! now i'm blocked by the port issue we discussed, but i'm guessing that's expected ? Only need the apache/nginx redirect that was mentioned in the FAQ ? Or am i forgetting something [2025-06-27 19:35:41] Starting server.js. SERVER STARTED AND RUNNING node:events:496 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE: address already in use :::3000 at Server.setupListenHandle [as _listen2] (node:net:1940:16) at listenInCluster (node:net:1997:12) at Server.listen (node:net:2102:7) at Object. (/home/citadel.helioho.st/server.js:548:8) at Module._compile (node:internal/modules/cjs/loader:1730:14) at Object..js (node:internal/modules/cjs/loader:1895:10) at Module.load (node:internal/modules/cjs/loader:1465:32) at Function._load (node:internal/modules/cjs/loader:1282:12) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) Emitted 'error' event on WebSocketServer instance at: at Server.emit (node:events:518:28) at emitErrorNT (node:net:1976:8) at process.processTicksAndRejections (node:internal/process/task_queues:90:21) { code: 'EADDRINUSE', errno: -98, syscall: 'listen', address: '::', port: 3000 } Node.js v22.17.0
  12. I have not been able to start and stop the websocket from the /bot_control/index.sh script, it is looking for the node install folder and i don't know where to indicate it. it is looking in /usr/local/bin/node, but not finding it Could you please tell me what i need to change in that bash script to make it work with node.js ? In its initial state, it seemed to be looking for a python file only apologies for taking your time, i have been trying all day
  13. I THINK i managed to adapt the bash script to start the node.js server.js script using passenger, but it feels like there is not much i can do now, since ports are not open to me... I don't know how to stop the node using passenger though. Can you please help me with the next steps ? server.js is not running. Start - Check Load Logs: Clear Logs - Full Logs [2025-06-27 13:38:48] Restarting server.js. [2025-06-27 13:39:22] Restarting server.js. [2025-06-27 13:39:27] Restarting server.js. [2025-06-27 13:42:32] Restarting server.js. #!/bin/bash # edit this to match your bot filename bot_name="server.js" ################################################################### printf 'Content-Type: text/html\n\n' username=`whoami` pwd=`printenv|grep '^PWD'|cut -f2 -d'='` main_domain=`echo "$pwd"|cut -f3 -d'/'` control=`echo "$pwd"|cut -f5 -d'/'` temp=`ps axo user:16,pid,pcpu,pmem,vsz,rss,tty,stat,start,time,command|grep -v grep|grep "^$username "` running=`echo "$temp"|grep -c "$bot_name"` file_base=`echo $bot_name|tr -cd "a-zA-Z0-9"` log_name="$file_base.txt" if [ "$QUERY_STRING" == "" ]; then if [ $running -ne 0 ]; then mem_kb=`echo "$temp"|grep "$bot_name"|awk '{print $6}'` mem_mb=$( echo "scale=2;$mem_kb/1024"|bc ) mem_24=$( echo "scale=2;$mem_kb*1440/1048576"|bc ) echo "$bot_name is running. <a href='?action=stop'>Stop</a><br>Current memory usage: $mem_mb MB<br>Estimated 24 hour usage: $mem_24 GB - " else echo "$bot_name is not running. <a href='?action=start'>Start</a> - " fi echo "<a href='https://heliohost.org/dashboard/load/' target='_blank'>Check Load</a><br><br>Logs: <a href='?action=clear'>Clear Logs</a> - <a href='/$control/$log_name'>Full Logs</a><pre>" tail -30 $pwd/$log_name echo "</pre><script>reloading = setTimeout('window.location.reload();', 10000);</script>" fi ts=`date +"%Y-%m-%d %H:%M:%S"` if [ "$QUERY_STRING" == "action=stop" ]; then echo "[$ts] Stop action requested for $bot_name." >> $pwd/$log_name echo "Stop action triggered. You must handle graceful shutdown inside your app.<br>" echo "<script>setInterval(\"window.location.replace('/$control/');\", 2000);</script>" fi if [ "$QUERY_STRING" == "action=start" ]; then echo "[$ts] Restarting $bot_name." >> $pwd/$log_name touch "$pwd/../tmp/restart.txt" echo "Restart triggered for $bot_name.<script>window.location.replace('/$control/');</script>" fi if [ "$QUERY_STRING" == "action=clear" ]; then cat /dev/null > $pwd/$log_name echo "Clearing logs...<script>window.location.replace('/$control/');</script>" fi exit 0
  14. Ok i managed to find it by going directyly to https://citadel.helioho.st/bot_control/index.sh but now it's giving me errors, that seems like it's expecting a python document and not a js document, the comments are not read as comment... server.js is not running. Start - Check Load Logs: Clear Logs - Full Logs [2025-06-27 12:22:07] Starting server.js. File "/home/citadel.helioho.st/server.js", line 321 // Only add tiles that don't already exist at those coordinates ^ SyntaxError: unterminated string literal (detected at line 321) [2025-06-27 12:22:11] Starting server.js. File "/home/citadel.helioho.st/server.js", line 321 // Only add tiles that don't already exist at those coordinates ^ SyntaxError: unterminated string literal (detected at line 321)
  15. Ok so : I've followed all the steps to start and stop the bot, but i've replaced the .py bot by server.js (my server script, placed in root directory). I've added the same permissions. Is that what was expected ? Unfortunately citadel.helioho.st/bot_control/ only shows : Cannot GET /bot_control/ i've also tried the full adress : console error : bot_control/:1 GET https://citadel.helioho.st/httpdocs/bot_control/ 404 (Not Found) The tutorial said to check the bot logs but i cannot find them in the bot_control dir. There are logs in the log dir, but i don't know which ones are the bot one. Am I on a wrong track ?
  16. By the way this will feel like the smallest step for you, but the html/js part of the website actually works now on heliohost ! even if the server doesn't
  17. No I want to learn ! But I thought you wanted me to rewrite my project in Python and felt overwhelmed lol I'm on it now !
  18. Okkk I think I understand what you're expecting now. I will try again first thing tomorrow
  19. I'm sorry, i can't use this tutorial for my project, I can't find a way to apply it, this seems to be written in Python and I don't know that language. I might have bitten more than i could chew with this websocket project on a server that doesn't allow port access directly. Thank you for your help
  20. I am a newbie in node.js, as well as js and html as a whole. I thought the server would automatically stop the script when reaching the max usage. As for the logs, keeping it running etc... when i was deploying to render/replit for quick testing, everything was handled for me, so i didn't know there was so much i needed to keep in mind. I will try to apply the tutorial.
  21. On the discord bot ? I haven't started, because I didn't understand how I could apply this tutorial to my project. Am I dense ? :x On uploading my project to helio, all the files are here, i have started node.js but got an error message saying the 3000 port was occupied
  22. I'm sorry, I'm lost. Am i supposed to adapt this tutorial for my website ? How would that work ? I'm lost The website + websockets work well locally and on render/replit etc, i've uploaded the files on Heliohost
  23. Hello, Thank you for your reply. As i said, I am very new to all this, i thought the 200gb size limit was the size of the files we could upload >< And i'm not sure what would be the use of a SSH command line ? You said there was a guide to follow but i couldn't find a link in your message, could you please send it again ? Thank you for your time.
  24. I'm guessing Krydos is a person, not a protocol ? Sorry I'm new to all this. I wouldn't mind upgrading to VPS but this project is such small scale that i was not looking for any recurring expenses, I liked the one time fee solution ! Thank you for your time.
  25. Hello, I've just set up a Tommy account for a small scale 2D MMORPG using html, js, node.js websockets. username : gofterom domain : citadel server : tommy I've just realized ports are not open on that plan, so the websockets don't work. I am very new to all this. Could you please help me ? The FAQ says : With the help of a root admin, you could get an Nginx proxy set up. To explore this option, please post a request in our Customer Service forum, making sure to provide your username, domain name, server name, and details about your websocket application, and we'll be happy to help.
×
×
  • Create New...