FirebirdSQL - Unable to connect.

Issue #102 new
Steve Beaudoin
created an issue

RC 4.0 RC2 installed (copy) on a Windows Storage Server 2016 drive. Shortcut to the app in a parent folder. We will call this machine "Server".

Remote desktop session opened on server with an admin account. Execute RC with the shortcut. The log indicate a database connection failure. Same thing if I execute as admin.

Works ok if I don't use the shortcut and NOT with the "run as admin" option.

<log4j:event logger="Romcenter" level="ERROR" timestamp="1529625778953" thread="5"><log4j:message>RomCenter.DataAccess.Firebird.EF5.Ef/.ctor : The underlying provider failed on Open.</log4j:message><log4j:throwable>System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---&gt; FirebirdSql.Data.FirebirdClient.FbException: Unable to complete network request to host ".".
Failed to establish a connection. ---&gt; FirebirdSql.Data.Common.IscException: Unable to complete network request to host ".".
Failed to establish a connection.
   à FirebirdSql.Data.Client.Native.FesDatabase.ProcessStatusVector(IntPtr[] statusVector)
   à FirebirdSql.Data.Client.Native.FesDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database, Byte[] cryptKey)
   à FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
   --- Fin de la trace de la pile d'exception interne ---
   à FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
   à FirebirdSql.Data.FirebirdClient.FbConnection.Open()
   à System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.&lt;Open&gt;b__36(DbConnection t, DbConnectionInterceptionContext c)
   à System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   à System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
   à System.Data.Entity.Core.EntityClient.EntityConnection.&lt;Open&gt;b__2()
   à System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation)
   à System.Data.Entity.Core.EntityClient.EntityConnection.Open()
   --- Fin de la trace de la pile d'exception interne ---
   à System.Data.Entity.Core.EntityClient.EntityConnection.Open()
   à System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
   à System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   à System.Data.Entity.Core.Objects.ObjectQuery`1.&lt;&gt;c__DisplayClass3.&lt;GetResults&gt;b__1()
   à System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
   à System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   à System.Data.Entity.Core.Objects.ObjectQuery`1.&lt;System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator&gt;b__0()
   à System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
   à System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.&lt;GetElementFunction&gt;b__1[TResult](IEnumerable`1 sequence)
   à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
   à System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
   à System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   à RomCenter.DataAccess.Firebird.EF5.Ef..ctor(String fileName, IProgressTracking progressPack, IPauseAndCancellationToken pauseAndCancellationToken, Boolean validatedb) dans C:\Projects\Romcenter\DataAccess\Firebird\EF5\EF.cs:ligne 107</log4j:throwable><log4j:NDC /><log4j:throwable><![CDATA[System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> FirebirdSql.Data.FirebirdClient.FbException: Unable to complete network request to host ".".
Failed to establish a connection. ---> FirebirdSql.Data.Common.IscException: Unable to complete network request to host ".".
Failed to establish a connection.
   à FirebirdSql.Data.Client.Native.FesDatabase.ProcessStatusVector(IntPtr[] statusVector)
   à FirebirdSql.Data.Client.Native.FesDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database, Byte[] cryptKey)
   à FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
   --- Fin de la trace de la pile d'exception interne ---
   à FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
   à FirebirdSql.Data.FirebirdClient.FbConnection.Open()
   à System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)
   à System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   à System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
   à System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()
   à System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation)
   à System.Data.Entity.Core.EntityClient.EntityConnection.Open()
   --- Fin de la trace de la pile d'exception interne ---
   à System.Data.Entity.Core.EntityClient.EntityConnection.Open()
   à System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
   à System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   à System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass3.<GetResults>b__1()
   à System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
   à System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   à System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
   à System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
   à System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence)
   à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
   à System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
   à System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   à RomCenter.DataAccess.Firebird.EF5.Ef..ctor(String fileName, IProgressTracking progressPack, IPauseAndCancellationToken pauseAndCancellationToken, Boolean validatedb) dans C:\Projects\Romcenter\DataAccess\Firebird\EF5\EF.cs:ligne 107]]></log4j:throwable><log4j:locationInfo class="RomCenter.Global.BaseLog" method="Void Error(System.String, System.Exception)" file="C:\Projects\Romcenter\Global\RcLog.cs" line="230" /><nlog:eventSequenceNumber>21</nlog:eventSequenceNumber><nlog:locationInfo assembly="RomCenter.Global, Version=4.0.0.40018, Culture=neutral, PublicKeyToken=null" /><nlog:properties /><log4j:properties><log4j:data name="log4japp" value="true" /><log4j:data name="log4jmachinename" value="SRVR-PLEX" /></log4j:properties></log4j:event>

Comments (10)

  1. Steve Beaudoin reporter

    It fail later on. If I go to options and enter the mame executable path and click on "get data from...", it crash with this :

    Failed to establish a connection. ---&gt; FirebirdSql.Data.Common.IscException: Unable to complete network request to host ".".
    Failed to establish a connection.
       à FirebirdSql.Data.Client.Native.FesDatabase.ProcessStatusVector(IntPtr[] statusVector)
       à FirebirdSql.Data.Client.Native.FesDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database, Byte[] cryptKey)
       à FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
       --- Fin de la trace de la pile d'exception interne ---
       à FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
       à FirebirdSql.Data.FirebirdClient.FbConnection.Open()
       à System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.&lt;Open&gt;b__36(DbConnection t, DbConnectionInterceptionContext c)
       à System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
       à System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
       à System.Data.Entity.Core.EntityClient.EntityConnection.&lt;Open&gt;b__2()
       à System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation)
       à System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       --- Fin de la trace de la pile d'exception interne ---
       à System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       à System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
       à System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       à System.Data.Entity.Core.Objects.ObjectQuery`1.&lt;&gt;c__DisplayClass3.&lt;GetResults&gt;b__1()
       à System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
       à System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       à System.Data.Entity.Core.Objects.ObjectQuery`1.&lt;System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator&gt;b__0()
       à System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
       à System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
       à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.&lt;GetElementFunction&gt;b__1[TResult](IEnumerable`1 sequence)
       à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
       à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
       à System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
       à System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
       à RomCenter.DataAccess.Firebird.EF5.Ef..ctor(String fileName, IProgressTracking progressPack, IPauseAndCancellationToken pauseAndCancellationToken, Boolean validatedb) dans C:\Projects\Romcenter\DataAccess\Firebird\EF5\EF.cs:ligne 107</log4j:throwable><log4j:NDC /><log4j:throwable><![CDATA[System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> FirebirdSql.Data.FirebirdClient.FbException: Unable to complete network request to host ".".
    Failed to establish a connection. ---> FirebirdSql.Data.Common.IscException: Unable to complete network request to host ".".
    Failed to establish a connection.
       à FirebirdSql.Data.Client.Native.FesDatabase.ProcessStatusVector(IntPtr[] statusVector)
       à FirebirdSql.Data.Client.Native.FesDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database, Byte[] cryptKey)
       à FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
       --- Fin de la trace de la pile d'exception interne ---
       à FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
       à FirebirdSql.Data.FirebirdClient.FbConnection.Open()
       à System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)
       à System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
       à System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
       à System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()
       à System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation)
       à System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       --- Fin de la trace de la pile d'exception interne ---
       à System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       à System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
       à System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       à System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass3.<GetResults>b__1()
       à System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
       à System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       à System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
       à System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
       à System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
       à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence)
       à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
       à System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
       à System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
       à System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
       à RomCenter.DataAccess.Firebird.EF5.Ef..ctor(String fileName, IProgressTracking progressPack, IPauseAndCancellationToken pauseAndCancellationToken, Boolean validatedb) dans C:\Projects\Romcenter\DataAccess\Firebird\EF5\EF.cs:ligne 107]]></log4j:throwable><log4j:locationInfo class="RomCenter.Global.BaseLog" method="Void Error(System.String, System.Exception)" file="C:\Projects\Romcenter\Global\RcLog.cs" line="230" /><nlog:eventSequenceNumber>21</nlog:eventSequenceNumber><nlog:locationInfo assembly="RomCenter.Global, Version=4.0.0.40018, Culture=neutral, PublicKeyToken=null" /><nlog:properties /><log4j:properties><log4j:data name="log4japp" value="true" /><log4j:data name="log4jmachinename" value="SRVR-PLEX" /></log4j:properties></log4j:event>
    

    and sometimes, I have this :

    <log4j:event logger="Romcenter" level="FATAL" timestamp="1529661715744" thread="1"><log4j:message>Value does not fall within the expected range.
       at MS.Internal.AppModel.ShellUtil.GetShellItemForPath(String path)
       at Microsoft.Win32.FileDialog.PrepareVistaDialog(IFileDialog dialog)
       at Microsoft.Win32.FileDialog.RunVistaDialog(IntPtr hwndOwner)
       at Microsoft.Win32.FileDialog.RunDialog(IntPtr hwndOwner)
       at Microsoft.Win32.CommonDialog.ShowDialog(Window owner)
       at RomCenterWpf.MainWindow.&lt;&gt;c__DisplayClass6_3.&lt;RegisterMvvmMessages&gt;b__14() in C:\Projects\Romcenter\RomCenterWpf\MainWindow.xaml.cs:line 246
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</log4j:message><log4j:throwable>System.ArgumentException: Value does not fall within the expected range.
       at MS.Internal.AppModel.ShellUtil.GetShellItemForPath(String path)
       at Microsoft.Win32.FileDialog.PrepareVistaDialog(IFileDialog dialog)
       at Microsoft.Win32.FileDialog.RunVistaDialog(IntPtr hwndOwner)
       at Microsoft.Win32.FileDialog.RunDialog(IntPtr hwndOwner)
       at Microsoft.Win32.CommonDialog.ShowDialog(Window owner)
       at RomCenterWpf.MainWindow.&lt;&gt;c__DisplayClass6_3.&lt;RegisterMvvmMessages&gt;b__14() in C:\Projects\Romcenter\RomCenterWpf\MainWindow.xaml.cs:line 246
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</log4j:throwable><log4j:NDC /><log4j:throwable><![CDATA[System.ArgumentException: Value does not fall within the expected range.
       at MS.Internal.AppModel.ShellUtil.GetShellItemForPath(String path)
       at Microsoft.Win32.FileDialog.PrepareVistaDialog(IFileDialog dialog)
       at Microsoft.Win32.FileDialog.RunVistaDialog(IntPtr hwndOwner)
       at Microsoft.Win32.FileDialog.RunDialog(IntPtr hwndOwner)
       at Microsoft.Win32.CommonDialog.ShowDialog(Window owner)
       at RomCenterWpf.MainWindow.<>c__DisplayClass6_3.<RegisterMvvmMessages>b__14() in C:\Projects\Romcenter\RomCenterWpf\MainWindow.xaml.cs:line 246
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)]]></log4j:throwable><log4j:locationInfo class="RomCenter.Global.BaseLog" method="Void Fatal(System.String, System.Exception)" file="C:\Projects\Romcenter\Global\RcLog.cs" line="220" /><nlog:eventSequenceNumber>28</nlog:eventSequenceNumber><nlog:locationInfo assembly="RomCenter.Global, Version=4.0.0.40018, Culture=neutral, PublicKeyToken=null" /><nlog:properties /><log4j:properties><log4j:data name="log4japp" value="true" /><log4j:data name="log4jmachinename" value="SRVR-PLEX" /></log4j:properties></log4j:event>
    
  2. Gino

    Just trying to understand. You basically installed RC on a Windows Storage Server 2016, and you are trying to launch RC after logging into the server through an RDP session as an administrator. If yes, did try launching it by physically logging on to server first to see if that works?

  3. Steve Beaudoin reporter

    You understood correctly. You seems to think the RDP session influence the execution of the program? I don't think so. I installed and ran RC the same way before, but in "program filles" folder and it was working correctly through RDP. At this point, it can be two things : (a) The folder location have an impact. (b) The RC configuration files are corrupted.

    I am downloading a fresh version of RC to replace the one I was trying to use.

  4. Steve Beaudoin reporter

    Installed a fresh version, cleared programData\romcenter folder. I have the exception "Value does not fall within the expected range". I think this is possibly because RC is installed on the D drive of the server. Another copy in "C:\Program Files (x86)" work correctly in the same conditions.

  5. Gino

    I have not worked with RDP recently but RDP sessions do affect execution of apps. Which is the reason why MS had the option of putting the server in "Install Mode" in order to install apps that will be ran through an RDP connection. As far as I know RDP sessions are different from Remote Control Sessions like VNC for example. If that were not the case it would show as a local connection when you bring up task manager but it doesn't. Also reason why when you are using RDP, someone can still log in locally without affecting your session unlike when you are using something like VNC. Hence me asking you if you tried it by physically logging into the server locally or using a remote control app instead of RDP.

  6. Steve Beaudoin reporter

    Never experienced an RDP problem yet. I suppose I have been lucky. Still, it works ok when installed on the C drive on the same machine, even with RDP, so RDP is not responsible in this case.

  7. Gino

    In case your install drive or part of it is a removable one, there is a security policy in windows that prevents access to removable drives (CD-ROM, USB etc.) when logged in from an RDP session. You can turn it off through your local server policies. Maybe that would help.

  8. Eric Bole-Feysot repo owner

    I often tested romcenter on a RDP system with no problems, but I don't have a windows storage server... The 'Value does not fall within the expected range.' error is strange. I will check the source code to try to understand the problem.

  9. Log in to comment