Trying to install node.js but having issues

cPanel & WHM Version
98.0.6

supercain

Member
Sep 2, 2021
17
1
3
detroit
cPanel Access Level
Website Owner
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,029
313
cPanel Access Level
Root Administrator
Hey there! We've updated the instructions a bit since that blog post was written. Can you try working through the steps here instead to see if you get better results?

 

supercain

Member
Sep 2, 2021
17
1
3
detroit
cPanel Access Level
Website Owner
Hi,

thank you for the reply. However, I dont see any significant changes in the updated tutorial. In fact, all the steps up until the point Im having issues are exactly the same. Is there any other way I can troubleshoot this?

Thank you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,029
313
cPanel Access Level
Root Administrator
Thanks for that feedback. I worked through the steps on a test server and didn't run into an issue. It's important to note that steps 2 and 3 and the "Test the Application" section do mention that you need to log in as the cPanel user to a new terminal window/session. That ensures that you're loading the node application which you started with the "/opt/cpanel/ea-nodejs10/bin/node app.js" command.

When you run "/opt/cpanel/ea-nodejs10/bin/node app.js" do you get the "Server running at http://127.0.0.1:3000/" output in the terminal window? If so, I would expect a telnet command, assuming telnet is installed on the server, to be accessible to the user and to return positive output when tested with the following command:

Code:
telnet 127.0.0.1 3000
Here is what I get as the cPanel user when running that on my end:

Code:
[[email protected] ~]$ telnet 127.0.0.1 3000
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
If that doens't work, something is likely keeping the application from either starting to, or binding on port 3000.
 

supercain

Member
Sep 2, 2021
17
1
3
detroit
cPanel Access Level
Website Owner
Thank you for your kind patience.

Code:
When you run "/opt/cpanel/ea-nodejs10/bin/node app.js" do you get the "Server running at http://127.0.0.1:3000/" output in the terminal window?
yes. After that, right on that same window I ran telnet 127.0.0.1 3000 but nothing happens. Maybe I am doing something wrong?

EDIT: turns out I dont have telnet on my server. Any other way to test this?
 
Last edited:

supercain

Member
Sep 2, 2021
17
1
3
detroit
cPanel Access Level
Website Owner
Hi,

I cant. I am on a shared hosting. Maybe thats the problem all along? I just realized I forgot to mention that, sorry.

My provider performed the first steps for me, the ones that require to be done by the root user, although now Im not exactly sure they did correctly.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,029
313
cPanel Access Level
Root Administrator
Ah, that would be an issue then.

You'd have to work directly with the provider to have them do additional troubleshooting then, as all that testing would have to be done as the root user. Hopefully they are able to get more details on their end for you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,029
313
cPanel Access Level
Root Administrator
Unfortunately I'm not sure what the issue may be. You'll have to see why the test app didn't respond on port 3000, but that's something the host would need to test. It could be any number of things on their end with the server setup.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,029
313
cPanel Access Level
Root Administrator
I wouldn't say it's meaningless, but everything has to be taken in context. If one message says it's working, and the other says it's not, there's an issue that needs to be addressed.

If your host isn't able to resolve that they are welcome to submit a ticket to our team so we can take a look.
 

supercain

Member
Sep 2, 2021
17
1
3
detroit
cPanel Access Level
Website Owner
Hi again,

seems like its working since I finally got past the 2 tests. Now i would like to install socket.io but im still having issues so Im opening a new thread.

Thank you.
 
  • Like
Reactions: cPRex