[Solved] Wrong DLNA IP with multiple network interfaces

Need help? Post your questions here.

Moderator: moderators

[Solved] Wrong DLNA IP with multiple network interfaces

Postby SPo » Fri Sep 11, 2015 10:26 am

Hi,

I am using latest final Subsonic as WAR on tomcat7 with Ubuntu 14.04 LTS. My Ubuntu server has one real ethernet eth0 (192.168.1.10) interface and some vnet interfaces connected with a bridge virbr0(192.168.122.1).

The Subsonic app on my Tablet and the PC Browser works well with Subsonic (using IP from eth0 *.1.10) - so there are no major flaws.... Great SW btw!


My problem concerns the UPNP Server part of Subsonic:

If i use an android UPNP Control point Software like BuppbeUPNP or UPNPlay i can browse through the music files and select my files for playing on my kodi (running on raspberyy/cubox/wetekplay). That is how it should be - everything works ok.

But if i press the play button i get an "Action Timeout" from my Control Point Software after a bunch of seconds.

I digged deeper into the logs and found a hint in the kodi logs, that the control point software tells kodi to play from the IP *.122.1 bound to virbr0 and NOT the real interface IP *.1.10. I looked into the Metadata Info in my Control Point and there i can see clearly that the Subsonic UPNP Server tells my controlpoint to get the file from the virbr0 interface - where no listening service is running (and don`t has to).

I tried to bind tomcat to the eth0 IP Address and restarted: no solution
/var/lib/tomcat7/conf/server.xml
Code: Select all
    <Connector port="8080"
               protocol="HTTP/1.1"
               address="192.168.1.10"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443" />


I tried to tell the JAVA UPNP Stack to bind to the eth0 IP: no solution
I tried to tell the JAVA UPNP Stack to bind to the eth0 Interface: no solution
/etc/default/tomcat7
Code: Select all
JAVA_OPTS="-Djava.awt.headless=true -Dorg.fourthline.cling.network.useAddresses=192.168.1.10 -Dorg.fourthline.cling.network.useInterfaces=eth0 [...]"


Subsonic uses always the virbr0 interface IP *.122.1 and never the eth0 *.1.10.

Help appreciated....

Kind Regards, SPo

Remarks: moved this posting from general diskussion to help sub-forum


Update:

Tomcat uses another file, if started as service - the correct file for adding the JAVA_OPTions
is a file called "setenv.sh" in "$CATALINA_BASE/bin" (same folder as catalina.sh; don`t forget chmod 755 setenv.sh).

Code: Select all
#!/bin/sh
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Dorg.fourthline.cling.network.useAddresses=192.168.1.10 -Dorg.fourthline.cling.network.useInterfaces=eth0"


... but it doesn`t make any difference after restarting tomcat7...
Last edited by SPo on Sat Oct 03, 2015 1:51 pm, edited 3 times in total.
SPo
 
Posts: 6
Joined: Wed Sep 09, 2015 10:08 am

Re: UPNP uses wrong IP on Server with multiple eth Interface

Postby SPo » Mon Sep 14, 2015 10:56 am

A look in the TODO.TXT may be the answer: it seems to be scheduled for version 5.3 final

DONE IN 5.3
-----------------
Bugfix: Fixed error with list of newest podcast episodes.
REST: Add method to get newest podcast episodes

TODO IN 5.3
------------
Forum:
add icon file
cleanup
setup backup
test mail sending

Add option to show/hide artist list by default.
REST: Add method to get newest podcast episodes
Add doc.
Sharing fails if guest user is not allowed access to folders.
Interface binding for DLNA server part
https://mail.google.com/mail/ca/u/0/?zx ... fdc00a3660

[...]
SPo
 
Posts: 6
Joined: Wed Sep 09, 2015 10:08 am

Re: UPNP uses wrong IP on Server with multiple eth Interface

Postby SPo » Mon Sep 14, 2015 6:09 pm

ok... working now: made a static route in my gateway from *.122.1:8081 to *.1.10:8081
SPo
 
Posts: 6
Joined: Wed Sep 09, 2015 10:08 am

Re: [Workaround] Wrong DLNA IP with multiple network interfa

Postby sindre_mehus » Sat Sep 19, 2015 8:34 pm

If the problem is related to the stream URL using the wrong IP address, then setting the "subsonic.host" system property should help.

In your case:

-Dsubsonic.host=192.168.1.10
Subsonic developer
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Re: [Workaround] Wrong DLNA IP with multiple network interfa

Postby SPo » Sat Oct 03, 2015 1:50 pm

:D solved!

just add this in the setenv.sh file and ip is correct!

Thanks!
SPo
 
Posts: 6
Joined: Wed Sep 09, 2015 10:08 am


Return to Help

Who is online

Users browsing this forum: No registered users and 15 guests