-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal Server Error 500 #3
Comments
How to use log app and pm2? |
Did you set the backend template type to NodeApp? |
Yes |
Is there an error log in the web domain's ./log folder, adjacent to public_html? Let's check if NodeJS can be run by the command line. Login to the web domain's user account via SSH; can you get a NodeJS version number via: node --version |
node --version node.js installed and working |
That node version sounds very old. What OS is this? When you create a new site, and set the backend to NodeApp, a basic "Hello World" should have been created for you (along with the nodeapp folder). Do you see those files there? |
Also, what is the location that it reports for the Node runtime? Type: which node |
A test project is created. |
This project installs multiple versions of NodeJS (current and the last two LTS (long term support) versions). The command: which node Should report that NodeJS is coming from the /opt/nvm/ folder; with a sub folder matching NodeJS v18, v20, etc. What path are you seeing via "which node"? |
Ubuntu 22.04 64 bit |
It sounds like you're having trouble with the command:
Are you able to login to the user account associated with the website domain via SSH and type:
The default response should be something like:
|
Any solution to this error? I am having the same problem. In my case: Path: |
Which version of HestiaCP do you have installed? Note: this will only work with HestiaCP Ngnix+Apache2 setups. Do you have Nginx present? |
Yes, I have nginx and apache2 installed. |
For the given user, SSH should be enabled for the account. hcpp-nodeapp
uses PM2 (process manager 2) to manage NodeJS apps. Login as that user on
terminal window and type:
pm2 ls
Do you see any resulting process list? Or an error message?
…On Saturday, May 11, 2024, Mike Molina ***@***.***> wrote:
Which version of HestiaCP do you have installed? Note: this will only work
with HestiaCP Ngnix+Apache2 setups. Do you have Nginx present?
Yes, I have nginx and apache2 installed.
HestiaCP: v1.8.11
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE3EB4HY3ZFLKF4QZVOT5TZBZHBVAVCNFSM6AAAAABCFYLJEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVHE2TSMRXHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
Well that is a good sign; at least we can see some critical dependencies
were installed. Let’s see if a port was properly allocated to your web app.
Do you see a .ports file in a subfolder at:
/usr/local/hestia/data/hcpp/ports/[username]/[domain].ports
Where [username] and [domain] match your user and webapp domain?
On Sat, May 11, 2024 at 10:47 AM Mike Molina ***@***.***>
wrote:
… For the given user, SSH should be enabled for the account. hcpp-nodeapp
uses PM2 (process manager 2) to manage NodeJS apps. Login as that user on
terminal window and type: pm2 ls Do you see any resulting process list? Or
an error message?
… <#m_4581956381624986963_>
On Saturday, May 11, 2024, Mike Molina *@*.*> wrote: Which version of
HestiaCP do you have installed? Note: this will only work with HestiaCP
Ngnix+Apache2 setups. Do you have Nginx present? Yes, I have nginx and
apache2 installed. HestiaCP: v1.8.11 — Reply to this email directly, view
it on GitHub <#3 (comment)
<#3 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAE3EB4HY3ZFLKF4QZVOT5TZBZHBVAVCNFSM6AAAAABCFYLJEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVHE2TSMRXHE
<https://github.com/notifications/unsubscribe-auth/AAE3EB4HY3ZFLKF4QZVOT5TZBZHBVAVCNFSM6AAAAABCFYLJEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVHE2TSMRXHE>
. You are receiving this because you commented.Message ID: @.*>
It shows me a table with empty content.
2024-05-11_11-46-15.png (view on web)
<https://github.com/virtuosoft-dev/hcpp-nodeapp/assets/7104835/a192fdf3-95a1-465a-9c43-a85a43a39bed>
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE3EB5EKMLA2SAWNFUV7SLZBZKTTAVCNFSM6AAAAABCFYLJEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVHE3DOMJYGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes, the file exists. The content of the file is: |
Problem solved. |
hello I have the same exact issue, but I really don't want to reinstall my entire server to fix this :P After following all the steps provided, when I visit the subdomain I get : 500 Internal Server Error Connect() failed (111: Connection refused) while connecting to upstream, client:request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:50000/") So, answering all the previous questions: Hestia Control Panel v1.8.11 root@dev:~# which node root@dev:/opt/nvm/versions/node# ls This process is displyed because trying to make it work I replaced the Hello world script inside ../nodeapp with my actual node application (which is mirotalk https://github.com/miroslavpejic85/mirotalk ) /usr/local/hestia/data/hcpp/ports/[username]/[domain].ports The content of the file is: reading online on non hestiacp specific posts, this issue seems related to an nginx misconfiguration PS At last, I don't know if it may be of help, here is the guide to configure apache2 / nginx for mirotalk (the nodejs app I am trying to install) https://docs.mirotalk.com/mirotalk-p2p/self-hosting/ |
Nginx has a command line test switch. Login, and run. sudo nginx -t What is the output? It may give us a hint as to the mis-configuration. |
root@dev:~# nginx -t |
hello, any news? Did you receive my server credentials? Please when you have any minute give it a look, I am not the only one experiencing this issue (plus, I tried on another server.. Same issue again :P ) |
Sorry, have not received any credentials. Check the email address you used? Your nginx -t does not appear to list anything obvious. |
hello, I re sent the email just now to steve AT steveorevo DOT com (I am writing like this in order for the bots not to spam you) |
This problem can occur if the given account holder (admin) does not have SSH access. A bash shell must be available to control the NodeJS processes. Please note "admin" is not recommended for setting up websites. Hestia should have warned you to create another user account just for websites. It's best to:
See the screenshot at: |
hello, thanks for your input: I double checked, in my case I am using another account ( name of the account "miro" ) and I selected 'bash' under SSH access. Still the same issue unfortunaltely. |
I see. I noticed that miro/[domain]/nodeapp/node_modules has user/group root. This is a potential problem as all files under miro/[domain]/nodeapp should be owned by the Hestia user miro. Can you remove the nodeapp folder (as root user)? Then reselect NodeApp as the Proxy Template. This should copy over the basic "Hello World" nodeapp. We'll want to troubleshoot Hello World before trying your microtalk application. Let me know when the default HelloWorld app is in the ./nodeapp folder and I can further diagnose the issue. |
Clearing the directory will not cause the default hello world app to be installed; because it sees that you already have a nodeapp installed. Set the proxy template to “default” first, then remove the nodeapp folder. With the nodeapp folder removed, reset the Proxy Template to “NodeApp”, upon save, the HCPP-NodeApp plugin will create a proper nodeapp folder and default HelloWorld app for you. |
Ok, I can take a look at it from here. I will login with the credentials you furnished and will see if I can find anything wrong. |
We can manually start the HelloWorld app via login ssh (example: ssh [email protected]); and manually start the HelloWorld app via:
But on your server we get an error:
Upon further investigation we can see that Node version 20 is not installed:
HCPP-NodeApp is designed to allow you to use multiple versions of NodeJS. It looks like you only have version v16 and version v18 installed. We can try to use v18 by simply changing the .nvmrc file. But the problem persists:
This tells me that maybe the HCPP-NodeJS plugin and automatic installation of NodeJS versions 16, 18, and 20 did not install completely. You may want to try to install it again. This would require root access. Restart your server to ensure any open files are closed and run the following as root:
Then re-install the HCPP-NodeApp plugin following the manual install directions or provide me with sudo access and I can attempt to install this for you. |
hello, so I performed all the steps above, installed nodejs 20 , reinstalled HCPP-NodeJS , reconfigured user miro. Unfortunately, I am experiencing the same exact issue "Internal server error 500". Feel free to make all the testing you want on my server, including removing older versions of nodejs and/or installing/uninstalling other packages, because I am really unable to find the bug |
Fixed. It looks like nvm and node v20 had conflicts with an existing nvm installation. HCPP-NodeApp is designed to install its own, new, NVM and Node versions in /opt/nvm. HCPP-NodeApp is usually installed on an untouched system (except for very old Node v12 that Ubuntu/Debian may have present). So an existing NVM is not common. The non-standard /opt/nvm directory I have implemented is supposed to reduce conflict with any pre-existing version (say in /root/.nvm) but it looks like this actually complicates things further. I've removed the existing /root/.nvm and let the installer proceed with its own version at /opt/nvm. However, given your issue; this maybe a problem with many users that try to do NodeJS stuff with Hestia. I'll look at the install script to be more compatible and forgiving with pre-existing NVM installations, and work with /root/.nvm in the future. The HelloWorld is now functional and you can see how it works. When logging into miro shell, you can manage the process with PM2. I.e.
Will list the HelloWorld process as running:
|
Do not install v20. The HCPP-NodeApp install process should do all that for you. |
ok, one last question, which maybe a bit out of scope here, but since I am getting the same internal server error 500, maybe related: When I go to the installation process I read the following: Before running MiroTalk P2P, ensure you have Node.js installed. This project has been tested with Node versions [12.X] [14.X][16.X]and [18.x] -# clone this repo So I just put the entire content of the app inside ./nodeapp and rebooted but still I get Internal Server Error when visiting the subdomain finally, even manually starting the app root@dev:/home/miro/web/miro.xxx.it/nodeapp# npm start
From the command line everything seems running fine except that Internal server error as soon as I visit the subdomain... other info if useful https://docs.mirotalk.com/docs/self-hosting/ |
Beyond the scope. But you can look at HelloWorld and a few other HCPP-based plugins that rely on HCPP-NodeApp for hints. First, you'll want to turn off the existing HelloWorld app. You can do this in 1 of 2 ways:
OR
Above, zero is the ID of the HelloWorld app. That might be different; use Next, you will want to adjust the NodeApp to use NodeJS v18 instead of v20. HCPP-NodeApp makes this easy; just edit the .nvmrc file to say Now to configure your app to use PM2. HCPP-NodeApp works by searching for all *.config.js files. When it finds one, it will use PM2 to start them. For example, the HelloWorld app has a file called app.config.js. This file, by default, will launch a the node program of the same name app.js. We can ignore the In theory, the app.config.js file might look like this:
Once the file is edited, you should set the Proxy Template for the domain back to NodeApp; this will trigger HCPP-NodeApp to look for the app.config.js file and start the mirotalk application. |
Hello, now it works wonderfully, thank you! Also, I think the last post could be really useful if integrated in the first page of this project, as it explains better how this plugin works and could be successfully setup. |
Hello!
I did everything according to the instructions.
Installed - https://github.com/virtuosoft-dev/hestiacp-pluginable
Installed - https://github.com/virtuosoft-dev/hcpp-nodeapp
User have bash ssh.
I created a web and I had a nodeapp folder (home/web/domain/nodeapp).
When I go to my link I see a 500 error.
app.outapps.info.error.log:
Help! What could be the problem?
How can I see the application's performance? If I log in via ssh, pm2 logs does not work in the console((((
The text was updated successfully, but these errors were encountered: