Calling start() on AppiumDriverLocalService timing out

I am programmatically starting the AppiumDriverLocalService in my framework but the start() method is timing out. This is the code I am using to start my server:

AppiumDriverLocalService appiumDriverLocalService = AppiumDriverLocalService.buildDefaultService();
appiumDriverLocalService.start();

This is the output that I am getting:

Mar 31, 2017 01:04:12:444 PM…INFO [main]: Build Identifier: ef242266_d654_4418_9ad5_0957d577f0e7
Mar 31, 2017 01:04:12:457 PM…INFO [main]: Starting local instance of the Appium server…
[Appium] Welcome to Appium v1.6.4-beta
[Appium] Appium REST http interface listener started on 0.0.0.0:4723

After this it times out. It seems like the server is up and running but the iOS simulator is not starting. When I start the server from the terminal and point my IOSDriver to that instance it all works fine. I am seeing this error only when starting with AppiumDriverLocalService.

My Configuration:
OS: Max OS X El Capitan (10.11.6)
Appium Version: 1.6.4-beta
Java Client Version: 5.0.0-BETA6

Thanks,
Steve

It seems to be hanging on the following line (line 136) in AppiumDriverLocalService.start():

ping(startupTimeout, timeUnit);

It seems like calling AppiumDriverLocalService.buildDefaultService() is generating the following: http://0.0.0.0:4723/wd/hub/status

After 120 seconds it times out. Like I said, it works perfectly when I start the Appium server from the terminal. I only get this error when trying to start it using AppiumDriverLocalService from IntelliJ.

–Steve

I got this to work by specifying 127.0.0.1 as the IP address:

AppiumServiceBuilder appiumServiceBuilder = new AppiumServiceBuilder();
appiumServiceBuilder.withIPAddress(“127.0.0.1”);
appiumDriverLocalService = AppiumDriverLocalService.buildService(appiumServiceBuilder);
appiumDriverLocalService.start();

1 Like

I’ve been having the same problem, and was hoping your solution would work for me. Unfortunately, it didn’t.

Visual Studio 2022 / C# .Net 7.0 -
I updated to appium WebDriver 4.4.0 having had a system which worked, and currently I’m having exactly these problems, while using 127.0.0.1 as the address - the appium explorer is connecting fine with a server started manually on 0.0.0.0… this is so weird