dam Posted March 23, 2021 Posted March 23, 2021 I'm currently trying to host a discord bot (written with discord.js). I followed this guide but I kept getting phusion passenger errors like the one in the screenshot (the error id is always different).I tried both using the bot main file as the file to execute and also creating a webserver (with express first and node http next) that would then call client.login(token) to start the bot. Sidenote: at first the main file name was index.js but i then changed it to app.js to be sure that wasn't a problem but it still happened, so i was wondering if it's actually a problem not to main the main file index.js as that's what i'm used to call my main files. account name: dammain domain: dam.heliohost.usserver: tommy 1
gleason Posted March 24, 2021 Posted March 24, 2021 (edited) I will also be going down this path, or python. Will let you know if I find anything. https://www.helionet.org/index/topic/40834-is-it-possible-to-run-a-nodejs-script-continuously-without-having-an-active-browser-tab-open/ might be a fix. Edited March 24, 2021 by gleason
dam Posted March 25, 2021 Author Posted March 25, 2021 I will also be going down this path, or python. Will let you know if I find anything. https://www.helionet.org/index/topic/40834-is-it-possible-to-run-a-nodejs-script-continuously-without-having-an-active-browser-tab-open/ might be a fix.I tried following what was suggested on that post, all I got was 500 server errors when i try to start the python script, i'm not sure if it has something to do with how my folder structure is though
gleason Posted March 26, 2021 Posted March 26, 2021 (edited) I am currently running into a 500 error as well. Will let you know if I find something. Tried adding the /usr/bin/nodeand the shell=Trueand changing the if 'node'.encode('utf-8') in line: doesn't seem to work still getting Internal Error 500. I imagine we are probably doing the same thing wrong. Edited March 26, 2021 by gleason
gleason Posted March 27, 2021 Posted March 27, 2021 Hey Dam looks like I missed the initial node initialization process https://wiki.helionet.org/tutorials/node.js
dam Posted March 27, 2021 Author Posted March 27, 2021 Hey Dam looks like I missed the initial node initialization process https://wiki.helionet.org/tutorials/node.jsUnfortunately i was aware of that guide and had already tried it out
gleason Posted March 28, 2021 Posted March 28, 2021 So I ended up getting mine to work.In username/node do you have app.js packages.json and node_modules folder? You added node to application manager? And you have start.py and stop.py in cgi-bin folder?
dam Posted March 28, 2021 Author Posted March 28, 2021 So I ended up getting mine to work.In username/node do you have app.js packages.json and node_modules folder? You added node to application manager? And you have start.py and stop.py in cgi-bin folder?I did some kind of customisation, like the folder in which i saved the bot's files because i was planning on having more than one, so i can't say for sure, but i'm confident everything is as it should.Only thing is the file is not called app.js from when i tried to use the python scripts it looked like you could use any name you wanted as long as the paths were correct in the scripts, and it doesn't look like the guides are related to each other
dam Posted April 2, 2021 Author Posted April 2, 2021 I'm now trying to mark the applications as "development" in application manager since i noticed i didn't do that previously, i doubt that's the cause but who knows
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now