Jump to content


Photo

Emby exits with System.NullReferenceException and Zero Byte Log Files

Server Mono DotNET Null Ref

  • Please log in to reply
27 replies to this topic

#1 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 01 May 2019 - 02:13 PM

I was running emby-server-deb_4.0.2.0_amd64.deb on Ubuntu 18.04.2.

I noticed that the server was down. I discovered over 37,000 log files on my machine. All of the embyserver logs were zero bytes in length. There were thousands of "unhandled" log files all of the same length. The ones I checked all had the same info in them.

I apt purged 4.0.2.0 and installed emby-server-deb_4.1.1.0_amd64.deb

I discovered a "System.NullReferenceException:" that was occuring which I think is coming from Mono.

Also, the embyserver log file are still zero bytes in length, but there are not 1000s of them being generated anymore. :)

Here is a link to detailed information of my investigation.

http://cdn.kolomona.com/emby/problem01

Any help to get myserver up and running would be greatly appreciated. Thanks



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134537 posts
  • Local time: 08:58 PM

Posted 01 May 2019 - 02:17 PM

Hi there, can you please attach the emby server log? Thanks !



#3 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 01 May 2019 - 02:29 PM

The emby server log is zero bytes in length



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134537 posts
  • Local time: 08:58 PM

Posted 01 May 2019 - 03:08 PM

How did you discover NullReferenceException?



#5 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 01 May 2019 - 03:21 PM

Please see http://cdn.kolomona....emby/problem01/

 

I put all the info I could gather there



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134537 posts
  • Local time: 08:58 PM

Posted 01 May 2019 - 03:35 PM

What is that domain?



#7 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 01 May 2019 - 03:39 PM

My name is Kolomona. It's my own personal domain.

 

cdn.kolomona.com is where I put assets that I share with others. (like files and images)

 

That way I don't accidentally delete them and break any links that may point to them.

 

It's my own persona; content delivery network :)



#8 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 02 May 2019 - 02:34 PM

Any suggestions on how I can fix my server?



#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134537 posts
  • Local time: 08:58 PM

Posted 02 May 2019 - 02:42 PM

What is your system locale set to?



#10 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 02 May 2019 - 03:25 PM

$ locale
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=


#11 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 02 May 2019 - 04:07 PM

$ sudo locale-gen en_US



$ sudo nano /etc/environment
LC_ALL="en_US.UTF-8"


$ sudo reboot

$ locale
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8



$ sudo service emby-server status
[sudo] password for hapa:
● emby-server.service - Emby Server is a personal media server with apps on just about every device.
   Loaded: loaded (/usr/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 2019-05-02 19:55:42 UTC; 4min 42s ago
  Process: 900 ExecStart=/opt/emby-server/bin/emby-server (code=exited, status=0/SUCCESS)
 Main PID: 900 (code=exited, status=0/SUCCESS)

May 02 19:55:42 KmCreations emby-server[900]:            at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
May 02 19:55:42 KmCreations emby-server[900]:            at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1 enumerable)
May 02 19:55:42 KmCreations emby-server[900]:            at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collec
May 02 19:55:42 KmCreations emby-server[900]:            at Emby.Server.Implementations.ScheduledTasks.TaskManager.AddTasks(IEnumerable`1 t
May 02 19:55:42 KmCreations emby-server[900]:            at Emby.Server.Implementations.ApplicationHost.RunStartupTasks()
May 02 19:55:42 KmCreations emby-server[900]:            at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken)
May 02 19:55:42 KmCreations emby-server[900]:         Source: System.Private.CoreLib
May 02 19:55:42 KmCreations emby-server[900]:         TargetSite: System.String NormalizeDatePattern(System.String)
May 02 19:55:42 KmCreations emby-server[900]:         
May 02 19:55:42 KmCreations emby-server[900]: Info Main: Shutdown complete


$ sudo /opt/emby-server/system/EmbyServer

Worked and I was able to see the welcome screen at http://MyHost:8096
 

$ sudo service emby-server start

$ sudo service emby-server status

Gives same message as above

So I'm now unable to start the service and the logs are still zero bytes



#12 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134537 posts
  • Local time: 08:58 PM

Posted 02 May 2019 - 10:44 PM

Do you have ICU installed? What version? I'm pretty sure this is the problem:

https://unicode-org....rowse/ICU-20558



#13 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 02 May 2019 - 10:50 PM

It appears that I do. I will look into the link you provided.

 

BTW, changing the local seemed to fix the NullReference error.

 

I am currently trying to track down errors that keep the service from staying running.

$ sudo apt list --installed |grep -i "icu"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libicu60/bionic,now 60.2-3ubuntu3 amd64 [installed]
libicu64/bionic,now 64.1-0.1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]


#14 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134537 posts
  • Local time: 08:58 PM

Posted 02 May 2019 - 10:52 PM

I'll have to check with our package developer because i thought we had it embedded, in which case it won't matter what version you have installed. A couple people have reported this but we haven't been able to figure out the conditions in which it happens. Now that I've found that bug report, we might be able to look at rolling back or updating libicu.



#15 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 02 May 2019 - 11:07 PM

I was also getting a "File not found" error for /opt/emby-server/system/ffmpeg when running...
 

sudo /opt/emby-server/system/EmbyServer

So I created a link to ffmpeg
sudo ln -s /usr/bin/ffmpeg /opt/emby-server/system/
and
sudo ln -s /usr/bin/ffprobe /opt/emby-server/system/



Now when I run...

sudo /opt/emby-server/system/EmbyServer

I get no errors on the console and the :8096/web/index.html?start=wizard#!/wizardstart.html page comes up just fine.

Server logs are still zero bytes though (permissions issue??)
 

 

When I try to start the service I get the following...
 

$ sudo service emby-server start
$ sudo service emby-server status
● emby-server.service - Emby Server is a personal media server with apps on just about every device.
   Loaded: loaded (/usr/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-05-03 03:02:02 UTC; 1s ago
 Main PID: 3851 (EmbyServer)
    Tasks: 10 (limit: 2361)
   CGroup: /system.slice/emby-server.service
           └─3851 /opt/emby-server/system/EmbyServer -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -res

May 03 03:02:03 KmCreations emby-server[3851]: Info AuthenticationRepository: Default journal_mode for /var/lib/emby/data/authentication.db is wal
May 03 03:02:03 KmCreations emby-server[3851]: Info AuthenticationRepository: PRAGMA synchronous=1
May 03 03:02:03 KmCreations emby-server[3851]: Info ActivityRepository: Default journal_mode for /var/lib/emby/data/activitylog.db is wal
May 03 03:02:03 KmCreations emby-server[3851]: Info ActivityRepository: PRAGMA synchronous=1
May 03 03:02:03 KmCreations emby-server[3851]: Info SqliteDisplayPreferencesRepository: Default journal_mode for /var/lib/emby/data/displaypreferences.db is wal
May 03 03:02:03 KmCreations emby-server[3851]: Info SqliteDisplayPreferencesRepository: PRAGMA synchronous=1
May 03 03:02:03 KmCreations emby-server[3851]: Info HttpServer: Adding HttpListener prefix http://+:8096/
May 03 03:02:03 KmCreations emby-server[3851]: Info HttpServer: Adding HttpListener prefix https://+:8920/
May 03 03:02:04 KmCreations emby-server[3851]: Info SqliteItemRepository: Default journal_mode for /var/lib/emby/data/library.db is wal
May 03 03:02:04 KmCreations emby-server[3851]: Info SqliteItemRepository: PRAGMA synchronous=1


12 seconds later...
 

$ sudo service emby-server status
● emby-server.service - Emby Server is a personal media server with apps on just about every device.
   Loaded: loaded (/usr/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2019-05-03 03:02:05 UTC; 13s ago
  Process: 3851 ExecStart=/opt/emby-server/bin/emby-server (code=exited, status=0/SUCCESS)
 Main PID: 3851 (code=exited, status=0/SUCCESS)

May 03 03:02:05 KmCreations emby-server[3851]:            at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
May 03 03:02:05 KmCreations emby-server[3851]:            at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1 enumerable)
May 03 03:02:05 KmCreations emby-server[3851]:            at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
May 03 03:02:05 KmCreations emby-server[3851]:            at Emby.Server.Implementations.ScheduledTasks.TaskManager.AddTasks(IEnumerable`1 tasks)
May 03 03:02:05 KmCreations emby-server[3851]:            at Emby.Server.Implementations.ApplicationHost.RunStartupTasks()
May 03 03:02:05 KmCreations emby-server[3851]:            at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken)
May 03 03:02:05 KmCreations emby-server[3851]:         Source: System.Private.CoreLib
May 03 03:02:05 KmCreations emby-server[3851]:         TargetSite: System.String NormalizeDatePattern(System.String)
May 03 03:02:05 KmCreations emby-server[3851]:         
May 03 03:02:05 KmCreations emby-server[3851]: Info Main: Shutdown complete


#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134537 posts
  • Local time: 08:58 PM

Posted 02 May 2019 - 11:21 PM

Yes that's just the same error as above.



#17 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 02 May 2019 - 11:33 PM

I might be chasing at ghosts here but I tried to run the following in the terminal...

sudo /opt/emby-server/system/EmbyServer -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -res

Which I copied from the server status message above.

 

 

I've attached the results in a txt file.

 

There are a lot of errors like...

Error MediaEncoder: ProcessRun 'ffmpeg -hide_banner -version' Error Output:
    /opt/emby-server/bin/ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory

Should I track down and install these libraries or am I just going down a rabbit hole?
 

 

 

Attached Files



#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134537 posts
  • Local time: 08:58 PM

Posted 03 May 2019 - 12:37 AM

So the ICU problem is gone now?



#19 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 03 May 2019 - 12:43 AM

It appears so.

 

It went away when I changed the locale from C.UTF-8 (default from digitalocean) to en_US.UTF-8



#20 Kolomona OFFLINE  

Kolomona

    Member

  • Members
  • 17 posts
  • Local time: 05:58 PM

Posted 03 May 2019 - 02:00 AM

I was wrong System.NullReferenceException is still there.

 

I just pulled this from...

$ sudo journalctl -u emby-server.service -b
May 03 02:46:46 KmCreations emby-server[3316]:         System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
May 03 02:46:46 KmCreations emby-server[3316]:            at System.Globalization.CalendarData.NormalizeDatePattern(String input)

I attached the full journal entry

 

 

 

 

 

Attached Files







Also tagged with one or more of these keywords: Server, Mono, DotNET, Null Ref

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users