FAQ  •  Register  •  Login

CentOS Error when starting Serviio.

<<

darkcloud784

Streaming enthusiast

Posts: 23

Joined: Sun Dec 23, 2012 5:36 pm

Post Tue Oct 08, 2013 6:52 pm

CentOS Error when starting Serviio.

Recently I moved my box to CentOS. I'm now trying to setup serviio to start on system boot. I have installed everything under the folder /media/movies/serviio. My initscript is below. I keep getting an error when trying to start it. It gives me "Starting Serviio DLNA Server: [OK]".

  Code:
#! /bin/sh
#
# chkconfig 35 85 15
# description: Start the serviio DLNA server in headless mode
### BEGIN INIT INFO
# Provides: serviio
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the serviio DLNA server in headless mode
### END INIT INFO

SERVIIO_HOME="/media/movies/serviio/"
SERVIIO_DAEMON="serviio.sh"
SERVIIO_BIN="$SERVIIO_HOME/bin/$SERVIIO_DAEMON"
SERVIIO_USER="serviio"

# Source function library.
. /etc/rc.d/init.d/functions

RETVAL=0

check() {
        # Check that we're a privileged user
        [ $(id -u) = 0 ] || exit 4

        # Check if SERVIIO_HOME exists
        test -d "$SERVIIO_HOME" || exit 5

        # Check if SERVIIO_BIN is executable
        test -x "$SERVIIO_BIN" || exit 5
}

start() {
        check
        echo -n "Starting Serviio DLNA server: "
   /bin/su --session-command="$SERVIIO_BIN -headless" $SERVIIO_USER &
        RETVAL=$?
        if [ $RETVAL -eq 0 ]; then
            touch /var/lock/subsys/serviio.sh
            echo_success
        else
            echo_failure
        fi
        echo
        return $RETVAL
}

stop() {
    check
    echo -n "Shutting down Serviio DLNA daemon: "
    # Retrieve JAVA Serviio process ID
    PIDDAEMON=`pgrep $SERVIIO_DAEMON`
    [ -z "$PIDDAEMON" ] || PIDJAVA=`ps -o pid= --ppid $PIDDAEMON`
    # Kill the daemon
    killproc "$SERVIIO_BIN"
    RETVAL=$?
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/serviio.sh
    echo
    # Kill the JAVA Serviio process if exists
    [ -z "$PIDJAVA" ] || kill -9 $PIDJAVA
    return $RETVAL
}

restart() {
        stop
        start
}


case "$1" in
start)
        start
        ;;
stop)
        stop
        ;;
force-reload)
        restart
        ;;
restart)
        restart
        ;;
condrestart)
        if [ -f /var/lock/subsys/serviio.sh ]; then
            restart
        fi
        ;;
status)
        status serviio.sh
        ;;
*)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|force-reload}"
        RETVAL=2
esac

exit $RETVAL



Serviio.log:

  Code:
2013-10-08 13:46:56,938 INFO  [MediaServer] ------------------------------------                                                                                        ------------------------------------
2013-10-08 13:46:56,939 INFO  [MediaServer] Serviio DLNA media streaming server                                                                                         v 1.3.1 (rev. f1fc8bc55657+)
2013-10-08 13:46:56,939 INFO  [MediaServer] Petr Nejedly 2009-2013
2013-10-08 13:46:56,939 INFO  [MediaServer] http://www.serviio.org
2013-10-08 13:46:56,939 INFO  [MediaServer]
2013-10-08 13:46:56,939 INFO  [MediaServer] Java 1.7.0_40-Oracle Corporation
2013-10-08 13:46:56,939 INFO  [MediaServer] OS Linux amd64 2.6.32-358.18.1.el6.x                                                                                        86_64
2013-10-08 13:46:56,940 INFO  [MediaServer] File encoding: UTF-8
2013-10-08 13:46:56,940 INFO  [MediaServer] Headless mode enabled: true
2013-10-08 13:46:56,940 INFO  [MediaServer] User: serviio
2013-10-08 13:46:56,940 INFO  [MediaServer] User home dir: /media/movies/serviio
2013-10-08 13:46:56,940 INFO  [MediaServer] Temp dir: /tmp
2013-10-08 13:46:56,941 INFO  [MediaServer] ------------------------------------                                                                                        ------------------------------------
2013-10-08 13:46:57,111 INFO  [WebServer] Socket buffer set to 65535 bytes
2013-10-08 13:46:57,113 INFO  [RestletServer] Starting Restlet server (/rest) ex                                                                                        posed on port 23423
2013-10-08 13:46:57,173 INFO  [RestletServer] Starting Restlet server (/cds) exp                                                                                        osed on port 23424
2013-10-08 13:46:57,174 INFO  [RestletServer] Starting Restlet server (/mediabro                                                                                        wser) exposed on port 23424
2013-10-08 13:46:57,201 INFO  [DBSchemaUpdateExecutor] Checking if DB schema nee                                                                                        ds to be updated
2013-10-08 13:46:59,103 INFO  [MediaServer] ------------------------------------                                                                                        ------------------------------------
2013-10-08 13:46:59,103 INFO  [MediaServer] License: PRO (EVALUATION, id: 111111                                                                                        11-1111-1111-1111-111111111113)
2013-10-08 13:46:59,103 INFO  [MediaServer] ------------------------------------                                                                                        ------------------------------------
2013-10-08 13:46:59,112 INFO  [Device] Created UPnP Device with UUID: 7c03e23b-d                                                                                        d40-3855-8e20-f7d9756dc143, bound address: 192.168.1.17
2013-10-08 13:46:59,283 WARN  [ProfilesDefinitionParser] Cannot get name of the                                                                                         local computer: Beast: Beast
2013-10-08 13:46:59,735 INFO  [ProfilesDefinitionParser] Parsing Profiles defini                                                                                        tion
2013-10-08 13:46:59,774 ERROR [MediaServer] An unexpected error occured. Ending                                                                                         the application. Message: replacement
java.lang.NullPointerException: replacement
        at java.util.regex.Matcher.replaceFirst(Unknown Source)
        at java.lang.String.replaceFirst(Unknown Source)
        at org.serviio.profile.ProfilesDefinitionParser.getDeviceDescription(Pro                                                                                        filesDefinitionParser.java:378)
        at org.serviio.profile.ProfilesDefinitionParser.processProfileNode(Profi                                                                                        lesDefinitionParser.java:229)
        at org.serviio.profile.ProfilesDefinitionParser.parseDefinition(Profiles                                                                                        DefinitionParser.java:164)
        at org.serviio.profile.ProfileManager.parseProfilesFromFile(ProfileManag                                                                                        er.java:181)
        at org.serviio.profile.ProfileManager.loadProfiles(ProfileManager.java:1                                                                                        56)
        at org.serviio.MediaServer.main(MediaServer.java:121)
2013-10-08 13:46:59,776 WARN  [IndexedDiskCache] Region [online_technical_metada                                                                                        ta] Disk cache not shutdown properly, shutting down now.
2013-10-08 13:46:59,776 WARN  [IndexedDiskCache] Region [thumbnails] Disk cache                                                                                         not shutdown properly, shutting down now.
<<

darkcloud784

Streaming enthusiast

Posts: 23

Joined: Sun Dec 23, 2012 5:36 pm

Post Wed Oct 09, 2013 2:11 am

Re: CentOS Error when starting Serviio.

For those that experienced this issue, I fixed it. Apparently I had to add the host name to /etc/hosts... In my case my server is called "beast" so I had to add "192.168.1.17 Beast" at the end of the file.

Return to Serviio Support & Help

Who is online

Users browsing this forum: Baidu [Spider] and 28 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.