1

I am using Android Studio 2.3. When I am attaching my Moto G4 to debug an application, it ends up with the following error in Android Monitor.

6333-7189/? I/XMPPConnection: Preparing to connect user 1576857969013772288 to service: on host: and port: 0

03-25 11:06:18.221 6333-7189/? E/XMPPConnectionManager: Failed to connect user '1576857969013772288' to host ' on port 0: XMPPError connecting to :0.: remote-server-error(502) XMPPError connecting to :0.

-- caused by: java.net.ConnectException: Connection refused

After this error, no further logs are captured even in verbose mode.

Pang
  • 9,564
  • 146
  • 81
  • 122

2 Answers2

0

Check below Links:

https://stackoverflow.com/a/6876306/3992798

But on the development environment, on this particular line :-

String stream = (new java.net.URL(url)).openStream(); 
  • I am getting a "java.net.ConnectException: Connection refused" exception

  • On googling i figured, such problems are either due to one of the following

  • The port is wrong (cannot be this option, as same url running perfectly from local system)
  • Firewall is stopping it.
Community
  • 1
  • 1
parik dhakan
  • 787
  • 4
  • 19
  • As you can see, the user is not being able to connect to port 0. and following is the netstat report, which doesn't show port 0 as used: [link] (https://anotepad.com/notes/jragig) – pradeeptewary Mar 25 '17 at 08:27
0

The Android SDK, do you config the path? try to it what open a cmd window,input 'adb devices',see result waht display a device of you Moto

  • path is not the problem. Also adb devices lists my moto and emulator. _* daemon started successfully *_ _ZY223PG3ZL device_ _emulator-5554 device_ – pradeeptewary Mar 25 '17 at 08:14