Jump to content

Unable to Migrate to new server


stelle007

Recommended Posts

stelle007

Hi.

 

I'm trying to migrate to new Hardware. But I'm getting error When trying to import Userdata into the New DB: 

Result: table NewDB.userdatas has 12 columns but 14 values were supplied

At line 1:

REPLACE INTO NewDB.userdatas SELECT * FROM userdatas

 

I have followed this guide: https://github.com/MediaBrowser/Wiki/wiki/Backup

 

I can't install Backup Addon, as I get the following error when trying to install Any addon. The SSL connection could not be established, see inner exception. This do not happen when I do this from a test install, It's specifik to this server Windows Server 2016.

 

It should be noted that I'm moving from Install to portable version.

 

Please assist.

 

 

 

Link to comment
Share on other sites

videopalace

For the SSL connection, do you connect via a web browser on an external PC and is IIS set on the server?

Link to comment
Share on other sites

stelle007

For the SSL connection, do you connect via a web browser on an external PC and is IIS set on the server?

Hi.

Thank you for getting back.

Ther's no IIS installed on this server, That issue is the same if I try to connect with web browser locally, remote or use any app.

 

But I would like to get the DB import issue solved instead of getting in to the ssl issue, it was more an FYI.

Link to comment
Share on other sites

Happy2Play

@@Luke are the old databases even compatible with the new databases when is come to trying to migrate this data? 

 

If the 12 columns are compatible then I guess you would do this.

Replace INTO NewDB.UserDatas (userID, rating, played, playCount, isFavorite, playbackPositionTicks, AudioStreamIndex, SubtitleStreamIndex, LastPlayedDateInt, UserDataKeyId, RatingLastModified, PlaystateLastModified)
    SELECT
        userID, rating, played, playCount, isFavorite, playbackPositionTicks, AudioStreamIndex, SubtitleStreamIndex, LastPlayedDateInt, UserDataKeyId, RatingLastModified, PlaystateLastModified
    FROM 
        UserDatas
Link to comment
Share on other sites

 

@@Luke are the old databases even compatible with the new databases when is come to trying to migrate this data? 

 

If the 12 columns are compatible then I guess you would do this.

Replace INTO NewDB.UserDatas (userID, rating, played, playCount, isFavorite, playbackPositionTicks, AudioStreamIndex, SubtitleStreamIndex, LastPlayedDateInt, UserDataKeyId, RatingLastModified, PlaystateLastModified)
    SELECT
        userID, rating, played, playCount, isFavorite, playbackPositionTicks, AudioStreamIndex, SubtitleStreamIndex, LastPlayedDateInt, UserDataKeyId, RatingLastModified, PlaystateLastModified
    FROM 
        UserDatas

 

Not exactly, and that makes the process much more complex now. It will probably be easier to figure out getting the plugin installed.

Link to comment
Share on other sites

stelle007

Can you attach the server log from attempting to install the plugin? Thanks.

 

Hi.

 

Thanks for getting back so fast.

 

Here are logs from when I try to install log:

 

2019-09-05 22:33:14.657 Error HttpClient: Error getting response from https://embydata.com/admin/service/packageFiles/MBBackup.dll_1.4.1.exe
*** Error Report ***
Version: 4.2.1.0
Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 8
Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
   at System.Net.FixedSizeReader.ReadPacketAsync(Stream transport, AsyncProtocolRequest request)
   at System.Net.Security.SslState.ThrowIfExceptional()
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
   at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__47_1(IAsyncResult iar)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.GetTempFileResponse(HttpRequestOptions options)
Source: System.Net.Http
TargetSite: Void MoveNext()
InnerException: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Source: System.Net.Sockets
TargetSite: Void ThrowException(System.Net.Sockets.SocketError)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
   at System.Net.FixedSizeReader.ReadPacketAsync(Stream transport, AsyncProtocolRequest request)
   at System.Net.Security.SslState.ThrowIfExceptional()
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
   at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__47_1(IAsyncResult iar)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
InnerException: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Source: 
TargetSite: 
 
2019-09-05 22:33:14.672 Error InstallationManager: Package installation failed
*** Error Report ***
Version: 4.2.1.0
Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 8
Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
   at System.Net.FixedSizeReader.ReadPacketAsync(Stream transport, AsyncProtocolRequest request)
   at System.Net.Security.SslState.ThrowIfExceptional()
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
   at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__47_1(IAsyncResult iar)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.GetTempFileResponse(HttpRequestOptions options)
   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.GetTempFile(HttpRequestOptions options)
   at Emby.Server.Implementations.Updates.InstallationManager.PerformPackageInstallation(IProgress`1 progress, String target, PackageVersionInfo package, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Updates.InstallationManager.InstallPackageInternal(PackageVersionInfo package, Boolean isPlugin, IProgress`1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Updates.InstallationManager.InstallPackage(PackageVersionInfo package, Boolean isPlugin, IProgress`1 progress, CancellationToken cancellationToken)
Source: System.Net.Http
TargetSite: Void MoveNext()
InnerException: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Source: System.Net.Sockets
TargetSite: Void ThrowException(System.Net.Sockets.SocketError)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
   at System.Net.FixedSizeReader.ReadPacketAsync(Stream transport, AsyncProtocolRequest request)
   at System.Net.Security.SslState.ThrowIfExceptional()
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
   at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__47_1(IAsyncResult iar)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
InnerException: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Source: 
TargetSite: 
Link to comment
Share on other sites

stelle007

I could also note that I earlier tried to update to newest version. This didn't work when running as a service, then stopping the service and installing from the setup.exe file. But this worked when not running as windows service, and updating from within the app.

Link to comment
Share on other sites

 

 

This didn't work when running as a service, then stopping the service and installing from the setup.exe file.

Something was probably left running and holding a lock on the server's system folder.

Link to comment
Share on other sites

stelle007

Here are the logs after restart, then I tried to install addon, and restart again.

 

 

 

 

 

Edited by stelle007
Link to comment
Share on other sites

stelle007

I think I got the ssl issue resolved now. It was an issue with the chiper.

I can now install the backup plugin, so I'll try with that.

Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...