FAQ  •  Register  •  Login

serviio won't start: address already in use

<<

MrVideo

Streaming enthusiast

Posts: 23

Joined: Thu Feb 06, 2020 11:56 am

Post Sun Sep 13, 2020 2:15 pm

serviio won't start: address already in use

I did a search and found a topic from 2016, but there was no solution. I had 2.0 running under Fedora Linux, I installed 2.1. Now 2.0 nor 2.1 will start. I closed the browser tab I had open for the console, but no go. "lsof -i:23423" returns nothing. Here is the log:
  Code:
2020-09-13 09:08:43,699 INFO  [MediaServer] ------------------------------------------------------------------------
2020-09-13 09:08:43,699 INFO  [MediaServer] Serviio DLNA media streaming server v 2.1 (rev. 64e78caaeacb5eafe11b93197db80b99f812bfb8)
2020-09-13 09:08:43,700 INFO  [MediaServer] Petr Nejedly 2009-2018
2020-09-13 09:08:43,700 INFO  [MediaServer] http://www.serviio.org
2020-09-13 09:08:43,700 INFO  [MediaServer]
2020-09-13 09:08:43,700 INFO  [MediaServer] Java 1.8.0_191-Oracle Corporation amd64
2020-09-13 09:08:43,700 INFO  [MediaServer] OS Linux 4.18.19-100.fc27.x86_64
2020-09-13 09:08:43,700 INFO  [MediaServer] File encoding: UTF-8
2020-09-13 09:08:43,768 INFO  [MediaServer] Headless mode enabled: true
2020-09-13 09:08:43,769 INFO  [MediaServer] User: root
2020-09-13 09:08:43,769 INFO  [MediaServer] User home dir: /root
2020-09-13 09:08:43,769 INFO  [MediaServer] Temp dir: /tmp
2020-09-13 09:08:43,769 INFO  [MediaServer] ------------------------------------------------------------------------
2020-09-13 09:08:43,780 INFO  [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2020-09-13 09:08:43,791 INFO  [DatabaseManager] Using DERBY database language
2020-09-13 09:08:44,559 INFO  [WebServer] Socket buffer set to 65535 bytes
2020-09-13 09:08:44,560 INFO  [RestletServer] Starting HTTP/1.1 Restlet server (/console) exposed on port 23423
2020-09-13 09:08:44,562 INFO  [RestletServer] Starting HTTP/1.1 Restlet server (/rest) exposed on port 23423
2020-09-13 09:08:44,564 INFO  [RestletServer] Starting HTTPS/1.1 Restlet server (/console) exposed on port 23523
2020-09-13 09:08:44,564 INFO  [RestletServer] Starting HTTPS/1.1 Restlet server (/rest) exposed on port 23523
2020-09-13 09:08:44,581 ERROR [MediaServer] An unexpected error occurred. Ending the application. Message: java.net.BindException: Address already in use
java.lang.RuntimeException: java.net.BindException: Address already in use
   at org.serviio.restlet.RestletServer.runServer(RestletServer.java:93)
   at org.serviio.MediaServer.main(MediaServer.java:130)
Caused by: java.net.BindException: Address already in use
   at sun.nio.ch.Net.bind0(Native Method)
   at sun.nio.ch.Net.bind(Net.java:433)
   at sun.nio.ch.Net.bind(Net.java:425)
   at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
   at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
   at org.simpleframework.transport.connect.SocketAcceptor.bind(SocketAcceptor.java:183)
   at org.simpleframework.transport.connect.SocketAcceptor.<init>(SocketAcceptor.java:100)
   at org.simpleframework.transport.connect.SocketListener.<init>(SocketListener.java:81)
   at org.simpleframework.transport.connect.SocketListenerManager.listen(SocketListenerManager.java:98)
   at org.simpleframework.transport.connect.SocketListenerManager.listen(SocketListenerManager.java:81)
   at org.simpleframework.transport.connect.SocketConnection.connect(SocketConnection.java:106)
   at org.restlet.ext.simple.HttpServerHelper.start(HttpServerHelper.java:99)
   at org.restlet.Server.start(Server.java:588)
   at org.restlet.Component.startServers(Component.java:637)
   at org.restlet.Component.start(Component.java:562)
   at org.serviio.restlet.RestletServer.startComponent(RestletServer.java:180)
   at org.serviio.restlet.RestletServer.runServer(RestletServer.java:80)
   ... 1 more

I have no clue as to why it will not start. And yes, I ran the starting script with the -stop option first.
<<

atc98092

User avatar

DLNA master

Posts: 5247

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sun Sep 13, 2020 4:07 pm

Re: serviio won't start: address already in use

If I'm reading the log correctly, there's something on the network already using the same IP address. But Zip will need to look at this, as that line might be referring to something completely different. But comparing that log to mine, that does seem to be where it's binding to the network address.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

MrVideo

Streaming enthusiast

Posts: 23

Joined: Thu Feb 06, 2020 11:56 am

Post Mon Sep 14, 2020 1:20 am

Re: serviio won't start: address already in use

The problem is what IP address? It would be great if the log listed the problem address. Not doing so results in a great big guessing game.

Even with DEBUG mode enabled, an actual address was not forthcoming.
<<

atc98092

User avatar

DLNA master

Posts: 5247

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Sep 14, 2020 1:13 pm

Re: serviio won't start: address already in use

Do you have multiple network devices on the computer? Any chance you've configured a static IP on this computer, and something else on the network has the same address, possibly from a DHCP server on the network? I've just never encountered something like this, so trying to cover the possibilities.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

MrVideo

Streaming enthusiast

Posts: 23

Joined: Thu Feb 06, 2020 11:56 am

Post Tue Sep 15, 2020 2:06 am

Re: serviio won't start: address already in use

Lots of devices on my LAN. All devices, except for the phone and the laptop, are issues static IPs. The laptop is DHCP configured for an IP within the DHCP allocated range. I just looked at the router's list of attached devices and there are no duplicates. I'm not sure what a duplicate IP would have to do with this problem since the serviio server listens on the localhost (127.0.0.1) IP.

In the meantime the Linux server developed the issue whereby one of the 8 cores goes into 100% usage mode and cycles that 100% usage between all of the 8 cores. That is usually caused by the Opera browser. Wasn't it this time. Neither was it either of the two Vivaldi browsers I had up. I closed all programs I had running and the issue was still there. That left the other process that could do it and that was MATE/caja (the desktop). Logging out and back normally fixed it. Not this time around. Well, reboot needed. Even that hung. I had to push the reset button.

After getting everything back up, I returned to this problem. Well, now I no longer get the address issue. Instead I now get:
  Code:
An unexpected error occurred. Ending the application. Message: null. Check serviio.log for more details.

Great. Maybe a 2.1 issue. So I retried 2.0. It gives me the duplicate address issue. What duplicate address? The program needs to put into the log what the duplicate address is.

As for the null issue with 2.1... here is its log:
  Code:
2020-09-14 21:00:48,953 DEBUG [ApplicationInstanceManager] Listening for application instances on socket 44331
2020-09-14 21:00:48,954 INFO  [MediaServer] ------------------------------------------------------------------------
2020-09-14 21:00:48,954 INFO  [MediaServer] Serviio DLNA media streaming server v 2.1 (rev. 64e78caaeacb5eafe11b93197db80b99f812bfb8)
2020-09-14 21:00:48,954 INFO  [MediaServer] Petr Nejedly 2009-2018
2020-09-14 21:00:48,954 INFO  [MediaServer] http://www.serviio.org
2020-09-14 21:00:48,954 INFO  [MediaServer]
2020-09-14 21:00:48,954 INFO  [MediaServer] Java 1.8.0_191-Oracle Corporation amd64
2020-09-14 21:00:48,954 INFO  [MediaServer] OS Linux 4.18.19-100.fc27.x86_64
2020-09-14 21:00:48,955 INFO  [MediaServer] File encoding: UTF-8
2020-09-14 21:00:49,019 INFO  [MediaServer] Headless mode enabled: true
2020-09-14 21:00:49,020 INFO  [MediaServer] User: root
2020-09-14 21:00:49,020 INFO  [MediaServer] User home dir: /root
2020-09-14 21:00:49,020 INFO  [MediaServer] Temp dir: /tmp
2020-09-14 21:00:49,020 INFO  [MediaServer] ------------------------------------------------------------------------
2020-09-14 21:00:49,022 DEBUG [MediaServer] Runtime params: -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=/usr/local/bin/serviio/library, -Dserviio.home=/usr/local/bin/serviio, -Dffmpeg.location=ffmpeg, -Ddcraw.location=dcraw
2020-09-14 21:00:49,031 INFO  [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2020-09-14 21:00:49,039 DEBUG [DBLogDAOImpl] Checking if script 'script-0.1.sql' has been run
2020-09-14 21:00:49,040 INFO  [DatabaseManager] Using DERBY database language
2020-09-14 21:00:49,326 WARN  [DBConnectionPool] Can't create a new connection for jdbc:derby:db;create=true
java.sql.SQLException: Failed to start database 'db' with class loader sun.misc.Launcher$AppClassLoader@135fbaa4, see the next exception for details.
   at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
   at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
   at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
   at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
   at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
   at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
   at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
   at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
   at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
   at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
   at java.sql.DriverManager.getConnection(DriverManager.java:664)
   at java.sql.DriverManager.getConnection(DriverManager.java:270)
   at org.serviio.db.DBConnectionPool.newConnection(DBConnetionPool.java:186)
   at org.serviio.db.DBConnectionPool.getConnection(DBConnetionPool.java:123)
   at org.serviio.db.DBConnectionPool.getConnection(DBConnetionPool.java:149)
   at org.serviio.db.DatabaseManager.getConnection(DatabaseManager.java:71)
   at org.serviio.db.DatabaseManager.getConnection(DatabaseManager.java:64)
   at org.serviio.update.dao.DBLogDAOImpl.isScriptPresent(DBLogDAOImpl.java:49)
   at org.serviio.update.DBSchemaUpdateExecutor.updateDBSchema(DBSchemaUpdateExecutor.java:84)
   at org.serviio.MediaServer.main(MediaServer.java:127)
Caused by: ERROR XJ040: Failed to start database 'db' with class loader sun.misc.Launcher$AppClassLoader@135fbaa4, see the next exception for details.
   at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
   at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown Source)
   ... 22 more
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database /usr/local/bin/serviio/library/db.
   at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
   at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
   at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSLockOnDB(Unknown Source)
   at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockOnDB(Unknown Source)
   at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
   at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
   at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
   at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
   at org.apache.derby.impl.store.raw.RawStore$6.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.apache.derby.impl.store.raw.RawStore.bootServiceModule(Unknown Source)
   at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
   at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
   at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
   at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
   at org.apache.derby.impl.store.access.RAMAccessManager$5.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.apache.derby.impl.store.access.RAMAccessManager.bootServiceModule(Unknown Source)
   at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
   at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
   at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
   at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
   at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown Source)
   at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
   at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
   at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
   at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
   at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
   at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
   at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unknown Source)
   ... 19 more
2020-09-14 21:00:51,333 ERROR [MediaServer] An unexpected error occurred. Ending the application. Message: null
java.lang.NullPointerException
   at org.serviio.update.dao.DBLogDAOImpl.isScriptPresent(DBLogDAOImpl.java:50)
   at org.serviio.update.DBSchemaUpdateExecutor.updateDBSchema(DBSchemaUpdateExecutor.java:84)
   at org.serviio.MediaServer.main(MediaServer.java:127)

Sigh :x
<<

atc98092

User avatar

DLNA master

Posts: 5247

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Tue Sep 15, 2020 2:20 am

Re: serviio won't start: address already in use

Bummer. The null error is a problem with the database. I don't know if any way to resolve that except delete Serviio and install fresh. But my Linux experience is limited and mostly out of date. If Zip notices this post, perhaps he can suggest something. I do see further down the log that it suggests the possibility of something already having the DB open. The way Derby is implemented in Serviio is as a single instance function. If something was already using the DB, Serviio can't open it. Perhaps another instance of Serviio was running, but that's just a guess.

I am at a loss over the duplicate address issue. Serviio doesn't just listen to localhost, it also binds to the active NIC in the computer. That's why I asked if you have more than one, because multiple NICs can confuse the auto bind function and you have to manually set it. However, to do that Serviio has to be running, because it's done in the console. Like I said, I'm comfused... :?
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

MrVideo

Streaming enthusiast

Posts: 23

Joined: Thu Feb 06, 2020 11:56 am

Post Tue Sep 15, 2020 3:17 am

Re: serviio won't start: address already in use

atc98092 wrote:Bummer. The null error is a problem with the database. I don't know if any way to resolve that except delete Serviio and install fresh. But my Linux experience is limited and mostly out of date. If Zip notices this post, perhaps he can suggest something. I do see further down the log that it suggests the possibility of something already having the DB open. The way Derby is implemented in Serviio is as a single instance function. If something was already using the DB, Serviio can't open it. Perhaps another instance of Serviio was running, but that's just a guess.

The instructions for updating to a newer version is to remove all files, except for two of them. In my case, I installed 2.1, renamed the existing serviio to serviio2.0 and renamed the 2.1 to serviio. I then deleted the two files and copied them over from the 2.0 install. Impossible to have something already using the DB as the computer was just rebooted.
I am at a loss over the duplicate address issue. Serviio doesn't just listen to localhost, it also binds to the active NIC in the computer. That's why I asked if you have more than one, because multiple NICs can confuse the auto bind function and you have to manually set it. However, to do that Serviio has to be running, because it's done in the console. Like I said, I'm comfused... :?

Didn't know about the binding to the NIC. Only one in this box, the one built into the mobo.

I'll reinstall 2.1 and not rename it. The loss of the DB is not a great loss as the configuration as to where to get the files is extremely simple.
<<

MrVideo

Streaming enthusiast

Posts: 23

Joined: Thu Feb 06, 2020 11:56 am

Post Tue Sep 15, 2020 3:29 am

Re: serviio won't start: address already in use

Update: Starting from scratch, 2.1 now starts. No idea why it did not like the two DB files: library and plugins.

I had another issue with 2.0, which 2.1 seems to have fixed and that is finding .dsf audio files and adding them to the database. 2.0 would just not do it.

I'm testing out .dsf playback and only have 18 files. I just set up a system for ripping my SACDs. I put in a new (old model) AVR that will play .dsf over DLNA. We'll see how that goes in a wee bit.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 14 guests

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