LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2014, 08:58 AM   #1
tambyra
LQ Newbie
 
Registered: Nov 2014
Posts: 1

Rep: Reputation: Disabled
Nodejs remote debugging ports closed


I have a problem with nodejs remote debugging. I'm using centos on remote server and phpstorm on my PC. When I open putty: I type in command:

node --debug-brk=5858 main_server.js,

and the output is:

debugger listening on port 5858.

Next thing I do is go to edit configuration in phpstorm, and choose remotehost:8585. When I'm trying to connect, it pops up:

connecting to remoteserver:8585

connection refused.

What I have done so far is to add port 8585 and 5858 to centos firewall with adding lines to iptables:

-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5858 -j ACCEPT

-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8585 -j ACCEPT

After that I tried another solution, because I saw in documentation that I need to set up port forwarding:

yum install balance -yt

balance -df 8585 127.0.0.1.5858

and tried port forwarding with this command

iptables -t nat -A PREROUTING -p tcp -m tcp -i eth0 --dport 5858 -j DNAT --to 127.0.0.1:5858

The solutions I tried were: http://stackoverflow.com/questions/1...-no-connection and http://stackoverflow.com/questions/8...-with-phpstorm.

I also opened ports on my local network router and Windows firewall, but I don't know if I have a good logic. What is detailed procedure for enabling nodejs remote debugging on centos server, which ports do I need to open, where exactly (remote server and LAN), do I need port forwarding, and what I need to do in order to make nodejs remote debugging work?
 
Old 12-26-2014, 06:30 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,335
Blog Entries: 55

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
I'd say just remove the firewall rules you added, establish a SSH tunnel to the host and reach port 5858 via localhost.


//NTLB
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 34 05-24-2013 09:28 AM
[SOLVED] nodejs, nodejs-dev incompatibility in Ubintu? mjbradakis Linux - Software 1 03-24-2013 11:50 PM
Closed Ports? ZingSter Linux - Software 1 01-21-2005 12:08 PM
Help getting my ports filtered/closed.... BmxFace Linux - Security 3 02-04-2004 11:07 AM
Closed ports? Greg21 Linux - Networking 4 01-14-2002 11:37 PM


All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration