Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

could not connect to tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061)

Hi I am new to android I am not able to run adb.exe it gives me below error:

==>adb start-server
adb I  6108  5748 adb.cpp:219] Android Debug Bridge version 1.0.32
adb I  6108  5748 adb.cpp:219] Revision 09a0d98bebce-android
adb I  6108  5748 adb.cpp:219]
adb I  6108  5748 adb_client.cpp:126] _adb_connect: host:version
adb I  6108  5748 sysdeps_win32.cpp:742] could not connect to tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061)
adb I  6108  5748 adb_client.cpp:175] adb_connect: service host:start-server
* daemon not running. starting it now on port 5037 *
Cannot open 'nul': The system cannot find the file specified. (2)
* failed to start daemon *
error: cannot connect to daemon

What does this error exactly mean..?

Cannot open 'nul': The system cannot find the file specified. (2)  

What is this error..?

like image 270
JDev Avatar asked Dec 17 '15 06:12

JDev


People also ask

How do I fix an ADB connection error?

In tools menu,Android-> untick enable adb Integration and Then OPEN widows task manager n manually end process adb.exe This also solved my issue as der were multiple adb.exe running. Show activity on this post. Restart the computer. Now, disconnect the device, connect it, Make sure USB debugging Option is enabled.

Why is ADB connection refused?

The ADB connection may get refused by the target machine if a wrong parameter is used in the ADB command e.g., if the device's IP was changed after a restart and the previous IP was used in the ADB command, then a user may encounter the error 10061.

Could not connect to the server no connection could be made because the target machine actively refused it 127.0 0.1 5432?

It means that the error is occurring because there is no server listening at the hostname and port you assigned. It literally means that the machine exists but that it has no services listening on the specified port. generally, it happens that something is preventing a connection to the port or hostname.


1 Answers

make sure you have installing your device driver and adb service and is activated USB debugging in android device -> setting -> developer options and must be could to see your device when you connected by USB port ( by this command : adb devices)

so when you connected by USB follow this Commands :

1-stay connect via USB
2-connect to your WIFI network (computer and mobile device both)
3-ping DeviceIP (must be have ping to your device)
4- adb kill-server
5-adb usb
6-adb tcpip 5556
7-adb connect "yourDeviceIP:5556"
8-adb devices (must be see two device names , one of them is by deviceIP:5556)
9-unplug USB cable

then it's Done! and you could to test your app

like image 136
java acm Avatar answered Sep 19 '22 11:09

java acm