Jump to content

GetCertificatePath(Boolean generateCertificate...


Recommended Posts

StoneMonkeyMark
Posted

Hi,

Hopefully a short query,

Is this an expected error as self cert generation functionality not done yet, or is there something I have done wrong.

This is with "Report https as external address" option *off*.

I think this may be due to the server running on an old Windows 7 Pro machine with no service pack nor any IE updates. And the code to get GetCertificatePath() code etc is not expecting the older OS.

 

And an extra question, does it do a fresh cert each time the external IP changes or every reboot? I am on DynDNS and guess it has to be the former if that is to work, but I have only seen the bot.whatsmyip.com in the boot sequence so far.

 

Thanks for any advice.

MarkB

 

Docs:

In addition you can also supply your own custom SSL certificate. This is highly recommended for https usage.

"If omitted, the server will create a self-signed certificate."

 

Logs:

2015-07-20 22:14:33.1931 Info - Main: Emby
 Command line: C:\Users\XXXXX\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
 Operating system: Microsoft Windows NT 6.1.7600.0
 Processor count: 2
 64-Bit OS: False
 64-Bit Process: False
 Program data path: C:\Users\XXXXX\AppData\Roaming\Emby-Server
 Application Path: C:\Users\XXXXX\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
2015-07-20 22:14:33.8571 Info - App: Application version: 3.0.5667.6
2015-07-20 22:14:34.0571 Info - App: Application configuration:
 {"EnableUPnP":true,"PublicPort":8096,"PublicHttpsPort":8920,"HttpServerPortNumber":8096,"HttpsPortNumber":8920,"EnableHttps":false,"EnableUserSpecificUserViews":true,"EnableInternetProviders":false,"IsPortAuthorized":true,"SeasonZeroDisplayName":"Specials","SaveLocalMeta":false,"EnableLocalizedGuids":true,"EnableLibraryMetadataSubFolder":true,"PreferredMetadataLanguage":"en","MetadataCountryCode":"GB","SortReplaceCharacters":[".","+","%"],"SortRemoveCharacters":[",","&","-","{","}","'"],"SortRemoveWords":["the","a","an"],"MinResumePct":5,"MaxResumePct":90,"MinResumeDurationSeconds":300,"RealtimeLibraryMonitorDelay":40,"EnableDashboardResponseCaching":true,"EnableDashboardResourceMinification":true,"DashboardSourcePath":"","MergeMetadataAndImagesByName":true,"EnableStandaloneMetadata":true,"ImageSavingConvention":"Compatible","MetadataOptions":[{"ItemType":"Book","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280}],"DisabledMetadataSavers":[],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Movie","ImageOptions":[{"Type":"Backdrop","Limit":2,"MinWidth":1280},{"Type":"Art","Limit":0,"MinWidth":0},{"Type":"Disc","Limit":0,"MinWidth":0},{"Type":"Primary","Limit":1,"MinWidth":0},{"Type":"Banner","Limit":0,"MinWidth":0},{"Type":"Thumb","Limit":1,"MinWidth":0},{"Type":"Logo","Limit":1,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Series","ImageOptions":[{"Type":"Backdrop","Limit":2,"MinWidth":1280},{"Type":"Art","Limit":0,"MinWidth":0},{"Type":"Primary","Limit":1,"MinWidth":0},{"Type":"Banner","Limit":1,"MinWidth":0},{"Type":"Thumb","Limit":1,"MinWidth":0},{"Type":"Logo","Limit":1,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"MusicAlbum","ImageOptions":[{"Type":"Backdrop","Limit":0,"MinWidth":1280},{"Type":"Disc","Limit":0,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"MusicArtist","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280},{"Type":"Banner","Limit":0,"MinWidth":0},{"Type":"Art","Limit":0,"MinWidth":0},{"Type":"Logo","Limit":0,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Season","ImageOptions":[{"Type":"Backdrop","Limit":0,"MinWidth":1280}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Episode","ImageOptions":[{"Type":"Backdrop","Limit":3,"MinWidth":1280}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"MusicVideo","ImageOptions":[{"Type":"Backdrop","Limit":3,"MinWidth":1280}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Video","ImageOptions":[{"Type":"Backdrop","Limit":3,"MinWidth":1280}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]}],"EnableAutomaticRestart":false,"PathSubstitutions":[{"From":"D:\\TV","To":"\\\\XXXXX\\TV"},{"From":"D:\\Movies","To":"\\\\XXXXX\\Movies"},{"From":"D:\\KidsTV","To":"\\\\XXXXX\\KidsTV"},{"From":"D:\\KidsMovies","To":"\\\\XXXXX\\KidsMovies"},{"From":"D:\\TeenTV","To":"\\\\XXXXX\\TeenTV"},{"From":"D:\\TeenMovies","To":"\\\\XXXXX\\TeenMovies"}],"ServerName":"","UICulture":"en-GB","PeopleMetadataOptions":{"DownloadActorMetadata":true,"DownloadDirectorMetadata":true,"DownloadProducerMetadata":false,"DownloadWriterMetadata":false,"DownloadComposerMetadata":false,"DownloadOtherPeopleMetadata":false,"DownloadGuestStarMetadata":false},"FindInternetTrailers":true,"InsecureApps9":["Chromecast","iOS","Unknown app","iPad","iPhone","Windows Phone"],"SaveMetadataHidden":false,"ContentTypes":[],"EnableAudioArchiveFiles":false,"EnableVideoArchiveFiles":false,"RemoteClientBitrateLimit":0,"DenyIFrameEmbedding":true,"EnableLibraryMonitor":"Auto","SharingExpirationDays":30,"EnableDebugLevelLogging":true,"EnableAutoUpdate":true,"SystemUpdateLevel":"Release","LogFileRetentionDays":3,"RunAtStartup":true,"IsStartupWizardCompleted":true,"CachePath":"","EnableCustomPathSubFolders":true}
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Api, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.WebDashboard, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Model, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Common, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Controller, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Providers, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Common.Implementations, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Server.Implementations, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.MediaEncoding, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Dlna, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.LocalMetadata, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.XbmcMetadata, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.IsoMounter, Version=1.0.5344.20624, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.ServerApplication, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.1191 Info - App: Loading MediaBrowser.Server.Startup.Common, Version=3.0.5667.6, Culture=neutral, PublicKeyToken=null
2015-07-20 22:14:34.8202 Info - SqliteUserRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\users.db
2015-07-20 22:14:35.0072 Info - SqliteItemRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\chapters.db
2015-07-20 22:14:35.0242 Info - SqliteItemRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\mediainfo.db
2015-07-20 22:14:35.0662 Info - SqliteFileOrganizationRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\fileorganization.db
2015-07-20 22:14:35.1012 Info - AuthenticationRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\authentication.db
2015-07-20 22:14:35.1712 Info - SyncRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\sync14.db
2015-07-20 22:14:35.4402 Info - ImageMagick: ImageMagick version: ImageMagick 6.9.0-9 Q8 x86 2015-02-28 http://www.imagemagick.org
2015-07-20 22:14:35.5652 Info - ImageProcessor: ImageProcessor started with 4 max concurrent image processes
2015-07-20 22:14:35.7382 Info - App: FFMpeg: C:\Users\XXXXX\AppData\Roaming\Emby-Server\ffmpeg\20150331\ffmpeg.exe
2015-07-20 22:14:35.7382 Info - App: FFProbe: C:\Users\XXXXX\AppData\Roaming\Emby-Server\ffmpeg\20150331\ffprobe.exe
2015-07-20 22:14:35.7592 Info - SharingRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\shares.db
2015-07-20 22:14:35.8042 Info - ActivityRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\activitylog.db
2015-07-20 22:14:35.8442 Info - SqliteDisplayPreferencesRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\displaypreferences.db
2015-07-20 22:14:35.8652 Info - SqliteItemRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\library.db
2015-07-20 22:14:35.9212 Info - SqliteProviderInfoRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\refreshinfo.db
2015-07-20 22:14:35.9602 Info - SqliteUserDataRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\userdata_v2.db
2015-07-20 22:14:35.9902 Info - SqliteNotificationsRepository: Sqlite 3.8.6 opening C:\Users\XXXXX\AppData\Roaming\Emby-Server\data\notifications.db
2015-07-20 22:14:36.8063 Info - HttpServer: Calling ServiceStack AppHost.Init
2015-07-20 22:14:43.0556 Info - ServiceStackHost: Initializing Application took 7756.4436ms
2015-07-20 22:14:44.9467 Error - App: Error creating ssl cert
 *** Error Report ***
 Version: 3.0.5667.6
 Command line: C:\Users\XXXXX\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
 Operating system: Microsoft Windows NT 6.1.7600.0
 Processor count: 2
 64-Bit OS: False
 64-Bit Process: False
 Program data path: C:\Users\XXXXX\AppData\Roaming\Emby-Server
 Application Path: C:\Users\XXXXX\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
 Could not load file or assembly 'MediaBrowser.Model.XmlSerializers' or one of its dependencies. The system cannot find the file specified.
 System.IO.FileNotFoundException
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
    at MediaBrowser.ServerApplication.Networking.CertificateGenerator.CreateSelfSignCertificatePfx(String x500, DateTime startTime, DateTime endTime)
    at MediaBrowser.ServerApplication.Networking.CertificateGenerator.CreateSelfSignCertificatePfx(String fileName, String hostname, ILogger logger)
    at MediaBrowser.ServerApplication.Networking.NetworkManager.GenerateSelfSignedSslCertificate(String certificatePath, String hostname)
    at MediaBrowser.Server.Startup.Common.ApplicationHost.GetCertificatePath(Boolean generateCertificate)

StoneMonkeyMark
Posted

My server fails on the first of these and then succeeds on the second.

"http://bot.whatismyipaddress.com", "https://connect.mediabrowser.tv/service/ip"

But yet when called from IE both are OK in fact the second is very slow to respond.

What do other people see in their logs, success on both?

Success (on the second one) looks like this:

2015-07-20 10:58:24.6777 Info - App: HttpClientManager GET: https://connect.mediabrowser.tv/service/ip
 

Posted

it's based on the server's external address so anytime that changes the self-signed cert will change as well.

StoneMonkeyMark
Posted

Thanks Luke for politely tying together my random comments. I should have broken that second posting out to a proper issue. No good doing late night posting.

I see now in the code that a time is set up for 3 hourly checks.

_timer = new Timer(TimerCallback, null, TimeSpan.FromSeconds(5), TimeSpan.FromHours(3));

And that the cert will update based on this too.

OnConfigurationUpdated

if (!string.Equals(CertificatePath, GetCertificatePath(false), StringComparison.OrdinalIgnoreCase))

but that this will then require a server restart. I wonder if a soft replacement might be possible.

Anyway leaving that as is and all good...

 

Can we leave this thread open for seeing if others have an error on set cert creation and how to fix it?

Thanks

MarkB

Posted

Sure. and yes, a soft replacement is possible, that was just an easy starting point. the standalone SocketHttpListener project would have to be updated to support that.

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