Running appium on different port. Console not connecting

I started appium server with

appium -p 4725 -bp 4726 -U 9f....

Then I try to run

arc

with appium.txt

[caps]
platformName = "android"
app = "/Users/...."
deviceName = "Android"
port = 4725
udid = "9f..."
bootstrapPort = 4726

The final result is always

ERROR: Unable to connect to Appium. Is the server running?

What am I doing wrong?

version:

arc -v
appium_console: v1.0.1
appium_lib: v4.1.0

appium -v
1.2.2

Reference link: https://github.com/appium/ruby_console/issues/34

bootstraponline already answered.

@tfcardoso port isn’t a desired capability, it’s an appium_lib client option.

[caps]
platformName = “android”
app = “/Users/…”
deviceName = “Android”
udid = “9f…”
bootstrapPort = 4726

[appium_lib]
port = 4725

1 Like

so, what should I do to make it work?

  1. start appium instances with different ports
    e.g. when appium installed with “npm”:

    appium --log-level error --port 4724 --command-timeout 120 --session-override
    appium --log-level error --port 4726 --command-timeout 120 --session-override

  2. start driver with appropriate port e.g. for MAC and Android client:

String baseURL = “http://0.0.0.0:”;
String minorURL = “/wd/hub”;
driver_1 = new AndroidDriver(new URL(baseURL+“4724”+minorURL), capabilities);
driver_2 = new AndroidDriver(new URL(baseURL+“4726”+minorURL), capabilities);

1 Like

I don’t think we should use this port number.

Why? I use this combination every day in test suite when test uses 2 phones.

Yes, socket always use this port. Ofcourse you can avoid any prob when using --bootstrap-port flag. I think we better avoid that in case of missing.

I used bootstraponlines suggestion, and setting the port in appium.txt works just fine for me. However, I would like to be able to set the address in appium.txt as well. I tried server_url = “10.22.58.7” and arc gives a ‘rescue in merge’ : both URI are relative (URI::BadUTIError)

Does anyone know how to set arc to use appium using a specified address?

@bootstraponline Thanks! I tried server_url = “http://10.22.58.7:4725/wd/hub” and that works perfectly.

I also want to use two devices, but no other port works except port:4723 in appium_service, for example:
appium_service = AppiumService()
appium_service.start(args=[’–address’, ‘127.0.0.1’, ‘–p’, ‘4724’, ‘–base-path’, ‘/wd/hub’])
Port 4724 no longer works for me on a Mac system