Appium: Couldn't start the appium server in Wi

2019-04-16 00:34发布

问题:

I was having 2 version of Appium. One was installed on Windows/Program Files and Other version was .zip extract.

I was not able to start the Appium server and got below error -

error: Couldn't start Appium REST http interface listener. Requested port is already in use. Please make sure there's no other instance of Appium running already.

回答1:

Start the Windows Task Manager by pressing Ctrl+alt+Del. Under Processes tab kill the 'node.exe' process. Try to start the Appium server again



回答2:

In case you don't find the 'node.exe' in task manager (which happened with me), you can try the following:

  1. Stop the 'Appium Server'

  2. In the Appium Server, click on the 'Settings' gear icon and change the 'port' to something else, say 4725

  3. In your code, where you have invoked the 'AndroidDriver', change the port to the value you have updated above:

(AndroidDriver driver=new AndroidDriver(new URL("http://127.0.0.1:4725/wd/hub"),cap );)

  1. Start the Appium Server again.


回答3:

Stop the currently running appium server and start it again.



回答4:

I tried killing the process as told above node.js I didn't find the node.js running. One solution I would like to share ,which worked for me is ....try setting different port numbers in appium setting ex:4725 is default there change it to 4726 ...It will run next time if you face the same issue change back to earlier 4725.



回答5:

Start the Windows task manager by holding Ctrl+Alt+Del keys together. Kill the process adb.exe. Close appium and reconnect your mobile device then start appium.

I was also facing this problem and I got it resolved through these steps.



回答6:

Go to Appium(Android windows) setting change to any port number and start server again. once server is started again change to original port.



回答7:

appium -a 127.0.0.1 -p 4723

Here the port number is 4723. If the server is up in one port, you can try initializing the server in a different port.

Use the command

appium -a 127.0.0.1 -p (4724 or 4725 or any port number). It will work