how to find location of logged in client

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

how to find location of logged in client

Postby stevek » Fri May 24, 2013 10:09 pm

Hello All!

I can use some help with a problem in identifying origins of errors.

Attachment 1 shows the error log from the servoy-admin page. On it, it shows the IP of the connection. This is good information. However,

Attachment 2 shows active connections, however, it logs in from the local IP of the computer they are working on.

So here is the issue: I have no way to map which connected client (192.168.0.2) is located an a Public IP (76.75.74.73) <example>

Can servoy "attach" the two? Can I somehow show that "bob" (internal net ip of 192.168.0.111) is at the main st office ( public ip of 76.75.74.73).

It would really help in identifying where the problem is originating from. All of the offices are using DSL connections through the phone company, and the connection via the phone company's modem is DHCP.

All I can think for doing is remote into each office and grab the public IP with ipchicken.com and keeping the list by the server. The rub is that when power goes out for any reason, that IP will change.

So if anyone has an idea on a better way, I'd really appreciate the suggestions
Attachments
client-connections.PNG
shows IP (local) of connected clients
client-connections.PNG (89.96 KiB) Viewed 3513 times
server-log-page.PNG
shows public IP
server-log-page.PNG (76.79 KiB) Viewed 3513 times
stevek
 
Posts: 53
Joined: Thu Jan 25, 2007 7:19 pm

Re: how to find location of logged in client

Postby jcompagner » Mon May 27, 2013 4:23 pm

that info is not directly there.
That is because what you see is a rmi connection that is deep down registered somewhere.

the client info is more what an actual client gives us, so not the remote address that the server sees that client at.

also when you get those pure rmi connection warnings then it could be that the actual client is already far gone, so you can't really tie it to an active client anyway.
So better would be that the actual rmi exception you see would give you more client info stuff, but thats currently just not there.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: how to find location of logged in client

Postby mboegem » Mon May 27, 2013 10:46 pm

Using velocity services you an easily retrieve the external ip (https://www.servoyforge.net/boards/29/topics/661)
Although there's other possibilities to get this info from.

With the usermanager plugin (servoy-plugins.de) you can set additional info on a client connection and read that again, even from another location.

Hope this helps...
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: how to find location of logged in client

Postby stevek » Thu Jun 06, 2013 4:35 pm

Marc,

Thanks so much for pointing me in the correct direction. Now it is on to reading and experimenting
stevek
 
Posts: 53
Joined: Thu Jan 25, 2007 7:19 pm

Re: how to find location of logged in client

Postby mboegem » Fri Jun 07, 2013 4:10 pm

Hi Steve,

today I had a play with the external IP and noticed that there's also a 'city' property on this page.
Now, the thing is that I don't know where that's relying on, but you could give it a go.
Code: Select all
var vJSON = plugins.http.getPageData('http://ip-api.com/json');
   if(vJSON) {
      var vData = plugins.serialize.fromJSON(vJSON);
      
      if(vData && vData.status && vData.status == 'success') {
         if(vData.query) {
            globals.g_external_ip = vData.query;
         }
      }
   }


You can get the city from vData.city
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 9 guests