Trouble with loopback adapter(?)

I get a timeout and this error message when trying to connect to my new Dataphor server with either Windows Client or Dataphoria:

System.Net.Sockets.SocketException
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host failed to respond 192.168.0.1

The server computer is set up with DHCP, and a loopback adapter since Oracle requires a static IP address. I can connect to the server itself with Remote Desktop, and to the Oracle server with both the http-based Enterprise Manager and the Java-based SQL Developer without any problems, so the network setup seems fine in general. I can also connect to the Dataphor service locally from the server computer. It's just when connecting to Dataphor from a different computer that I get the error.

Do you have any idea what may be causing this? Do the client applications use some special fancy way of connecting that is confused by the loopback adapter? Or must the service be configured in some special way?

Re: Trouble with loopback adapter(?)

Hi Jon,

Now that you raise this, I'm wondering if we bind to all network adapters or to the first adapter. If the latter, then I wonder if the loopback adapter is configured as the first adapter and therefore we never bind to the NIC.

Under Advanced Settings in the network connections form, there is an Adapters and Binding tab which gives the ability to specify the order of network connections. You might try ensuring that your NIC is at the top.

We use .NET remoting through the TcpChannel for communications, which seems to employ fairly standard socket utilization from what I've seen using Reflector. There may be some .NET configuration we can do, maybe even in the config file and not in code, that would allow us to bind to a particular adapter, or all adapters perhaps (assuming that is the issue).

Another thought: I think there are utilities that will list what processes are holding which TCP ports for what adapters. Perhaps such a utility would give us some visibility on this matter.

Best,

--
Nathan Allan [Alphora]

Re: Trouble with loopback adapter(?)

I put my NIC at the top, but it didn't make any difference.

Re: Trouble with loopback adapter

Hi Jon,

The only thing I can think of is the port. The clients use port 8060 by default. Is it possible that traffic on that port is not getting through?

Bryn Rhodes
Database Consulting Group LLC

Re: Trouble with loopback adapter

The server computer is not running a firewall. The client computer is, but it is able to connect to several other Dataphor servers running on computers without loopback adapters. I guess I'll turn off the adapter and get a fixed IP address for the server computer and see if that fixes the problem.

But what do you mean by "The clients use port 8060 by default"? Are there incoming connections to the client? The servers listen on port 8061 by default, as far as I can tell.

Thanks for the swift answer, by the way. :)

Port

Hi Jon,

Sorry, yes, 8061. What I mean by the clients use the port is that the clients specify the port they will use as part of their configuration, so if that's not matching what the server is actually listening on, that will cause a problem as well. This is no longer the case in 2.2, we actually introduced instance names so the client no longer has to specify a port number.

As far as connectivity from a separate machine, are you using the computer name on the client, or are you specifying the actual IP address as the host name?

Bryn Rhodes
Database Consulting Group LLC

Re: Port

I've tried using both the computer name and the IP address, but the result is the same. Rather strange that I can try to connect to 10.140.1.94 and get an error message saying connection to 192.168.0.1 failed.

Anyway, the problem is not that the port number is wrong. If I try to connect using a wrong port number, I get a different error message: "No connection could be made because the target machine actively refused it 10.140.1.94:8060" -- and the error comes after a few seconds, instead of after half a minute. Also, the stack traces are different. Here's the original one:


SocketException --->
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.0.1:8061
---- Stack Trace ----

Server stack trace:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()
at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Alphora.Dataphor.DAE.IRemoteServerConnection.get_ConnectionName()
at Alphora.Dataphor.DAE.Server.LocalServer.CheckServerConnection()
at Alphora.Dataphor.DAE.Server.LocalServer.Connect(SessionInfo ASessionInfo)
at Alphora.Dataphor.DAE.Client.DataSession.InternalOpen()
at Alphora.Dataphor.DAE.Client.DataSessionBase.Open()
at Alphora.Dataphor.Dataphoria.Dataphoria.EnsureServerConnection()
at Alphora.Dataphor.Dataphoria.Dataphoria.FrameBarManagerItemClicked(Object ASender, BarItemClickedEventArgs AArgs)

And here's the one for wrong port number:


SocketException --->
No connection could be made because the target machine actively refused it 10.140.1.94:8060
---- Stack Trace ----

Server stack trace:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()
at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Alphora.Dataphor.DAE.IServerBase.get_InstanceID()
at Alphora.Dataphor.DAE.Server.LocalServer..ctor(IRemoteServer AServer, Boolean AClientSideLoggingEnabled, String AHostName)
at Alphora.Dataphor.DAE.Server.ServerFactory.Connect(String AServerURI, Boolean AClientSideLoggingEnabled, String AHostName)
at Alphora.Dataphor.DAE.Client.ServerConnection..ctor(ServerAlias AServerAlias, Boolean AAutoStart)
at Alphora.Dataphor.DAE.Client.DataSession.InternalOpen()
at Alphora.Dataphor.DAE.Client.DataSessionBase.Open()
at Alphora.Dataphor.Dataphoria.Dataphoria.EnsureServerConnection()
at Alphora.Dataphor.Dataphoria.Dataphoria.FrameBarManagerItemClicked(Object ASender, BarItemClickedEventArgs AArgs)