#CPanel Hosting
1 messages · Page 1 of 1 (latest)
I made a thread because this is probably going to get a little involved. I also am going to be afk for about 10 mins while putting my kids to bed
We will probably want to take a look inside the virtual environment to see what isn't starting properly, but let me see if there is any documentation on how cpanel does node
Sounds good to me. Thanks for your help!
Lets start by setting that path on the application startup file to /home/usernameyoublackedout/foundryvtt/resources/app/main.js
Okay SSh into the server and run this command /opt/cpanel/ea-nodejs16/bin/node /home/usernameyoublackedout/foundryvtt/resources/app/main.js --dataPath=/home/usernameyoublackedout/foundrydata/
(Also sorry, but yeah I'm a bit paranoid about account names and such. Especially in a public forum. 🙂 )
no problem
will do, one sec
Ok, I ran it in the cpanel terminal I have access to. I apparently don't have PuTTY on this computer, but I can grab it if it's needs to be done via ssh.
Result:
bash: /opt/cpanel/ea-nodejs16/bin/node: No such file or directory
I am in the home/user directory
it's my root
try node -v
command not found... wut
That just mean it's not part of the bash enviroment
ok
So try this type /opt/cpanel/ea-node16 and press tab and see if it auto completes the path
nope
I pulled that path directly out of the CPanel knowledge base lol https://docs.cpanel.net/knowledge-base/web-services/how-to-install-a-node.js-application/
This document describes how to install a Node.js web application. Node.js is a JavaScript runtime that allows you to build scalable web applications.
Okay lets see if we can find it
it's there somewhere
Thing is, it's probably correct, it's just not under the directories I have terminal access to.
If it's in root/opt, and I only have access to root/home/user
cpanel shared hosting would let you access those file or you couldn't run node at all
/opt isn't in the /home folder typically
Gotcha. If necessary, I can take this up with server support.
cool thanks
There are a couple options here
but using the built in node is the best
so see if it will let you cd /opt/cpanel
it might not
nope.
I can grab putty and see if ssh gives me more access than the terminal emulator?
it will be the same
powershell you just do ssh user@host
ah cool thanks
Who is your hosting provider?
okay lets try this
go into that virtual enviroment that was in the screen shot
and do node -v and see if that returns something
SUCCESS
v16.13.0
Ok, so it only makes it available to the processes/virtual environments or something
YEah makes sense
So lets see if node will load foundry
if you do ls are you in your home directory?
node foundryvtt/resources/app/main.js --dataPath=~/foundrydata should load foundry if you're in your home folder
No, I'm in the foundryvtt directory, but the command included changing to that so I can get back
ok, ran it... one sec
ah I see it there. That's a weird way to do things and counter to the KB, but at least we can see what's going on
RangeError: WebAssembly.instantiate(): Out of memory: wasm memory
at node:internal/deps/cjs-module-lexer/dist/lexer:1:33593
really I just want to confirm it starts properly here
after a bunch of random-looking stuff
So your shared hosting doesn't meet the minimum ram requirements it looks like
Which is weird, as it says I have 2gb?
does it now. Interesting
Was this a fresh foundry install or did you move an existing install?
fresh
Let me check something
Of course!
Okay looks like that is a error caused by the virtual terminal
Try SSH connection directly from powershell
alrighty then. Give me a few minutes.
It keeps denying my password. Sorry, trying to troubleshoot
no problem. I got about 10 more mins then I will be afk a while
You might just want to open a support ticket and see if they can get things up and going for you at that point
yeah I will. Thanks for all your help. I'll run some of the things you mentioned via ssh and see what I get.
Any luck?
talking with support now
chat support can't solve it, escalating. Kind of good to know it isn't just me? Thanks for your help, though. I will follow up with what you suggested, and may be back at another time.
Got SSH fixed. Attempted to start the process. Got the following. I'll be online more tomorrow if you have any insight.
That means you didn't include the --dataPath= arg
I did it again to make sure, but I definitely did. New pic.
it's strange that it's rejecting the data path arugment there
OK I got something
Let's give it a full path instead of the short cut. Try node foundryvtt/resources/app/main.js --dataPath=/home/username/foundrydata
I replaced ~/foundrydata with $HOME/foundrydata
and it worked
Ah, yeah, same thing
Okay so I am pretty sure I know why the node manager is failing
lets do this
Run this command mkdir ~/.local/share/FoundryVTT
we're going to have to do things a little differently because of the way that manager works
ok
done
we want to make the default foundry data path and we're going to see if it loads properly from the manager when using it
So now try starting foundry from your cpanel window
Lets see if it still gives the 502 error
Just leave it alone. I am sure the one in the manager isn't doing what it's supposed to do
BOOM it works!
k
So if you want to use the data path that you've added we can set that in the config window
click over to configuration
and in user data path put /home/username/foundrydata
cool, just let me grab by software key for it first
Done and done
Thank you so much for your help tracking this down!
It should restart foundry. You may need to restart it in the panel
also when the data path updates it will ask for you license again
Yep, already re-entered it
I am glad to help. I hope it runs okay. Your biggest issue is going to be running up against your ram allotment. If you use Pathfinder or 5E with a Beyond import you might run into issues
Good to know. I'm not using either, so it should be ok, but I'll watch out.