Author Topic: No outbound firewall rule was created for Driver service  (Read 1977 times)

valtonen

  • Full Member
  • ***
  • Posts: 217
    • View Profile
No outbound firewall rule was created for Driver service
« on: September 24, 2010, 06:11:57 am »
<This may not be a bug, but required manual port opening to get Driver Service working>

We installed a remote Driver Service on a Windows 7 work computer (not the server):

-> The Driver Service was not able to connect to Master Service.
-> We noticed that the installer did not create an outbound rule to Windows Firewall. Thus, we manually added a rule to allow all traffic outbound
-> We restarted all Elve Services on both computers
-> The Driver Service connected successfully with Master Service.

The install log for this install is the last listed here: http://codecoretechnologies.com/community/index.php?topic=359.0.

I don't know should Driver Service require an outbound rule, but here Elve had only created inbound rules (and no outbound rules for any Elve services or programs).

-----

After a few minutes the Driver Service is shown in EMS as "LostConnection". If all Elve services on the server (has the Master Service) are restarted the Driver Service on the work computer stay in state "Running" for some minutes (2-10?) and then loses connection again.

The server and the work computers are in different domains, so it is very possible this is causing the trouble. Another Driver Service running on a work computer in the same domain with the server stays in "Running" state all the time.

-Miika
« Last Edit: September 24, 2010, 09:03:09 am by valtonen »

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: No outbound firewall rule was created for Driver service
« Reply #1 on: September 24, 2010, 08:19:58 pm »
Interesting, I received an email about the lost driver connection issue recently as well. I'll have to look into it. Thanks

And to make sure I understand this correctly, once you opened port 33902 manually in the firewall, things started working fine?
« Last Edit: September 24, 2010, 08:23:24 pm by John Hughes »
John Hughes
Codecore Technologies

valtonen

  • Full Member
  • ***
  • Posts: 217
    • View Profile
Re: No outbound firewall rule was created for Driver service
« Reply #2 on: September 25, 2010, 12:35:40 am »
And to make sure I understand this correctly, once you opened port 33902 manually in the firewall, things started working fine?

We actually opened all traffic outbound for fast testing, so I cannot confirm would the port number affect the situation. :( If you wish, we may test it with a specific port next week.

-Miika

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: No outbound firewall rule was created for Driver service
« Reply #3 on: September 25, 2010, 02:49:08 pm »
That's odd. The outbound rule should not normally be necessary unless the default Windows Firewall settings have been changed. The default Windows Firewall settings allow outbound connections on the domain profile, private profile, and public profile. In fact if you add a firewall exception using the Windows Firewall application it does not create an outbound exception.

I investigated the installation firewall components and I don't see a way to add a "outbound" rule problematically. Elve doesn't explicitly indicate "inbound" when it adds the port, it just adds as a globally open port.

I'm not sure there is much we can do about this one other than add a topic to the FAQ document.
John Hughes
Codecore Technologies

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: No outbound firewall rule was created for Driver service
« Reply #4 on: September 25, 2010, 02:52:52 pm »
Are you still having the following issue: After a few minutes the Driver Service is shown in EMS as "LostConnection"?
John Hughes
Codecore Technologies

eltuny

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: No outbound firewall rule was created for Driver service
« Reply #5 on: September 26, 2010, 09:37:42 pm »
John

I still have the issue with the Driver service loosing connection, I have dissable the firewall, try to manually open the port (which couldn't cause the system had already created), uninstall the program and install it again, what I did now is installed in another computer and is working find under a P4 2.6ghz, have being running for 30 hour and no conection lost, on the other hand on my other PC, a Revo Atom single core, after 30 hours it has disconnected 3 times, what canI dont to fix this problem, need to have it running on my Revo cost it consumes less power and is not that nossy, any other ideas???

valtonen

  • Full Member
  • ***
  • Posts: 217
    • View Profile
Re: No outbound firewall rule was created for Driver service
« Reply #6 on: September 27, 2010, 02:56:01 am »
Are you still having the following issue: After a few minutes the Driver Service is shown in EMS as "LostConnection"?

Unfortunately yes. We tried this again today and did the following steps:

1. Restart Driver Service on work computer
-> The Driver service is shown first in "Stopped" condition in EMS
-> In 5 seconds it changes to "Running"
2. We looked at the Devices using EMS to see if the new driver (with the .dll placed on the work computer) would appear there and switched back to EMS main screen, refreshed and it showed "LostConnection".

It took about 30 seconds to get from "Running" to "LostConnection" and the thing seems to be repeatable. Nothing is logged to Elve log about the "LostConnection" state.

-Miika

valtonen

  • Full Member
  • ***
  • Posts: 217
    • View Profile
Re: No outbound firewall rule was created for Driver service
« Reply #7 on: September 27, 2010, 02:57:55 am »
That's odd. The outbound rule should not normally be necessary unless the default Windows Firewall settings have been changed. The default Windows Firewall settings allow outbound connections on the domain profile, private profile, and public profile. In fact if you add a firewall exception using the Windows Firewall application it does not create an outbound exception.

I investigated the installation firewall components and I don't see a way to add a "outbound" rule problematically. Elve doesn't explicitly indicate "inbound" when it adds the port, it just adds as a globally open port.

I'm not sure there is much we can do about this one other than add a topic to the FAQ document.

I'm not sure if the IT department has modified the default Windows Firewall rules, so I'm happy with the solution "add a topic to the FAQ document".

-Miika

P.S. The EMS LostConnection problem is still there as indicated by the other (above) post of mine.
« Last Edit: September 27, 2010, 03:03:16 am by valtonen »

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: No outbound firewall rule was created for Driver service
« Reply #8 on: September 27, 2010, 08:28:38 am »
I'll add a message to the log indicating when and why the driver connection is lost which will help us determine why you are seeing this. If you continue to see the driver service Lost Connection please post a separate bug report with the log entry.


Thanks for the details.

John Hughes
Codecore Technologies

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: No outbound firewall rule was created for Driver service
« Reply #9 on: September 27, 2010, 08:45:40 am »
Quote
1. Restart Driver Service on work computer
-> The Driver service is shown first in "Stopped" condition in EMS
-> In 5 seconds it changes to "Running"
2. We looked at the Devices using EMS to see if the new driver (with the .dll placed on the work computer) would appear there and switched back to EMS main screen, refreshed and it showed "LostConnection".

It took about 30 seconds to get from "Running" to "LostConnection" and the thing seems to be repeatable. Nothing is logged to Elve log about the "LostConnection" state.

This sounds like a connectivity issue (such as a firewall)...

When the Driver Service starts up it contacts the Master Service. At this time the status should change from Stopped to Running. Again, in this case the Driver Service connected to the Master Service.

About 5 seconds later the Master Service will attempt to establish a new temporary connection to the Driver Service to test the connection. It will take about 25-30 seconds for this to fail if it can not connect. If the Master Service fails to connect to the Driver Service then it will assume the connection is lost (even if the Driver Service can connect to the Master Service). In this case the Master Service is attempting to connect to the Driver Service, which is where it sounds like is failing for you.

So I would double check that port 33902 is not blocked on the Driver Service machine and the Master Service machine.



In the future we will be changing this to use a persistent connection for simpler detection but that will be after v1.0.

« Last Edit: September 27, 2010, 08:47:15 am by John Hughes »
John Hughes
Codecore Technologies

valtonen

  • Full Member
  • ***
  • Posts: 217
    • View Profile
Re: No outbound firewall rule was created for Driver service
« Reply #10 on: September 28, 2010, 12:34:35 am »
Thanks for adding the log messages. Now the problem is clear, it just can't connect because it does not find the Driver Service host. The problem is probably either in the DNS system we are using or in the firewall settings. We'll look to that ourselves and get back to you if we need further advice.

Here's the log message:

Code: [Select]
<rec><dt>2010-09-28 07:27:17.1396256Z</dt><s>Error</s><msg>Connection to driver service on &apos;ELEPC46&apos; was lost. When testing the connection a SocketException was thrown (see below).

SocketException: No such host is known
SocketException SocketErrorCode: HostNotFound

System.Net.Sockets.SocketException: No such host is known

Server stack trace:
   at System.Net.Dns.GetAddrInfo(String name)
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
   at System.Runtime.Remoting.Channels.RemoteConnection..ctor(SocketCache socketCache, String machineAndPort)
   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&amp; responseHeaders, Stream&amp; 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&amp; msgData, Int32 type)
   at SharedLibrary.IDriverServiceRemotingClass.Ping()
   at MasterService.MasterServerEventEngine._monitorDriverServicesTimer_Elapsed(Object sender, ElapsedEventArgs e)</msg><app>MasterService</app><ma>SUKKULA</ma><ct>None</ct><cn></cn></rec>

-Miika


John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: No outbound firewall rule was created for Driver service
« Reply #11 on: September 28, 2010, 09:05:27 am »
That's great! I'm glad the additional log entry was helpful in isolating the issue. Yes I agree, it looks like the Master Service is not able resolve the ELEPC46 hostname to an ip address.
John Hughes
Codecore Technologies