Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Host via JeeServiceDetails says 0.0.0.0

Hey guys, how are you?

I have a command to tell the status of all containers in a given node. There, I print the status of all the processing units deployed. To the web applications (I'm assuming it is a web app by the result of the method puInstance.isJee()), I also print the host + port number + context path, expecting something like 10.10.12.13:8888/my-app as result.

To do so, I am using the JeeServiceDetails getHost(), getPort(), getContextPath() methods. Context path and port are correct, no problems with them. However, getHost() is returning 0.0.0.0, instead of the actual host address. Is this a bug or I am taking the wrong approach?

Thanks in advance, guys!

asked 2017-07-06 13:33:53 -0600

pedro_brigatto gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Pedro,

Are you setting XAP_NIC_ADDRESS or NIC_ADDR (XAP version 10 or below)? What version of XAP are you using?

BTW, I've implemented the example for Processing Unit described here: https://docs.gigaspaces.com/xap/12.1/.... I am able to see the correct IP address.

Thanks, Dixson C:\fakepath\PuExample.zip

answered 2017-07-06 16:00:43 -0600

Dixson Huie gravatar image

updated 2017-07-10 09:59:02 -0600

edit flag offensive delete link more

Comments

Hi, Dixson!

Actually, we've been using 10.2 for a long time and migrated to 10.2 some months ago. I missed that, was using NIC_ADDR still. Also, instead of using the Machine.getHostAddress(), was calling JeeServiceDetails.getHost(), and they are different. Latter returns the 0.0.0.0 even after adding the variable (XAP_NIC_ADDRESS), while the former gives me the actual IP address.

It solved my problem, now I'm just wondering about this method getHost() from JeeServiceDetails and why it is not related to the host address as well ... shouldn't it return the same IP address then Machine#getHostAddress()?

Thank you very much!

pedro_brigatto gravatar imagepedro_brigatto ( 2017-07-10 04:42:47 -0600 )edit

Hi Pedro,

I've tried this and it seems to work for me. I am running on a local and a remote machine. I've attached to code (see the original answer post). Just curious, after you deploy your pu, what do you see in the Java Management Console (gs-ui)? Do you see the correct host ip address there? It could be possible that this is due to your environment. If you are customer you can open case for further assistance.

Thanks, Dixson

Dixson Huie gravatar imageDixson Huie ( 2017-07-10 09:54:26 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-06 13:33:53 -0600

Seen: 134 times

Last updated: Jul 10