CyberPanel & Svelte Site

Hi i’m trying to setup a Svelte site on Cyberpanel however i’m having some issues getting this working?

i’ve followed the tutorial on how to setup a node application, i followed the steps in this guide here however i keep getting Error code 524? Site is not reachable at all

Welcome @sxroot Happy you are here

Error code 524 is cloudflare specific error. Kindly restart your server and try again.

Do you have any svelte related errors on your app? or any errors on the main log file for the website? or any error logs here https://<IP Address>:8090/serverlogs/errorLogs

Turned off cloudflare proxy for now so that error has disappeared, now i’m getting “This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase ‘Connection Timeout’.” which i belive is error code 500? My svelte app works perfectly fine on localhost and pm2 runs it fine with zero errors just trying to get it working on cyberpanel

My vHost Config for my website looks like this

context / {
type appserver
location /home/gun.wtf/public_html
binPath /usr/bin/node
appType node
maxConns 100

rewrite {

}
addDefaultCharset off
}

Which from reading the tutorial on the express.js one should be correct?
I’ve also opened port 2001 which my site is running on

Seems like a node version issue. Have you checked if your server meets the app’s system requirements

You should use PM2 to monitor and manage your nodejs based apps if you are using svelte to build a dynamic app

Using the latest version of node which i’m also using on my localhost as well, so node version wouldn’t be a issue would it?

Node version is an issue did you see this Deploy nodejs app doesn'nt work - #2 by josephgodwinke

Yes i saw that and did all the commands you had put in there, i’ve checked the cyberpanel logs and here is the log output

2022-12-21 19:26:53.069398 [INFO] [2355] [2.24.2.141:60152-Q:A6826A4D1EDF3324-8#gun.wtf] Connection idle time too long: 301 while in state: 6 watching for event: 270336, close!
2022-12-21 19:26:53.069446 [INFO] [2355] [2.24.2.141:60152-Q:A6826A4D1EDF3324-8] Content len: 0, request line: ‘GET / HTTP/1.1’
2022-12-21 19:26:53.069455 [INFO] [2355] [2.24.2.141:60152-Q:A6826A4D1EDF3324-8#gun.wtf] HttpExtConnector state: 8, request body sent: 0, response body size: -2, response body sent:0, left in buffer: 0, attempts: 0.
2022-12-21 19:26:53.069516 [INFO] [2355] [2.24.2.141:60152-Q:A6826A4D1EDF3324-8#gun.wtf] Proxy connection state: 2, watching event: 25, Request header:734, body:0, sent:0, Response header: 0, total: 0 bytes received in 301 seconds,Total processing time: 301.

What is running on port 3000? netstat -lp | grep 3000 and netstat -lp | grep 2001 OR use ss e.g. ss -ltp | grep 3000

Yeah i was going to run on port 3000 but it said it was taken hence i decided to goto port 2001 instead

Install PM2, setup pm2 and add your app

Change your expressjs app to port 3000 before adding your app

It’s a Svelte app not express, and i’m currently using PM2 to run the app? But i get an error saying something else is already running on port 3000 so it stops immediately after running.

image1

Here is me starting the app on port 3000 then checking the status and it says it errored also the error is shown on here too which says it errored cause something else is on port 3000

Since svelte app is similar to expressjs app when it comes to deployment you need to check if a simple expressjs app runs as expected. If it does then you need to deploy svelte the proper way. If it fails check your nodejs installation

My nodejs installation should be fine, i installed it the same way you did on that post you linked

My svelte app runs fine on localhost so it should be fine running it on cyberpanel?

Solution can be found here

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.