Jump to content

emby broken after upgrade to 4.7.0.9


kellerstern

Recommended Posts

kellerstern

Hi,

I have been running 4.7.0.4 on FreeBSD 12.2 (TrueNAS Core jail, not plugin) and I thought it might be time to upgrade to 4.7.0.9.
I'm using this method: https://emby.media/freebsd-server.html

After upgrading playback of video files din't work any longer.

This is what the log shows me:

2021-09-01 21:59:42.846 Error Server: Error processing request
        *** Error Report ***
        Version: 4.7.0.9
        Command line: /usr/local/lib/emby-server/system/EmbyServer.exe -os freebsd -ffdetect /usr/local/lib/emby-server/bin/ffdetect -ffmpeg /usr/local/lib/emby-server/bin/ffmpeg -ffprobe /u
sr/local/lib/emby-server/bin/ffprobe -programdata /var/db/emby-server -updatepackage emby-server-freebsd12_{version}_amd64.pkg
        Operating system: Unix 12.2.9.0  
        Framework: Mono: 6.8.0.123 (tarball Sun Aug 22 18:21:52 UTC 2021)
        OS/Process: X64/X64
        Runtime: usr/local/lib/mono/4.5/mscorlib.dll
        Processor count: 16
        Data path: /var/db/emby-server
        Application path: /usr/local/lib/emby-server/system
        System.Exception: System.Exception: No video encoder found for 'h264'
         
         
        >>>>>>  FindVideoEncoder - Media: h264, UseHardwareCodecs: True, Mode: Automatic
         
          at Emby.Server.MediaEncoding.Encoder.TranscodingCommandBuilder.FindVideoEncoder (Emby.Server.MediaEncoding.Encoder.EncodingJobInfo state, MediaBrowser.Controller.MediaEncoding.Code
cParameterContext parameterContext) [0x00183] in <19c50093f56a4171b8f7c1e7f5f74eed>:0  
          at Emby.Server.MediaEncoding.Encoder.TranscodingCommandBuilder.HlsGetCommandLineArguments (System.String outputPath, Emby.Server.MediaEncoding.Api.StreamState state, System.Int32 s
tartNumber, System.Boolean createSubtitleParameters, System.Boolean isForTv, System.String segmentFileExtension) [0x00059] in <19c50093f56a4171b8f7c1e7f5f74eed>:0  
          at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetCommandLineArguments (System.String outputPath, Emby.Server.MediaEncoding.Api.StreamState state) [0x0001b] in <19c50093f56a4171b8f7c1e7f5f74eed>:0  
          at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg (Emby.Server.MediaEncoding.Api.StreamState state, System.String outputPath, System.Threading.CancellationToken cancellationToken, System.Boolean acquireResources) [0x00331] in <19c50093f56a4171b8f7c1e7f5f74eed>:0  
          at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetDynamicSegment (Emby.Server.MediaEncoding.Api.StreamRequest request, System.String playlistId, System.String segmentId, System.Int32 subtitleStreamIndex) [0x007b4] in <19c50093f56a4171b8f7c1e7f5f74eed>:0  
          at Emby.Server.Implementations.Services.ServiceController.GetTaskResult (System.Threading.Tasks.Task task) [0x00081] in <2c38cc7b38c6447cb8572af0a91833c6>:0  
          at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync (Emby.Server.Implementations.HttpServer.HttpListenerHost appHost, MediaBrowser.Model.Services.IRequest httpReq, MediaBrowser.Model.Services.IResponse httpRes, Emby.Server.Implementations.Services.RestPath restPath, System.String responseContentType, System.Threading.CancellationToken cancellationToken) [0x001da] in <2c38cc7b38c6447cb8572af0a91833c6>:0  
          at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler (MediaBrowser.Model.Services.IRequest httpReq, System.ReadOnlyMemory`1[T] urlString, System.ReadOnlyMemory`1[T] localPath, System.Threading.CancellationToken cancellationToken) [0x00b46] in <2c38cc7b38c6447cb8572af0a91833c6>:0  
        Source: mscorlib
        TargetSite: Void Throw()

This is what hardware_detection.log shows me:

{"ApplicationVersion":"4.7.0.9","VersionType":"Beta","ReleaseCode":"2e789041684248ccb4cc5a95e0eb7c80","Environment":{"OperatingSystem":"BSD","OperatingSystemName":"Unix","OperatingSystemVersion":"Unix 12.2.9.0 ","FrameworkVersion":"Mono: 6.8.0.123 (tarball Sun Aug 22 18:21:52 UTC 2021)","OsArchitecture":"X64","ProcessArchitecture":"X64","PathSeparator":":","IsWindowsService":false},"VideoDecoders":{},"VideoEncoders":{},"EncodingOptions":{"EncodingThreadCount":4,"ExtractionThreadCount":1,"TranscodingTempPath":"","DownMixAudioBoost":2,"EnableThrottling":true,"ThrottleBufferSize":120,"ThrottleHysteresis":8,"ThrottlingMethod":"BySegmentRequest","H264Crf":23,"H264Preset":"","EnableHardwareEncoding":true,"EnableSubtitleExtraction":true,"CodecConfigurations":[],"HardwareAccelerationMode":1,"HardwareAccelerationType":"","EnableHardwareToneMapping":false,"EnableSoftwareToneMapping":false},"DetectionOutputs":{},"FfmpegCapabilities":{"FullVersionInfo":"\n","IsEmbyCustom":false,"SupportsSkipInterval":false,"SupportsSkipList":false,"SupportsTempSegmentWriting":false,"SupportsLogTimeStamps":false,"SupportsWebVttReferenceStream":false,"SupportsFilterGraphReport":false,"SupportsSegmentMinFrame":false,"VideoDecoders":{},"AudioDecoders":{},"SubtitleDecoders":{},"VideoEncoders":{},"AudioEncoders":{},"SubtitleEncoders":{},"VideoFilters":{},"AudioFilters":{},"InputProtocols":{},"OutputProtocols":{},"HardwareAccelerations":{},"SupportsThrottling":false,"SupportsFillWallClockDts":false,"SupportsDiscardCorruptPts":false}}

Downgrading to 4.7.0.4 doesn't seem possible as I cannot find the corresponding package on github.

I downgraded to 4.6 stable. When I do that the complete system is messed up as I can no longer reach the emby server Admin panel. Videos play under 4.6 though.
When I go to 4.7.0.9 again I'm back with admin panel but still no videos playing.

I set the pkg config from quaterly to latest but it  doesn't fix anything.

What can I do to solve this?

Edited by kellerstern
Link to comment
Share on other sites

david.torcivia

I upgraded to 4.7.0.9 and playback and web/admin panel work properly. With that said, immediately after install I got the "incompatible streams" error where playback could not be completed, but rebooting TrueNAS fixed that problem. I think this is normally an issue with ffmpeg hanging after upgrades and full system reboots tend to fix it while jail reboots often do not for whatever reason.

However, I did run into a bug with Mono 6.8.0.123 (latest build which is necessary for 4.7.0.9). Mono does not by default have the proper SSL certs and requires you to run

cert-sync /usr/local/share/certs/ca-root-nss.crt

(source). This command runs and finds the necessary files but cannot complete because of a System IO error that claims the file system is read-only (which as far as I can tell is not true). I've tried a handful of solutions to no avail. The result is that all the connections Emby attempts to make (metadata pulls for images, data, subtitles, etc) fail when the SSL handshake cannot be completed.

 

Log example below, though I know the issue is almost certainly due to the inability to run `cert-sync` for mono:

*** Error Report ***
	Version: 4.7.0.9
	Command line: /usr/local/lib/emby-server/system/EmbyServer.exe -os freebsd -ffmpeg /usr/local/bin/ffmpeg -ffprobe /usr/local/bin/ffprobe -programdata /var/db/emby-server -updatepackage emby-server-freebsd_{version}_amd64.txz
	Operating system: Unix 12.2.9.0 
	Framework: Mono: 6.8.0.123 (tarball Sun Aug 22 18:21:52 UTC 2021)
	OS/Process: X64/X64
	Runtime: usr/local/lib/mono/4.5/mscorlib.dll
	Processor count: 24
	Data path: /var/db/emby-server
	Application path: /usr/local/lib/emby-server/system
	System.Net.WebException: System.Net.WebException: Error: TrustFailure (Authentication failed, see inner exception.) ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
	  at /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/external/boringssl/ssl/handshake_client.c:1132
	  at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00048] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status, System.Boolean renegotiate) [0x000da] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus,bool)
	  at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00006] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x000fc] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	   --- End of inner exception stack trace ---
	  at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at Mono.Net.Security.MonoTlsStream.CreateStream (System.Net.WebConnectionTunnel tunnel, System.Threading.CancellationToken cancellationToken) [0x0016a] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at System.Net.WebConnection.CreateStream (System.Net.WebOperation operation, System.Boolean reused, System.Threading.CancellationToken cancellationToken) [0x001ba] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	   --- End of inner exception stack trace ---
	  at System.Net.WebConnection.CreateStream (System.Net.WebOperation operation, System.Boolean reused, System.Threading.CancellationToken cancellationToken) [0x0021a] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at System.Net.WebConnection.InitConnection (System.Net.WebOperation operation, System.Threading.CancellationToken cancellationToken) [0x00141] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at System.Net.WebOperation.Run () [0x0009a] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at System.Net.WebCompletionSource`1[T].WaitForCompletion () [0x00094] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00020] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <0e6cb1433c7b46f598f86593dd03f528>:0 
	Source: System
	TargetSite: System.Net.WebResponse EndGetResponse(System.IAsyncResult)
	InnerException: System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
	Source: mscorlib
	TargetSite: Void Throw()
	  at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at Mono.Net.Security.MonoTlsStream.CreateStream (System.Net.WebConnectionTunnel tunnel, System.Threading.CancellationToken cancellationToken) [0x0016a] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at System.Net.WebConnection.CreateStream (System.Net.WebOperation operation, System.Boolean reused, System.Threading.CancellationToken cancellationToken) [0x001ba] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	InnerException: Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
	  at /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/external/boringssl/ssl/handshake_client.c:1132
	Source: System
	TargetSite: Boolean ProcessHandshake()
	  at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00048] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status, System.Boolean renegotiate) [0x000da] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus,bool)
	  at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00006] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x000fc] in <2deb8ccd8f0546038e28d46e7bcc1998>:0 
	

 

Edited by david.torcivia
typo fix
Link to comment
Share on other sites

kellerstern

A TrueNAS reboot does not fix my problem.

The cert-sync command runs without error. I ran it within the jail, not the host.

I believe you're facing a different problem.

 

Edit:

Library update also does not work. I thought it might be a permissions problem but the emby user is member of the group the files are configured with while the files have rwx set on the group. I don't get it...

Edited by kellerstern
comment
Link to comment
Share on other sites

kellerstern

I deployed a jail from scratch with nothing but movies Library.
Cannot import anything into the library. no error message visible, even in debug mode.

2021-09-03 08:41:42.525 Info Server: http/1.1 POST http://[2001:1234:4321:7300:8b:c9ff:fea4:ca36]:8096/emby/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default&ReplaceAllImages=false&ReplaceAllMetadata=false&X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox&X-Emby-Device-Id=b36d250f-7e84-4846-95fb-34047160c44c&X-Emby-Client-Version=4.6.4.0. UserAgent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0
2021-09-03 08:41:42.528 Debug SqliteItemRepository: GetInternalId from f137a2dd-21bb-c1b9-9aa5-c0f6bf02a805
2021-09-03 08:41:42.530 Info Server: http/1.1 Response 204 to 2a00:1234:4321:11::2. Time: 5ms. http://[2001:1234:4321:7300:8b:c9ff:fea4:ca36]:8096/emby/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default&ReplaceAllImages=false&ReplaceAllMetadata=false&X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox&X-Emby-Device-Id=b36d250f-7e84-4846-95fb-34047160c44c&X-Emby-Client-Version=4.6.4.0
2021-09-03 08:41:42.590 Debug XmlSerializer: Deserializing file /var/db/emby-server/root/default/Movies/options.xml
2021-09-03 08:41:42.595 Debug XmlSerializer: Deserializing file /var/db/emby-server/root/default/Movies/options.xml
2021-09-03 08:41:42.617 Debug App: CollectionFolderImageProvider reports change to 4 - /var/db/emby-server/root/default/Movies
2021-09-03 08:41:42.620 Debug App: Running CollectionFolderImageProvider for /var/db/emby-server/root/default/Movies

 

Link to comment
Share on other sites

The new build does not fix the issue. Using the ffmpeg from the ports tree by editing the rc file makes most playback work, some browser/media combinations still fail to play. Library metadata images and thumbnails fail to generate using this configuration.

The actual error listed is as follows:

Can previous builds be left available for download for a short time, so that one can go back to a working version in the mean time? I've been stuck where the install command does not cache the pkg download, so cannot downgrade unless you go to the stable version, but unsure if that will break the library (eg. database design changes).

FreeBSD 12.2-STABLE r370355

2021-09-10 13:53:11.886 Info FfmpegManager: ProcessRun 'ffmpeg -hide_banner -version' Execute: /usr/local/lib/emby-server/bin/ffmpeg -hide_banner -version

2021-09-10 13:53:11.927 Info FfmpegManager: ProcessRun 'ffmpeg -hide_banner -version' Process exited with code 1

2021-09-10 13:53:11.929 Error FfmpegManager: ProcessRun 'ffmpeg -hide_banner -version' Output:

2021-09-10 13:53:11.929 Error FfmpegManager: ProcessRun 'ffmpeg -hide_banner -version' Error Output:

ld-elf.so.1: /usr/local/lib/emby-server/lib/libavdevice.so.58: version LIBAVDEVICE_58 required by /usr/local/lib/emby-server/bin/ffmpeg not defined

2021-09-10 13:53:11.933 Info FfmpegManager: ProcessRun 'ffmpeg -hide_banner -decoders' Execute: /usr/local/lib/emby-server/bin/ffmpeg -hide_banner -decoders

2021-09-10 13:53:11.954 Info FfmpegManager: ProcessRun 'ffmpeg -hide_banner -decoders' Process exited with code 1

2021-09-10 13:53:11.954 Error FfmpegManager: ProcessRun 'ffmpeg -hide_banner -decoders' Output:

2021-09-10 13:53:11.954 Error FfmpegManager: ProcessRun 'ffmpeg -hide_banner -decoders' Error Output:

ld-elf.so.1: /usr/local/lib/emby-server/lib/libavdevice.so.58: version LIBAVDEVICE_58 required by /usr/local/lib/emby-server/bin/ffmpeg not defined

Edited by redwards
Add OS version
Link to comment
Share on other sites

alucryd

@redwards Could you try installing the latest beta again? https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.0.10/emby-server-freebsd12_4.7.0.10_amd64.pkg

If you get SSL issues, please try a simple curl on https://emby.media/community/index.php?/blog/rss/1-media-browser-developers-blog from the jail and post the output here. Thanks!

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...