How do I fix 0.0.0.0:4723 on appium server?

Hi

Just doing my first test on appium

When I started appium server I got 0.0.0.0:4723 from the appium server.

I don’t think that’s correct based on my training material.

How do I fix this.

thanks

Please paste the logs for detailed explanation …

@pavanbachu

Here are current logs

Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ appium/build/lib/main.js --debug-log-spacing --automation-name “Appium” --platform-name “Android” --platform-version “4.4”

[Appium] Welcome to Appium v1.5.3

[Appium] Non-default server args:

[Appium] debugLogSpacing: true

[Appium] platformName: ‘Android’
[Appium] platformVersion: ‘4.4’
[Appium] automationName: ‘Appium’
[Appium] Deprecated server args:

[Appium] --platform-name => --default-capabilities ‘{“platformName”:“Android”}’
[Appium] --platform-version => --default-capabilities ‘{“platformVersion”:“4.4”}’
[Appium] --automation-name => --default-capabilities ‘{“automationName”:“Appium”}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:

[Appium] platformName: ‘Android’

[Appium] platformVersion: ‘4.4’
[Appium] automationName: ‘Appium’

[Appium] Appium REST http interface listener started on 0.0.0.0:4723

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…

[HTTP] <-- GET /wd/hub/status 200 32 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…

[HTTP] <-- GET /wd/hub/status 200 14 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…

[HTTP] <-- GET /wd/hub/status 200 12 ms - 83

Hi @fypnlp,

Did you run the test successfully? And what is your expectation?

@TuHuynh

I set up the project
AndroidDriver driver=new AndroidDriver (remoteAddress, desiredCapabilities);

I turned on activated Appium
Selected Android
pressed Launch

And still get the above result.

I suspect I should get an http://127.0.0.1:4723/wd/hub or something to that effect.

What I get is
[Appium] Appium REST http interface listener started on 0.0.0.0:4723

So Step by step how do I fix this problem.

don’t worry i have the same from the beginning (2years) and did not found that it affect me somehow - http://screencast.com/t/DojJUwYC7C

@Aleksei You were able to do all your testing with no problems?

yes.

just use this url when you start driver. e.g.:

String baseURL = "http://0.0.0.0:";
String minorURL = "/wd/hub";
String port = your_port_value;
driver = new AndroidDriver(new URL(baseURL+port+minorURL), capabilities);
1 Like

@Aleksei

Sorry for the dumb question ( I am a novice) .

I think its =

String baseURL = “http://0.0.0.0:4723”;
String minorURL = “/wd/hub”;
String port = your_port_value; (Where would I find port value?)
driver = new AndroidDriver(new URL(“http://0.0.0.0:4723”+port+"/wd/hub"), capabilities);

Is that the correct syntax?

If it is not the correct syntax what do I have to change or fix?

Also is ‘+’ actually used in the syntax for : driver = (new AndroidDriver ( new URL ( Url here), capabilities) ?

you may write:

new URL(“http://0.0.0.0:4723/wd/hub”)

or

String baseURL = “http://0.0.0.0:”;
String minorURL = “/wd/hub”;
String port = “4723”;
driver = new AndroidDriver(new URL(baseURL+port+minorURL), capabilities);

1 Like

I get you. Thank you so much. You’re a star

I found out that "http://0.0.0.0:4723/wd/hub is the default host/port for mac users!

check it out: https://github.com/appium/appium/issues/704

Bingo! You got it right already.
If you want to use your appium server as 127.0.0.1 in your code, just add the below param while launching the server:
–address 127.0.0.1
for example:
appium --address 127.0.0.1 --debug-log-spacing --platform-name “Android” --platform-version “4.4”

Hi, In my Mac system, Appium server runs on 0.0.0.0:4723 address.

But, I can run the Android tests successfully with the below java codes. Confused:(

driver = new RemoteWebDriver(new URL(“http://127.0.0.1:4723/wd/hub”), capabilities);

Any lead on this is much appreciated.

Cheers

It doesn’t matter if the server listens on 0.0.0.0. Both address are pointing to localhost.

You can force IP and port on both sides (both are examples):

  • Server: appium -a 10.0.10.45 -p 4725

  • Js Client: new URL("http://10.0.10.45:4725/wd/hub")

  • Ruby Client:
    desired_caps={ caps:{ platformName:"Android", etc... }, appium_lib: {server_url: "http://10.0.10.45:4725/wd/hub"} }

1 Like

i am using linux , unbuntu 16.04 version , unable to open url http://127.0.0.1:4723 ,its shhowing error server not found , while in terminal it is showing started appium after entering appium command
in terminal while ping getting following eror ,pls suggest way fwd
ping 0.0.0.0:4723
ping: unknown host 0.0.0.0:4723

try adding /wd/hub/ at client-side

Already treid

http://127.0.0.1:4723/wd/hub but still same issue , Cannot connect to the server

share your client caps and server flags please

Please can you explain How do i get that

Client caps: All capabilities you pass to the driver in your client-code (paste them here)
Server flags: The parameters passed to appium when starting the server (paste them here)