Search Results

Search found 291 results on 12 pages for 'ipaddress'.

Page 2/12 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • problem in start up my RMI server(under ISP) so that it can recieve remote calls over Internet.--Jav

    - by Lokesh Kumar
    i m creating a Client/Server application in which my server and client can be on the same or on different machines but both are under ISP. My RMI programs:- -Remote Intreface:- //Calculator.java public interface Calculator extends java.rmi.Remote { public long add(long a, long b) throws java.rmi.RemoteException; public long sub(long a, long b) throws java.rmi.RemoteException; public long mul(long a, long b) throws java.rmi.RemoteException; public long div(long a, long b) throws java.rmi.RemoteException; } Remote Interface Implementation:- //CalculatorImpl.java public class CalculatorImpl extends java.rmi.server.UnicastRemoteObject implements Calculator { public CalculatorImpl() throws java.rmi.RemoteException { super(); } public long add(long a, long b) throws java.rmi.RemoteException { return a + b; } public long sub(long a, long b) throws java.rmi.RemoteException { return a - b; } public long mul(long a, long b) throws java.rmi.RemoteException { return a * b; } public long div(long a, long b) throws java.rmi.RemoteException { return a / b; } } Server:- //CalculatorServer.java import java.rmi.Naming; import java.rmi.server.RemoteServer; public class CalculatorServer { public CalculatorServer() { try { Calculator c = new CalculatorImpl(); Naming.rebind("rmi://"+args[0]+":1099/CalculatorService", c); } catch (Exception e) { System.out.println("Trouble: " + e); } } public static void main(String args[]) { new CalculatorServer(); } } Client:- //CalculatorClient.java import java.rmi.Naming; import java.rmi.RemoteException; import java.net.MalformedURLException; import java.rmi.NotBoundException; public class CalculatorClient { public static void main(String[] args) { try { Calculator c = (Calculator)Naming.lookup("rmi://"+args[0]+"/CalculatorService"); System.out.println( c.sub(4, 3) ); System.out.println( c.add(4, 5) ); System.out.println( c.mul(3, 6) ); System.out.println( c.div(9, 3) ); } catch (MalformedURLException murle) { System.out.println(); System.out.println("MalformedURLException"); System.out.println(murle); } catch (RemoteException re) { System.out.println(); System.out.println("RemoteException"); System.out.println(re); } catch (NotBoundException nbe) { System.out.println(); System.out.println("NotBoundException"); System.out.println(nbe); } catch (java.lang.ArithmeticException ae) { System.out.println(); System.out.println("java.lang.ArithmeticException"); System.out.println(ae); } } } when both Server and client programs are on same machine:- i start my server program by passing my router static IP address:-192.168.1.35 in args[0] and my server starts...fine. and by passing the same Static IP address in my Client's args[0] also works fine. but:- when both Server and client programs are on different machines:- now,i m trying to start my Server Program by passing it's public IP address:59.178.198.247 in args[0] so that it can recieve call over internet. but i am unable to start it. and the following exception occurs:- Trouble: java.rmi.ConnectException: Connection refused to host: 59.178.198.247; nested exception is: java.net.ConnectException: Connection refused: connect i think it is due to NAT Problem because i am under ISP. so,my problem is that how can i start my RMI Server under ISP so that it can recieve remote calls from internet????

    Read the article

  • Best practice for assigning A/B test variation based on IP address

    - by mojones
    I am starting to write some code for A/B testing in a Grails web application. I want to ensure that requests from the same IP address always see the same variation. Rather than store a map of IP-variant, is it OK to simply turn the IP address into an integer by removing the dots, then use that as the seed for a random number generator? The following is taking place in a Grails Filter: def ip = request.remoteAddr def random = new Random(ip.replaceAll(/\./, '').toInteger()) def value = random.nextBoolean() session.assignment = value // value should always be the same for a given IP address I know that identifying users by IP address is not reliable, and I will be using session variables/cookies as well, but this seems to be useful for the case where we have a new session, and no cookies set (or the user has cookies disabled).

    Read the article

  • How to get IP address of your application server

    - by Jason
    I need to be able to find the IP address of the server the page is currently executing on. I have some code that calls a third party site and has to pass a specific key that changes depending on which server it is on. Is there a CGI variable or some way in ColdFusion to determine what the IP address is of the host server?

    Read the article

  • Why ping another innet machine from MacBook get netgate's ip address?

    - by Xinwang
    I have three machine in my home network connected by a wireless router. One is server installed linux at 192.168.1.1, another is Thinkpad with MS Windows XP at 192.168.1.2, last one is MacBook Pro with Mac OS X 10.6.3 at 192.168.1.3. When I ping the Linux Server from Thinkpad (MS Windows XP) I can get the correct ip address, but when I ping it from Mac I get the global address of my router, like 61.135.181.175. Could you tell me why this happen? And how do I get same ping result on Mac and Windows. Thanks

    Read the article

  • Impact of Changing IP Address of Outgoing IP Packets From My Network

    - by iamrohitbanga
    If I modify the source ip address of all outgoing ip packets from my network to an ip address belonging to someone else (while ensuring that the checksum is correct) then what will happen. Assume that I have a public IP address connected by a point-to-point link to an ISP. Will the ISP check that the IP address in my IP packets is correct or will it just forward the packets. I believe that ISP should just forward the packets. what mechanisms are present in the Internet that prevent this from happening?

    Read the article

  • Proper way to scan a range of IP addresses

    - by Josh G
    Given a range of IP addresses entered by a user (through various means), I want to identify which of these machines have software running that I can talk to. Here's the basic process: Ping these addresses to find available machines Connect to a known socket on the available machines Send a message to the successfully established sockets Compare the response to the expected response Steps 2-4 are straight forward for me. What is the best way to implement the first step in .NET? I'm looking at the System.Net.NetworkInformation.Ping class. Should I ping multiple addresses simultaneously to speed up the process? If I ping one address at a time with a long timeout it could take forever. But with a small timeout, I may miss some machines that are available. Sometimes pings appear to be failing even when I know that the address points to an active machine. Do I need to ping twice in the event of the request getting discarded? To top it all off, when I scan large collections of addresses with the network cable unplugged, Ping throws a NullReferenceException in FreeUnmanagedResources(). !? Any pointers on the best approach to scanning a range of IPs like this?

    Read the article

  • Why does right shift in PHP return a negative number?

    - by Legend
    I am trying to query a bittorrent tracker and am using unpack to get the list of IPs from the response. So, something like this: $ip = unpack("N", $peers); $ip_add = ($ip[1]>>24) . "." . (($ip[1]&0x00FF0000)>>16) . "." . (($ip[1]&0x0000FF00)>>8) . "." . ($ip[1]&0x000000FF); But, for some reason, I am getting the following IP addresses when I print $ip_add: 117.254.136.66 121.219.20.250 -43.7.52.163 Does anyone know what could be going wrong?

    Read the article

  • Which database engines support IP addresses as a native type?

    - by Matt McClellan
    I'm trying to find databases with support for IP addresses as a native type (as opposed to storing as a string, or an unsigned integer, which at least one commenter has already pointed out won't work for IPv6). The primary reason I'm looking for this is ease of development. For example, sorting on a "native" IP address column would be correct (as opposed to when it's stored as a string). I would assume support for such a type would also include useful operations such as determining if an IP address is inside a specified network for use in WHERE clauses. The only one I'm aware of so far is PostgreSQL with its inet class. Does anyone have any others?

    Read the article

  • Socket Communication C#- IP Address

    - by Ahmet Altun
    I have a socket application which I can use in local network, at home. I can make them communicate for example from 192.168.x.x to 192.168.y.y ip addresses. What should I do if I want to use the application over internet, from a remote machine, not local. For example which ip addresses should I use if my friend who lives another country wants to access my application.

    Read the article

  • PHP returns a negative number?

    - by Legend
    I am trying to query a bittorrent tracker and am using unpack to get the list of IPs from the response. So, something like this: $ip = unpack("N", $peers); $ip_add = ($ip[1]>>24) . "." . (($ip[1]&0x00FF0000)>>16) . "." . (($ip[1]&0x0000FF00)>>8) . "." . ($ip[1]&0x000000FF); But, for some reason, I am getting the following IP addresses when I print $ip_add: 117.254.136.66 121.219.20.250 -43.7.52.163 Does anyone know what could be going wrong?

    Read the article

  • Interface design pattern / Java / Seam

    - by Walter White
    Hi all, Is this possible somehow? @Name("geolocationService") public interface GeolocationService { @Query("SELECT g FROM Geolocation geolocation INNER JOIN geolocation.deployment deployment WHERE geolocation.ipStart <= INET_ATON(:ipAddress) AND deployment.active = TRUE") Geolocation findByIpAddress(@NamedParameter("ipAddress")final String ipAddress); } public GeolocationAction { @In private GeolocationService geolocationService; @RequestParameter("ipAddress") private String ipAddress; @Out private Geolocation geolocation; public void find() { geolocation = geolocationService.findByIpAddress(ipAddress); } } Is it possible to do this without implementing the interface? What is required to make that work? I want to maintain less and do more. If I can intercept invocations of the geolocationService then I am golden, how would I do that? I don't want it to ever be instantiated, so it will always be null (I don't want the @Name and @In annotations either then). Walter

    Read the article

  • Creating collection with no code (almost)

    - by Sean Feldman
    When doing testing, I tend to create an object mother for the items generated multiple times for specifications. Quite often these objects need to be a part of a collection. A neat way to do so is to leverage .NET params mechanism: public static IEnumerable<T> CreateCollection<T>(params T[] items) { return items; } And usage is the following: private static IEnumerable<IPAddress> addresses = CreateCollection(new IPAddress(123456789), new IPAddress(987654321));

    Read the article

  • Can't remotely connect through SQL Server Management Studio

    - by FAtBalloon
    I have setup a SQL Server 2008 Express instance on a dedicated Windows 2008 Server hosted by 1and1.com. I cannot connect remotely to the server through management studio. I have taken the following steps below and am beyond any further ideas. I have researched the site and cannot figure anything else out so please forgive me if I missed something obvious, but I'm going crazy. Here's the lowdown. The SQL Server instance is running and works perfectly when working locally. In SQL Server Management Studio, I have checked the box "Allow Remote Connections to this Server" I have removed any external hardware firewall settings from the 1and1 admin panel Windows firewall on the server has been disabled, but just for kicks I added an inbound rule that allows for all connections on port 1433. In SQL Native Client configuration, TCP/IP is enabled. I also made sure the "IP1" with the server's IP address had a 0 for dynamic port, but I deleted it and added 1433 in the regular TCP Port field. I also set the "IPALL" TCP Port to 1433. In SQL Native Client configuration, SQL Server Browser is also running and I also tried adding an ALIAS in the I restarted SQL server after I set this value. Doing a "netstat -ano" on the server machine returns a TCP 0.0.0.0:1433 LISTENING UDP 0.0.0.0:1434 LISTENING I do a port scan from my local computer and it says that the port is FILTERED instead of LISTENING. I also tried to connect from Management studio on my local machine and it is throwing a connection error. Tried the following server names with SQL Server and Windows Authentication marked in the database security. ipaddress\SQLEXPRESS,1433 ipaddress\SQLEXPRESS ipaddress ipaddress,1433 tcp:ipaddress\SQLEXPRESS tcp:ipaddress\SQLEXPRESS,1433

    Read the article

  • VMWare Guest Info - Wrong IP Returned

    - by Jon Bailey
    We're running a VDI environment with vSphere 4.0 and Oracle VDI 3.2.2 and are having a bit of a problem with users that connect to an IPSec VPN from within their VM. For some reason, once connected to the VPN, the VMWare API returns GuestInfo.ipAddress as the VPN IP rather than the primary IP of the only NIC on the system. The IP address shown in net[0].ipAddress is the correct address and is what vSphere client is reporting. Is there any way to get VMWare tools to report the net[0].ipAddress as GuestInfo.ipAddress? Below is sample output from the guestinfo.pl script. 172.16.1.2 is the example "bad" VPN address that our VDI software is seeing. VMXFLEX01 guestFamily: windowsGuest VMXFLEX01 guestFullName: Microsoft Windows XP Professional (32-bit) VMXFLEX01 guestId: winXPProGuest VMXFLEX01 guestState: running VMXFLEX01 hostName: VMXFLEX01 VMXFLEX01 ipAddress: 172.16.1.2 VMXFLEX01 toolsStatus: VMware Tools is running and the version is current. VMXFLEX01 toolsVersion: 8194 VMXFLEX01 Screen - Height: 600 VMXFLEX01 Screen - Width: 800 VMXFLEX01 Disk[0]: Capacity 42935926784 VMXFLEX01 Disk[0]: Path : C:\ VMXFLEX01 Disk[0]: freespace : 33272619008 VMXFLEX01 net[0] - connected : 1 VMXFLEX01 net[0] - deviceConfigId : 4000 VMXFLEX01 net[0] - macAddress : 00:50:56:95:1f:c9 VMXFLEX01 net[0] - network : VM Network VMXFLEX01 net[0] - ipAddress : 10.0.0.2

    Read the article

  • powershell function output to variable

    - by tommy
    I have a function in powershell 2.0 named getip which gets the IP address(es) of a remote system. function getip { $strComputer = "computername" $colItems = GWMI -cl "Win32_NetworkAdapterConfiguration" -name "root\CimV2" -comp $strComputer -filter "IpEnabled = TRUE" ForEach ($objItem in $colItems) {Write-Host $objItem.IpAddress} } The problem I'm having is with getting the output of this function to a variable. The folowing doesn't work... $ipaddress = (getip) $ipaddress = getip set-variable -name ipaddress -value (getip) any help with this problem would be greatly appreciated.

    Read the article

  • How To Read Data using Ip Address

    - by DATT OZA
    I am doing punch card reader programming.. Establish connection with BioAccess V2 Device... socket successdully connected but data can't read... so how to read data ? Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream,ProtocolType.Tcp); var ipaddress = IPAddress.Parse("192.168.000.111"); IPAddress add = new IPAddress(ipaddress.GetAddressBytes()); EndPoint ep = new IPEndPoint(add, 5005); sock.Connect(ep); if(sock.connected) { } now what i have to do in IF BLOCK to read data ?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >