the server "net.tcp://localhost:7046/DynamicsNAV71/service" is either unavailable or your connection has been lost

Good Day

yesterday out of the blue our Navision service (2013 R2) seems to be dropping connection all of a sudden.

we have 2 terminal servers(2012) with load balancing and the NAS and RTC running, this is pointed to our SQL cluster(2012) (all servers virtual)

I did add to our custom settings file but it is dropping connection after 5 or s mins sometimes while people are working.

I found this in the event log:

Type: Microsoft.Dynamics.Nav.Client.NavClientClosingException

Fatal: True

ShowError: True

Message: The connection to the server has been lost. The application will close.

StackTrace:

at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.<>c__DisplayClass6.b__4()

at Microsoft.Dynamics.Nav.Client.WinClient.NavClientErrorHandler.ExecuteAndCatchExceptions(Func`1 execute)

Source: Microsoft.Dynamics.Nav.Client.WinClient

HResult: -2146233088


Type: Microsoft.Dynamics.Nav.Client.NavClientClosingException

Fatal: True

ShowError: True

Message: The connection to the server has been lost. The application will close.

StackTrace:

at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.HandleCommunicationFailure[T](BeginCallServerMethod beginCallServerMethod, EndCallServerMethod`1 endCallServerMethod, ServerCallOptions options, Exception e, Int32 messageNumber, String sessionId)

at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](BeginCallServerMethod beginCallServerMethod, EndCallServerMethod`1 endCallServerMethod, ServerCallOptions options)

at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](BeginCallServerMethod beginCallServerMethod, EndCallServerMethod`1 endCallServerMethod)

at Microsoft.Dynamics.Nav.Client.ServerInvocationHandler.CallServer[T](BeginCallServerMethod beginCallServerMethod, EndCallServerMethod`1 endCallServerMethod)

at Microsoft.Dynamics.Nav.Client.ServiceConnection.CallServer[T](BeginCallServerMethod beginCallServerMethod, EndCallServerMethod`1 endCallServerMethod)

at Microsoft.Dynamics.Nav.Client.ServiceConnectionBase.GetPage(PageRequestDefinition pageRequestDefinition, NavRecordState& state)

at Microsoft.Dynamics.Nav.Client.ServiceConnection.Microsoft.Dynamics.Nav.Client.IService.GetPage(PageRequestDefinition , NavRecordState& )

at Microsoft.Dynamics.Nav.Client.DataBinder.NstDataAccess.GetPage(PageRequestDefinition pageRequestDefinition, Bookmark bookmark)

at Microsoft.Dynamics.Nav.Client.DataBinder.NavPageReader.GetNext(Int32 noOfBlocks)

at Microsoft.Dynamics.Nav.Client.DataBinder.NavDataReader.ReadRows(NavPageReader reader, Int32 noOfBlocks)

at Microsoft.Dynamics.Nav.Client.DataBinder.NavDataReader.FillBackwardRowEntryCollection(Int32 noOfBlocks)

at Microsoft.Dynamics.Framework.UI.VirtualRows.FillPreviousBlock(Int32 blocks)

at Microsoft.Dynamics.Framework.UI.BindingManager.FillPreviousBlock(Int32 blocks)

at Microsoft.Dynamics.Framework.UI.VirtualRows.PageinBackwards(Int32 indexRequested)

at Microsoft.Dynamics.Framework.UI.VirtualRows.PageToIndex(Int32 index)

at Microsoft.Dynamics.Framework.UI.RepeaterControl.PageToIndex(Int32 index)

at Microsoft.Dynamics.Framework.UI.WinForms.RepeaterControlAdapter.BusinessGrid_DataGridMoving(Object sender, BusinessGridMovingEventArgs e)

at Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessGrid.DoDataGridMoving(BusinessGridMovingEventArgs e)

at Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessGrid.VerticalScrollBar_Scroll(Object sender, ScrollEventArgs e)

at System.Windows.Forms.ScrollBar.OnScroll(ScrollEventArgs se)

at System.Windows.Forms.ScrollBar.DoScroll(ScrollEventType type)

at System.Windows.Forms.ScrollBar.WmReflectScroll(Message& m)

at System.Windows.Forms.ScrollBar.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Source: Microsoft.Dynamics.Nav.Client.ServiceConnection

HResult: -2146233088

has anyone experienced this before?

Hi james,

Goto development environment and see Database information by clicking File-> Database-> Information.

In that window check whether Server instance is filled or not… if is filled copy the path and paste it in RTC Server Address…

Regards,

Murali Mohan

Hi Murali

The server name is in the RTC server address path i just used localhost in the question for security.

is there anything else you think i should check?

Is your service running?

yes both servers services are running.

then check whether there is any SQL procedure like “Kill Idle session after 5 min”…

there are no killing procedures on the SQL

Follow these and try once…

select database in Sql

database->Security—> User->right click and select “Create new User”

from this select network authority in login name and add it. and restrt ur service…

it might work…

restart the SQL or NAS service?

a new error in the event log

Type: Microsoft.Dynamics.Nav.Client.NavClientClosingException

Fatal: False

ShowError: True

Message: The session could not be retrieved from the server. The application will close.

StackTrace:

at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoExecute(Func`1 execute)

at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoRethrowWithCatchException(Exception exception, Boolean designMode)

at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoHandleThreadException(Exception exception, Boolean designMode)

at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.WinFormsDispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs eventArgs)

at Microsoft.Dynamics.Framework.UI.WinForms.WinFormsDispatcher.HandleDispatcherException(Object sender, Exception e)

at Microsoft.Dynamics.Framework.UI.WinForms.WinFormsDispatcher.OnThreadException(Object sender, ThreadExceptionEventArgs eventArgs)

at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)

at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)

at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

NAS Service…

NAS Service

still getting the same error

Hi ,

Is this all in your application event log ?

g.

in the windows application event log, yes.

Please confirm :

  • You also receive this issue if you are working on the same machine as the nav server
  • No eventlog info on the NAV Service side or provide
  • No new Clent Addins, Codes been deployed recently
  • No errors on the SQL side , backup/restore runs ok

gabor