Page 1 of 1

serviio.sh does exit without error message

PostPosted: Mon Nov 26, 2018 9:48 am
by sirbender
Hi,

I had 1.9 previously running on my old PC. Now I switched PCs and 1.9 wasn't starting up. I installed 1.10 and it didn't either. So I tried to find out more:

started serviio.sh from the terminal. The problem is it just exits without any error message.This is true for both 1.9 and 1.10

I installed several Java Versions (JDKs) and tried it. All the same results: serviio.sh does exit without any error messages.


Can I somehow make serviio.sh more verbose? Activate debugging?

Re: serviio.sh does exit without error message

PostPosted: Mon Nov 26, 2018 2:13 pm
by atc98092
Check the link in my sig to enable debug logging. But even the standard log should offer some info. Can you upload the current log so it can be examined?

Re: serviio.sh does exit without error message

PostPosted: Mon Nov 26, 2018 5:54 pm
by sirbender
atc98092 wrote:Check the link in my sig to enable debug logging. But even the standard log should offer some info. Can you upload the current log so it can be examined?


ffmpeg was missing :(

Seems like this happened to me before a long time ago. Deja vue ;)

Maybe you could print at least Exceptions to the console. Would have saved us both some trouble ;)

Re: serviio.sh does exit without error message

PostPosted: Mon Nov 26, 2018 6:01 pm
by sirbender
Invoking FFMPEG to check if it exists of path ffmpeg
2018-11-26 18:21:37,025 DEBUG [ProcessExecutor] Starting ffmpeg
2018-11-26 18:21:37,030 ERROR [ProcessExecutor] Fatal error in process starting: Cannot run program "ffmpeg": error=2, No such file or directory
java.io.IOException: Cannot run program "ffmpeg": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.serviio.external.ProcessExecutor.run(ProcessExecutor.java:136)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 1 more
2018-11-26 18:21:37,031 ERROR [MediaServer] An unexpected error occured. Ending the application. Message: FFMPEG not found. Serviio will not work properly.
java.lang.ExceptionInInitializerError
at org.serviio.MediaServer.main(MediaServer.java:146)
Caused by: java.lang.RuntimeException: FFMPEG not found. Serviio will not work properly.
at org.serviio.external.FFMPEGWrapper.loadFFmpegInfo(FFMPEGWrapper.java:137)
at org.serviio.external.FFMPEGWrapper.<clinit>(FFMPEGWrapper.java:110)
... 1 more

Re: serviio.sh does exit without error message

PostPosted: Mon Nov 26, 2018 9:15 pm
by atc98092
When Serviio installs FFMPEG, it is not added to the PATH statement, so Windows doesn't know where it is. That is why you get the error. In a standard Serviio Windows install, the install path is C:\Program Files\Serviio\lib. Since it's not stored in the Windows PATH statement, you have to type the complete path to the exe file.

If that log you attached is accurate, for some reason FFMPEG is missing from the lib folder. You can download the latest version (https://ffmpeg.zeranoe.com/builds/) and install it yourself. Just copy the ffmpeg.exe file into the Serviio/Lib folder. That should resolve your error. You can install either the 32 or 64 bit version. I personally always use the 64 bit.

EDIT: Maybe I misunderstood, and you aren't using Windows. I believe for Linux you have to install Java manually, but I don't know if it has to be in the Serviio Lib folder of if just installing an SDK is sufficient. I'd have to research some more to know more. And that download link above is only for the Windows version of FFMPEG.

If you are running Linux, yes you must install Java separately:

Linux users must install FFmpeg via their OS distribution package manager or build it from the sources on the Download page. The Wiki has some useful guides.

Re: serviio.sh does exit without error message

PostPosted: Wed Nov 28, 2018 12:57 am
by sirbender
Yes. I am on Linux.

Java was installed. FFMPEG was not. That was the problem. Is there any way you print some clear message to the console in case FFMPEG is missing?

As I said, I got zero feedback on the console...serviio.sh just exited without any output. Doesn't seem like the most sensible behavior to me.

Re: serviio.sh does exit without error message

PostPosted: Wed Nov 28, 2018 10:31 pm
by atc98092
sirbender wrote:Yes. I am on Linux.

Java was installed. FFMPEG was not. That was the problem. Is there any way you print some clear message to the console in case FFMPEG is missing?

As I said, I got zero feedback on the console...serviio.sh just exited without any output. Doesn't seem like the most sensible behavior to me.


I typed Java and I meant FFMPEG. Whoops, sorry!

The install instructions for Linux state that FFMPEG has to be installed separately, as I copied on the previous post. The Wiki article it mentioned is here: http://wiki.serviio.org/doku.php?id=build_ffmpeg_linux

But I don't think you actually have to build FFMPEG yourself. You should be able to download it from your package manager program. There are packages you can download directly from the ffmpeg site: https://ffmpeg.org/download.html

While it's not my call about adding some sort of console notification, I doubt it would help with this issue. If Serviio won't start, you can't open the console, so no way to see why it isn't running. That's what the logs are for. :D

Re: serviio.sh does exit without error message

PostPosted: Thu Nov 29, 2018 10:55 pm
by sirbender
atc98092 wrote:
sirbender wrote:While it's not my call about adding some sort of console notification, I doubt it would help with this issue. If Serviio won't start, you can't open the console, so no way to see why it isn't running. That's what the logs are for. :D


Sorry, what? On Linux you execute serviio.sh on the console - especially if it doesn't start up. That's the first thing you would do...execute it on the console to see why it doesn't start up. 99.9% of programs out there at least print some sort of Exit-Message or Error to the console. I cannot remember a single program on Linux to fail launching but not printing out anything.

Re: serviio.sh does exit without error message

PostPosted: Thu Nov 29, 2018 11:39 pm
by atc98092
One of us is confused, and it might be me. :oops: I don't use Linux very much, and my background in it is a little out of date. But I though the Serviio.sh shell file was what started the Serviio background process. If that process isn't running, there's no way to open the console because there's nothing to connect it to. There's no control of this background process within the console. There is a "server" on/off function in the console, but that only controls the actual DLNA server function, not the underlying Serviio process.

Re: serviio.sh does exit without error message

PostPosted: Mon Dec 10, 2018 2:39 am
by sirbender
atc98092 wrote:One of us is confused, and it might be me. :oops: I don't use Linux very much, and my background in it is a little out of date. But I though the Serviio.sh shell file was what started the Serviio background process. If that process isn't running, there's no way to open the console because there's nothing to connect it to. There's no control of this background process within the console. There is a "server" on/off function in the console, but that only controls the actual DLNA server function, not the underlying Serviio process.


Sorry. My mistake.

I meant Linux console - actually the correct term is Linux terminal or Linux shell or Linux commandline I think :(

I wasn't talking about the Serviio console :(

I start serviio.sh on the Linux commandline/shell and typically expect to see output there if something goes wrong. But there is no output because serviio redirects everything to the log-files (it could additionally print errors to the shell as well)

Re: serviio.sh does exit without error message

PostPosted: Mon Dec 10, 2018 2:06 pm
by atc98092
I have a test computer that I play around with, and I just installed Ubuntu 18.10 on it. I discovered that while it already had a Java client installed, it was the wrong version for Serviio. It had OpenJDK 11 installed, and Serviio requires version 8. Even after I installed version 8, it still didn't work. After some web searching I found a command that shows which Java version is set as default (sudo update-alternatives --display java), and found that 11 was still the default. Once I switched the default to 8 (sudo update-alternatives --config java), Serviio started right up.

Re: serviio.sh does exit without error message

PostPosted: Mon Dec 10, 2018 8:53 pm
by zip
I've added the error messages to the shell in 1.10.1

Re: serviio.sh does exit without error message

PostPosted: Tue Dec 11, 2018 2:04 pm
by sirbender
zip wrote:I've added the error messages to the shell in 1.10.1


Thanks! Just this error or errors and warnings in general?

May be really helpful and reduce questions in the forum.

Re: serviio.sh does exit without error message

PostPosted: Thu Dec 13, 2018 8:41 pm
by zip
any startup error. the rest will be in the log