Can't run Strapi app on custom server

Hi,
I created custom server (app server) and I want to add several Strapi projects.

When I create new site and deployed project I got 502 error. So I tried to debug situation by NodeJS Deployments Troubleshooting and find out that my project not running on assigned port.

Also in server’s log Nginx Error is error

2022/10/08 11:17:53 [error] 162535#162535: *335 no live upstreams while connecting to upstream, client: 172.71.110.78, server: fld69vxjuyckvklu5813.cleaver.rocks, request: “HEAD / HTTP/1.1”, upstream: “http://localhost/”, host: “fld69vxjuyckvklu5813.cleaver.rocks”

I didn’t change any Cleavr default settings.

I already spend two days to make Strapi project to run, but no success.

Hello @Romanas welcome to the Cleavr forum!

The key logs to look at for Strapi are the PM2 logs - which you can view from either server > logs > PM2 logs or by looking at server > services > click heartbeat for NodeJS.

If it is indeed due to not running on the correct port, then I would look at the Strapi app to see if port number is hardcoded - though, that’s typically not the case for standard Strapi apps.

Was the app ever deployed on Heroku? If so, there may be some env variables that will need to be added in order to deploy. Check out this post for more info: Mysql Aborted connection - Deploying Strapi app on Cleavr that was previously configured for Heroku

Hi, @amiedema,
yes I was moving from Heroku. I cheked your suggested post, but no luck.

Now I created fresh Strapi project and deployed again on the same site, but the problem not disappeared

Also, I noticed that when I created new site (no any deployments) default landing page not working

I took a peak at the PM2 logs and see:

 Unknown dialect undefined\nError: Unknown dialect undefined\n    at getDialectClass

I believe we had a user with this similar error before and it had to do with db config. Googling the error code does show quite a few suggestions around updating the Strapi db config file to downgrading / upgrading the strapi version number.

Yes, this error indicates problem with Typescript. I deployed fresh Strapi install without Typescript and it worked.

But the problem with Cleavr is that logs aren’t full and displayed only part of error, so without your help I can’t debug

Yea, there is a deluge of server failed to start errors with this particular scenario; unfortunately, the helpful error gets buried down deep. We’ll need to see about making it more accessible.