ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hurley <jhur...@hortonworks.com>
Subject Re: Requesting help regaring remote Debugging ambari-server
Date Wed, 01 Feb 2017 16:54:25 GMT
When I execute the same command that you do to start Ambari in debug mode, I can see this:

[root@c6401 ~]# netstat -anp | grep 5005
tcp        0      0 0.0.0.0:5005                0.0.0.0:*                   LISTEN      16228/java

The difference here is that yours is already bound (ESTABLISHED), so no IDE would be able
to connect to it. After I use Eclipse to connect to my VM, my netstat now shows:
[root@c6401 ~]# netstat -anp | grep 5005
tcp        0      0 192.168.64.101:5005         192.168.64.1:53889          ESTABLISHED 16228/java

So, in your post, there is already a debugger attached and running to your process. When I
try to see what's attached to mine locally, I can see this:
> sudo lsof -i -P | grep 5005
eclipse   16336        jhurley  145u  IPv6 0x2d8ef3b5e9fd9b59      0t0  TCP 192.168.64.1:53889->c6401.ambari.apache.org:5005
(ESTABLISHED)

There's definitely something already connected to Ambari which is why Eclipse can't connect.

> On Feb 1, 2017, at 11:33 AM, Sandy <sandy.wadhwa@gmail.com> wrote:
> 
> Eclipse is giving me error,. Is there any other IDE I can use??
> 
> It would be helpful, if you can point me to a place what has step by step
> instructions documented for me to follow.
> 
> 
> 
> On 01-Feb-2017 9:55 PM, "Jonathan Hurley" <jhurley@hortonworks.com> wrote:
> 
>> Everything looks correct here then - it actually says that you've already
>> established a socket connection on that port:
>> Your vagrant VM (192.168.70.101) has an established socket connection with
>> 192.168.70.1 (client port 50088).
>> 
>> I would assume that 192.168.70.1 is your host computer. Can you check and
>> see which process is using port 50088?
>> 
>> On Feb 1, 2017, at 11:20 AM, Sandy <sandy.wadhwa@gmail.com<mailto:
>> sandy.wadhwa@gmail.com>> wrote:
>> 
>> Just one more thing.  I am trying this on VAGRANT VMs setup and I started
>> the server using
>> 
>> sudo ambari-server start --debug
>> 
>> Output for below command with root is like this
>> 
>> [vagrant@c7001 ~]$ sudo netstat -anp | grep 5005
>> 
>> tcp        0      0 192.168.70.101:*5005*     192.168.70.1:50088
>> ESTABLISHED 12838/java
>> 
>> On Wed, Feb 1, 2017 at 9:48 PM, Sandy <sandy.wadhwa@gmail.com<mailto:
>> sandy.wadhwa@gmail.com>> wrote:
>> 
>> Yup!  Here's the output.
>> 
>> $ netstat -anp | grep 5005
>> 
>> (Not all processes could be identified, non-owned process infowill not be
>> shown, you would have to be root to see it all.)
>> 
>> tcp        0      0 192.168.70.101:*5005*     192.168.70.1:50088
>> ESTABLISHED -
>> 
>> Regards,
>> 
>> Sandeep.
>> 
>> On Wed, Feb 1, 2017 at 9:43 PM, Jonathan Hurley <jhurley@hortonworks.com<
>> mailto:jhurley@hortonworks.com>>
>> wrote:
>> 
>> I don't think screenshots come through correctly on distribution lists
>> here (I can't see yours). Can you verify that Ambari is started on that
>> port?
>> 
>> netstat -anp | grep 5005
>> 
>> 
>> On Feb 1, 2017, at 11:04 AM, Sandy <sandy.wadhwa@gmail.com<mailto:
>> sandy.wadhwa@gmail.com>> wrote:
>> 
>> I'm using 5005 itself.  Refer attached screenshot in original mail.
>> Still
>> facing the issue.
>> 
>> On 01-Feb-2017 9:27 PM, "Jonathan Hurley" <jhurley@hortonworks.com<mailto:
>> jhurley@hortonworks.com>>
>> wrote:
>> 
>> Which port are you trying to connect to? When starting Ambari Server
>> with
>> debug on, a different port is used for JDWP. You need to connect on
>> port
>> 5005. Here's an excerpt from the startup command:
>> 
>> -Xdebug -Xrunjdwp:transport=dt_socket,address=5005
>> 
>> On Feb 1, 2017, at 10:05 AM, Sandy <sandy.wadhwa@gmail.com<mailto:
>> sandy.wadhwa@gmail.com><mailto:
>> sandy.wadhwa@gmail.com<mailto:sandy.wadhwa@gmail.com>>> wrote:
>> 
>> I am trying to setup remote debugging for ambari server and have
>> started
>> the server using
>> 
>> ambari-server start --debug
>> 
>> But when I try to connect to server using eclipse, I am getting
>> following
>> exception:
>> 
>> java.net.ConnectException: Connection refused (Connection refused)
>> at java.net.PlainSocketImpl.socketConnect(Native Method)
>> at java.net.AbstractPlainSocketImpl.doConnect(
>> AbstractPlainSocketImpl.java:350)
>> at java.net.AbstractPlainSocketImpl.connectToAddress(
>> AbstractPlainSocketImpl.java:206)
>> at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocket
>> Impl.java:
>> 188)
>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>> at java.net.Socket.connect(Socket.java:589)
>> at java.net.Socket.connect(Socket.java:538)
>> at java.net.Socket.<init>(Socket.java:434)
>> at java.net.Socket.<init>(Socket.java:211)
>> at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(
>> SocketTransportService.java:148)
>> at java.lang.Thread.run(Thread.java:745)
>> 
>> Attached screenshots of Eclipse Settings and Error Message.
>> 
>> Can someone help me with what i might be missing.
>> 
>> --
>> 
>> Sandeep Kumar,
>> Mobile +91-9866507368 <+91%2098665%2007368>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> 
>> *Sandeep Kumar,*
>> Mobile +91-9866507368 <+91%2098665%2007368>
>> 
>> *“I believe in smart work, Believe Me”*
>> 
>> 
>> 
>> 
>> --
>> 
>> *Sandeep Kumar,*
>> Mobile +91-9866507368
>> 
>> *“I believe in smart work, Believe Me”*
>> 
>> 

Mime
View raw message