Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI reconnection errors #167

Closed
ameshkov opened this issue Sep 2, 2015 · 3 comments
Closed

UI reconnection errors #167

ameshkov opened this issue Sep 2, 2015 · 3 comments

Comments

@ameshkov
Copy link
Member

ameshkov commented Sep 2, 2015

INFO, Adguard, 1, 02.09.2015 17:35:21.073, Register services.
INFO, Adguard, 1, 02.09.2015 17:35:21.073, ApplicationApiClient: Creating an instance of ApplicationApiClient. EndPoint=net.pipe://127.0.0.1/AdguardApiEndpoint. ClientId=4526d971bc7646279e79144773b22f00
INFO, Adguard, 1, 02.09.2015 17:35:21.074, Services registered.
INFO, Adguard, 1, 02.09.2015 17:35:21.075, Resolve client services.
INFO, Adguard, 4, 02.09.2015 17:35:21.080, Detected server, trying to reconnect
INFO, Adguard, 4, 02.09.2015 17:35:21.083, ApplicationApiClient: Connecting to the service API
INFO, Adguard, 1, 02.09.2015 17:35:21.083, Successfully resolved.
INFO, Adguard, 1, 02.09.2015 17:35:21.083, Initialize main window.
INFO, Adguard, 1, 02.09.2015 17:35:21.234, Initialize taskbar menu.
INFO, Adguard, 1, 02.09.2015 17:35:21.281, Check is first run after install
INFO, Adguard, 1, 02.09.2015 17:35:21.284, Show summary view.
INFO, Adguard, 1, 02.09.2015 17:35:21.289, Show main window.
INFO, Adguard, 1, 02.09.2015 17:35:21.290, Show main window
INFO, Adguard, 1, 02.09.2015 17:35:21.891, Successfully initialized.
ERROR, Adguard, 4, 02.09.2015 17:36:21.734, ApplicationApiClient: Client cannot connect to server: System.TimeoutException: This request operation sent to net.pipe://127.0.0.1/AdguardApiEndpoint did not receive a reply within the configured timeout (00:01:00). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.
Source: mscorlib
Stack trace:
Server stack trace:
at System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

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 Adguard.Ipc.Contract.ICommunicationApi.Connect()
at Adguard.Ipc.Client.ApplicationApiClient.b__8c(IApplicationApi api)
at Adguard.Ipc.Client.ApplicationApiClient.ExecuteServiceMethod(UseServiceDelegate codeBlock)
at Adguard.Ipc.Client.ApplicationApiClient.ConnectToApi()
at Adguard.Ipc.Client.ApplicationApiClient.Connect()

@ameshkov
Copy link
Member Author

ameshkov commented Sep 2, 2015

I think the problem is in "ConnectToApi" method call, it's locked for some reason

@ameshkov
Copy link
Member Author

ameshkov commented Sep 2, 2015

Further research shows that the cause is protection auto-start on first UI client connection.

  1. Client connects to windows service
  2. Service starts network filtering
  3. Service starts protection services
  4. While protection is still starting FilteringLogService raises logs events and sends them to UI client
  5. There's a deadlock somewhere there (points 4-5)

@ameshkov
Copy link
Member Author

ameshkov commented Sep 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants