#CPanel Hosting

1 messages · Page 1 of 1 (latest)

wary mica
#

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

jovial wolf
#

Sounds good to me. Thanks for your help!

wary mica
#

Lets start by setting that path on the application startup file to /home/usernameyoublackedout/foundryvtt/resources/app/main.js

jovial wolf
#

done

#

saved, restarted... still 503

wary mica
#

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/

jovial wolf
#

(Also sorry, but yeah I'm a bit paranoid about account names and such. Especially in a public forum. 🙂 )

wary mica
#

no problem

jovial wolf
#

will do, one sec

wary mica
#

it should spit out something that looks like this

jovial wolf
#

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

wary mica
#

try node -v

jovial wolf
#

command not found... wut

wary mica
#

That just mean it's not part of the bash enviroment

jovial wolf
#

ok

wary mica
#

So try this type /opt/cpanel/ea-node16 and press tab and see if it auto completes the path

jovial wolf
#

nope

wary mica
#

Okay lets see if we can find it

#

it's there somewhere

jovial wolf
#

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

wary mica
#

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

jovial wolf
#

Gotcha. If necessary, I can take this up with server support.

wary mica
#

It's okay we will just look somewhere else

#

Let's see if we can find it first

jovial wolf
#

cool thanks

wary mica
#

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

jovial wolf
#

nope.

#

I can grab putty and see if ssh gives me more access than the terminal emulator?

wary mica
#

it will be the same

jovial wolf
#

Or figure out how to do it through powershell

#

Ok. No worries then.

wary mica
#

powershell you just do ssh user@host

jovial wolf
#

ah cool thanks

wary mica
#

Who is your hosting provider?

jovial wolf
wary mica
#

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

jovial wolf
#

SUCCESS

#

v16.13.0

#

Ok, so it only makes it available to the processes/virtual environments or something

wary mica
#

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

jovial wolf
#

No, I'm in the foundryvtt directory, but the command included changing to that so I can get back

#

ok, ran it... one sec

wary mica
#

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

jovial wolf
#

RangeError: WebAssembly.instantiate(): Out of memory: wasm memory
at node:internal/deps/cjs-module-lexer/dist/lexer:1:33593

wary mica
#

really I just want to confirm it starts properly here

jovial wolf
#

after a bunch of random-looking stuff

wary mica
#

So your shared hosting doesn't meet the minimum ram requirements it looks like

jovial wolf
#

Which is weird, as it says I have 2gb?

wary mica
#

does it now. Interesting

jovial wolf
wary mica
#

Was this a fresh foundry install or did you move an existing install?

jovial wolf
#

fresh

wary mica
#

Let me check something

jovial wolf
#

Of course!

wary mica
#

Okay looks like that is a error caused by the virtual terminal

#

Try SSH connection directly from powershell

jovial wolf
#

alrighty then. Give me a few minutes.

#

It keeps denying my password. Sorry, trying to troubleshoot

wary mica
#

You might just want to open a support ticket and see if they can get things up and going for you at that point

jovial wolf
#

yeah I will. Thanks for all your help. I'll run some of the things you mentioned via ssh and see what I get.

wary mica
#

Any luck?

jovial wolf
#

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.

jovial wolf
jovial wolf
wary mica
jovial wolf
#

I did it again to make sure, but I definitely did. New pic.

wary mica
#

it's strange that it's rejecting the data path arugment there

jovial wolf
#

OK I got something

wary mica
jovial wolf
#

I replaced ~/foundrydata with $HOME/foundrydata

#

and it worked

#

Ah, yeah, same thing

wary mica
#

Okay so I am pretty sure I know why the node manager is failing

#

lets do this

#

Run this command mkdir ~/.local/share/FoundryVTT

jovial wolf
wary mica
#

we're going to have to do things a little differently because of the way that manager works

jovial wolf
#

ok

wary mica
jovial wolf
#

done

wary mica
#

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

jovial wolf
#

Ok, and remove the datapath argument

#

?

wary mica
#

Just leave it alone. I am sure the one in the manager isn't doing what it's supposed to do

jovial wolf
#

BOOM it works!

wary mica
#

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

jovial wolf
#

cool, just let me grab by software key for it first

#

Done and done

#

Thank you so much for your help tracking this down!

wary mica
#

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

jovial wolf
#

Yep, already re-entered it

wary mica
#

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

jovial wolf
#

Good to know. I'm not using either, so it should be ok, but I'll watch out.