FAQ  •  Register  •  Login

Linux Setup on CentOS - "replacement" error

<<

glassware

Serviio newbie

Posts: 1

Joined: Thu May 31, 2012 7:29 pm

Post Thu May 31, 2012 7:42 pm

Linux Setup on CentOS - "replacement" error

Hi all,

I set up ServIIO on CentOS following the instructions on the wiki: http://wiki.serviio.org/doku.php?id=howto:linux:install

After following these instructions, I noticed that ServIIO wasn't running. I checked the log files and saw this message:
  Code:
2012-05-31 12:13:52,849 ERROR [ApplicationInstanceManager] themistocles: themistocles
java.net.UnknownHostException: themistocles: themistocles
        at java.net.InetAddress.getLocalHost(InetAddress.java:1426)
        at org.serviio.ApplicationInstanceManager.registerInstance(ApplicationInstanceManager.java:68)
        at org.serviio.MediaServer.checkForRunningInstances(MediaServer.java:242)
        at org.serviio.MediaServer.main(MediaServer.java:93)
2012-05-31 12:13:52,855 INFO  [MediaServer] ------------------------------------------------------------------------
2012-05-31 12:13:52,855 INFO  [MediaServer] Serviio DLNA media streaming serverv 0.6.2 (rev. 6a61243292ee)
2012-05-31 12:13:52,855 INFO  [MediaServer] Petr Nejedly 2009-2011
2012-05-31 12:13:52,855 INFO  [MediaServer] http://www.serviio.org
2012-05-31 12:13:52,855 INFO  [MediaServer]
2012-05-31 12:13:52,855 INFO  [MediaServer] Java 1.6.0_22-Sun Microsystems Inc.
2012-05-31 12:13:52,855 INFO  [MediaServer] OS Linux amd64 2.6.32-220.13.1.el6.x86_64
2012-05-31 12:13:52,855 INFO  [MediaServer] File encoding: UTF-8
2012-05-31 12:13:52,856 INFO  [MediaServer] Headless mode enabled: true
2012-05-31 12:13:52,856 INFO  [MediaServer] User home dir: /opt/serviio
2012-05-31 12:13:52,856 INFO  [MediaServer] Temp dir: /tmp
2012-05-31 12:13:52,856 INFO  [MediaServer] ------------------------------------------------------------------------
2012-05-31 12:13:52,921 INFO  [RestletServer] Starting Restlet server exposed on port 23423
2012-05-31 12:13:52,950 INFO  [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2012-05-31 12:13:53,626 WARN  [ProfilesDefinitionParser] Cannot get name of thelocal computer: themistocles: themistocles
2012-05-31 12:13:53,780 INFO  [ProfilesDefinitionParser] Parsing Profiles definition
2012-05-31 12:13:54,062 ERROR [MediaServer] An unexpected error occured. Ending the application. Message: replacement
java.lang.NullPointerException: replacement
        at java.util.regex.Matcher.replaceFirst(Matcher.java:867)
        at java.lang.String.replaceFirst(String.java:2158)
        at org.serviio.profile.ProfilesDefinitionParser.getDeviceDescription(ProfilesDefinitionParser.java:331)
        at org.serviio.profile.ProfilesDefinitionParser.processProfileNode(ProfilesDefinitionParser.java:194)
        at org.serviio.profile.ProfilesDefinitionParser.parseDefinition(ProfilesDefinitionParser.java:143)
        at org.serviio.profile.ProfileManager.loadProfiles(ProfileManager.java:156)
        at org.serviio.MediaServer.main(MediaServer.java:105)
2012-05-31 12:23:05,136 ERROR [ApplicationInstanceManager] themistocles: themistocles java.net.UnknownHostException: themistocles: themistocles
        at java.net.InetAddress.getLocalHost(InetAddress.java:1426)
        at org.serviio.ApplicationInstanceManager.registerInstance(ApplicationInstanceManager.java:68)
        at org.serviio.MediaServer.checkForRunningInstances(MediaServer.java:242)
        at org.serviio.MediaServer.main(MediaServer.java:93)


After a bit of debugging, I solved the issue. The problem was that ServIIO requires that your machine's hostname match a valid DNS entry. Unfortunately, the server didn't tell me that - I thought that maybe my "profiles.xml" file was damaged due to the way it said "replaceFirst" in a regex string was the error.

The solution was to fix my machine's "hostname" to match an entry in the "/etc/hosts" file. My hostname is "themistocles" and I have this line in "/etc/hosts":
  Code:
127.0.0.1               localhost.localdomain localhost themistocles


After I made that minor change, ServIIO ran successfully. Perhaps this note will save someone else some trouble!
<<

jabrown0604

Serviio lover

Posts: 88

Joined: Sun Jan 22, 2012 8:25 pm

Location: Illinois

Post Thu May 31, 2012 9:57 pm

Re: Linux Setup on CentOS - "replacement" error

Glad you fixed your issue. I experienced a similar issue last week with ubuntu 12.04 server at work. It is always good practice to have your hostname file and your hosts file show the same machine name if possible.
“Those who have succeeded at anything and don’t mention luck are kidding themselves.”
Server-Mac Mini / OS-WHS 2011 SP1 / TV/HTS-Sharp Aquos/Samsung HT-C6600

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 8 guests

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