Page 1 of 1

Freebsd 11.2 problem status and stop serviio

PostPosted: Fri Dec 07, 2018 10:40 am
by Plohish
good day!
I put serviio on my freebsd 11.2 server
serviio starts perfectly and works well, but if you check the status of the process /usr/local/etc/rc.d/serviio status - the system says "serviio is not running."
And worst of all, I can't stop serviio with the /usr/local/etc/rc.d/serviio stop command
this does not work.

Re: Freebsd 11.2 problem status and stop serviio

PostPosted: Fri Dec 07, 2018 3:16 pm
by atc98092
Can you attach a copy of your Serviio log here, so we can determine if it is actually running, or if there's some sort of error shown? When you say it works well, I'm assuming that Serviio must be visible on your network and streaming media as expected. I just created a fresh install of Linux Mint 18, so I can test there to see if it exhibits the same issues that you mention on your install.

Re: Freebsd 11.2 problem status and stop serviio

PostPosted: Fri Dec 07, 2018 3:34 pm
by Plohish
Thank you for your help.
Today I solved the problem "impossible to stop the service"
I looked at the log file and found that the system could not correctly determine the host name

  Code:
2018-12-05 22:03:12,554 ERROR [ApplicationInstanceManager] shluz.plohish67.ru.1.16.172.in-addr.arpa: shluz.plohish67.ru.1.16.172.in-addr.arpa: hostname nor servname provided, or not known
java.net.UnknownHostException: shluz.plohish67.ru.1.16.172.in-addr.arpa: shluz.plohish67.ru.1.16.172.in-addr.arpa: hostname nor servname provided, or not known
   at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
   at org.serviio.ApplicationInstanceManager.registerInstance(ApplicationInstanceManager.java:68)
   at org.serviio.MediaServer.checkForRunningInstances(MediaServer.java:301)
   at org.serviio.MediaServer.main(MediaServer.java:118)
Caused by: java.net.UnknownHostException: shluz.plohish67.ru.1.16.172.in-addr.arpa: hostname nor servname provided, or not known
   at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
   at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
   at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
   at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
   ... 3 more

I added the host name to the host file, then the "/usr/local/etc/rc.d/serviio stop" command correctly stops serviio!


however, the command of "/usr/local/etc/rc.d/serviio status" cannot find a working system and writes "serviio is not running"
while the log file does not get anything ...
while my network detects a media server and devices can perfectly play content


sorry my english, i use google translator :)

Re: Freebsd 11.2 problem status and stop serviio

PostPosted: Fri Dec 07, 2018 4:12 pm
by atc98092
Great troubleshooting. Perhaps Zip might know an answer about the status not being reported, but as long as everything is working it's not too critical. :D

Re: Freebsd 11.2 problem status and stop serviio

PostPosted: Sat Dec 08, 2018 7:26 am
by Plohish
good day!
I have news :)
I took up research ...
command
  Code:
ps -wwwwaU dlna | grep java
gives the following result:
  Code:
user@plohish67:~ # ps -wwwwaU dlna
  PID TT  STAT    TIME COMMAND
61512  2- I    1:47.71 /usr/local/openjdk8/bin/java -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20
 -Djava.net.preferIPv4Stack=true
 -Djava.awt.headless=true
 -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade
 -Dderby.system.home=/var/db/serviio
 -Dserviio.home=/var/db/serviio/home
 -Dffmpeg.location=/usr/local/bin/ffmpeg
 -Ddcraw.location=/usr/local/bin/dcraw
 -Djcs.auxiliary.DC.attributes.DiskPath=/var/db/serviio
 -classpath /usr/local/share/java/classes/serviio/serviio.jar:
 /usr/local/share/java/classes/serviio/aXMLRPC.jar:
 /usr/local/share/java/classes/serviio/commons-codec.jar:
 /usr/local/share/java/classes/serviio/commons-imaging.jar:
 /usr/local/share/java/classes/serviio/commons-io.jar:
 /usr/local/share/java/classes/serviio/commons-jxpath.jar:
 /usr/local/share/java/classes/serviio/commons-lang.jar:
 /usr/local/share/java/classes/serviio/commons-logging.jar:
 /usr/local/share/java/classes/serviio/concurrent.jar:
 /usr/local/share/java/classes/serviio/derby.jar:
 /usr/local/share/java/classes/serviio/freemarker.jar:
 /usr/local/share/java/classes/serviio/groovy-all.jar:
 /usr/local/share/java/classes/serviio/gson.jar:
 /usr/local/share/java/classes/serviio/httpclient-cache.jar:
 /usr/local/share/java/classes/serviio/httpclient.jar:
 /usr/local/share/java/classes/serviio/httpcore.jar:
 /usr/local/share/java/classes/serviio/icu4j.jar:
 /usr/local/share/java/classes/serviio/imgscalr-lib.jar:
 /usr/local/share/java/classes/serviio/jISO8601.jar:/usr
 /local/share/java/classes/serviio/jaudiotagger.jar:
 /usr/local/share/java/classes/serviio/jcl-over-slf4j.jar:
 /usr/local/share/java/classes/serviio/jcs.jar:
 /usr/local/share/java/classes/serviio/jdom.jar:
 /usr/local/share/java/classes/serviio/jnat-pmplib.jar:
 /usr/local/share/java/classes/serviio/jul-to-slf4j.jar:
 /usr/local/share/java/classes/serviio/log4j.jar:
 /usr/local/share/java/classes/serviio/lucene-analyzers-common.jar:
 /usr/local/share/java/classes/serviio/lucene-core.jar:
 /usr/local/share/java/classes/serviio/org.restlet.ext.gson.jar:
 /usr/local/share/j


I can't see this the line - org.serviio.MediaServer


I fixed the startup script like this:
the string
  Code:
serviio_pid=$(ps -wwwaU ${serviio_user} | awk '/java.*org.serviio.MediaServer/ {print $1}')

replaced by
  Code:
serviio_pid=$(ps -wwwaU ${serviio_user} | awk '/java/&&/serviio/ {print $1}')


it works!
  Code:
user@plohish67:/letc/rc.d# /usr/local/etc/rc.d/serviio status
serviio is running as pid 61512


does my code have a right to exist?

Re: Freebsd 11.2 problem status and stop serviio

PostPosted: Sun Dec 09, 2018 9:52 am
by zip
Serviio doesn't come by default with the service support on Linux, just a .sh file. Where did you get this build?

Re: Freebsd 11.2 problem status and stop serviio

PostPosted: Sun Dec 09, 2018 9:57 am
by Plohish
zip wrote:Serviio doesn't come by default with the service support on Linux, just a .sh file. Where did you get this build?


I compiled this program from the standard ports of Freebsd 11.2
/usr/ports/net/serviio

Re: Freebsd 11.2 problem status and stop serviio

PostPosted: Sun Dec 09, 2018 10:01 am
by zip
ah ok, so I guess you'll have to ask the maintainer