Installing Madsonic on Debian Linux

Need help? Post your questions here.

Installing Madsonic on Debian Linux

Unread postby arcylix » 28 May 2014, 02:39

I found a couple of old posts dated 2013, so instead of reviving them (since the information in them didn't help), I decided to write up a new post.

I'm having issues with installing Madsonic on my LInux machine. This is troublesome because I dearly love Madsonic and have it on all my mobile devices. I've installed openjdk-7-jdk already, and the debian package for Madsonic. The service is running, but when I go to localhost:4040, it doesn't even exist, so I'm not sure what to do at this point.

Does anyone have any step-by-step instructions on how to install Madsonic on a Debian platform? I would greatly appreciate it if you do. Thank you in the meantime.
arcylix
 
Posts: 8
Joined: 22 Apr 2014, 00:02
Has thanked: 4 times
Been thanked: 0 time

Re: Installing Madsonic on Debian Linux

Unread postby c0utta » 28 May 2014, 04:57

Hi arcylix,

Happy to help you as I'm also running Madsonic on a minimal installation of Debian Linux - no GUI, just command line. It works like a charm.

Some quick questions:
- Are you running the Standalone or War only?
- I know you've installed openjdk-7-jdk, but when you run "java -version" what do you get back?
- contents of /var/madsonic/madsonic.log might also be helpful for diagnosis

Cheers,

c0utta
c0utta
 
Posts: 12
Joined: 21 Aug 2013, 04:16
Has thanked: 0 time
Been thanked: 10 times

Re: Installing Madsonic on Debian Linux

Unread postby arcylix » 28 May 2014, 07:12

I'd guess I'm running the War only. Downloaded the .deb file for build 5.0, then updated the War to the 3380 per previous instructions.

"java -version" and "javac -version" both return 1.7.0_55.

Here's the output from the madsonic.log file:

Code: Select all
[2014-05-27 18:44:12,529] INFO DaoHelper - Checking database schema.
[2014-05-27 18:44:13,214] INFO DaoHelper - Done checking database schema.
[2014-05-27 18:44:13,593] INFO UserService - Checking User accounts ...
[2014-05-27 18:44:13,683] INFO UserService - Checking Done
[2014-05-27 18:44:13,808] INFO MediaScannerService - Automatic media library scanning scheduled to run every 1 day(s), starting at Wed May 28 03:00:00 PDT 2014
[2014-05-27 18:44:13,935] INFO UPnPService - Checking UPnP service...
[2014-05-27 18:44:14,015] INFO PodcastService - Automatic Podcast update scheduled to run every 24 hour(s), starting at Tue May 27 18:49:14 PDT 2014
[2014-05-27 18:44:14,261] INFO UPnPService - Disabling UPnP/DLNA media server
[2014-05-27 18:44:14,262] INFO UPnPService - Checking UPnP service - Done!
[2014-05-27 18:44:23,968] INFO NetworkService - Deleted port mapping for port 80
[2014-05-27 18:49:14,012] INFO PodcastService - Starting scheduled Podcast refresh.
[2014-05-27 18:49:14,012] INFO PodcastService - Completed scheduled Podcast refresh.


For extra information, here's the settings in madsonic.sh

Code: Select all
MADSONIC_HOME=/var/madsonic
MADSONIC_HOST=0.0.0.0
MADSONIC_PORT=4040
MADSONIC_HTTPS_PORT=0
MADSONIC_CONTEXT_PATH=/
MADSONIC_INIT_MEMORY=256
MADSONIC_MAX_MEMORY=350
MADSONIC_PIDFILE=
MADSONIC_DEFAULT_MUSIC_FOLDER=/var/media
MADSONIC_DEFAULT_UPLOAD_FOLDER=/var/media/Incoming
MADSONIC_DEFAULT_PODCAST_FOLDER=/var/media/Podcast
MADSONIC_DEFAULT_PLAYLIST_IMPORT_FOLDER=/var/media/playlist-import
MADSONIC_DEFAULT_PLAYLIST_EXPORT_FOLDER=/var/media/playlist-export
quiet=0


I will be changing the default folder, though, to my external drive. Is the MADSONIC_HOST where I would put my url (e.g. http://www.mymusicsite.com)? I also intend on changing the port to 9000 - when I had my Windows installation, I used 9000 rather than 4040.

I appreciate any help you offer! I've been racking my brains, but as I'm still fairly new to the linux platform, well, I'm not sure what all I need to do.
arcylix
 
Posts: 8
Joined: 22 Apr 2014, 00:02
Has thanked: 4 times
Been thanked: 0 time

Re: Installing Madsonic on Debian Linux

Unread postby c0utta » 28 May 2014, 15:52

Java version is fine, plus the log shows that Madsonic is running. Therefore I suspect it's networking related.

Firstly, leave the settings in madsonic.sh as they are. Mine looks exactly like yours, except I have modified the memory settings.

Best to change the port from 4040 to 9000 once things are up and running. Also, http://www.mymusicsite.com is something that you'll need to do at your router and port forward to Madsonic but firstly it needs to work internally.

I gather that you're using Debian with a GUI since you're trying http://localhost:4040 - correct? I suppose I'm trying to determine if you're doing all these operations on the same computer. Just checking, that's all.
c0utta
 
Posts: 12
Joined: 21 Aug 2013, 04:16
Has thanked: 0 time
Been thanked: 10 times

Re: Installing Madsonic on Debian Linux

Unread postby Madevil » 28 May 2014, 17:37

hi there,

If you have installed Madsonic with the deb installer you can easily edit the following file to modify your daemon service settings:

https://github.com/MadMarty/madsonic-se ... dsonic#L17

If you use only the standalone version you have to edit your madsonic.sh start-script.

best regards
User avatar
Madevil
Administrator
Administrator
 
Posts: 941
Joined: 07 Dec 2012, 03:58
Has thanked: 1338 times
Been thanked: 964 times

Re: Installing Madsonic on Debian Linux

Unread postby arcylix » 28 May 2014, 22:32

c0utta wrote:Java version is fine, plus the log shows that Madsonic is running. Therefore I suspect it's networking related.

Firstly, leave the settings in madsonic.sh as they are. Mine looks exactly like yours, except I have modified the memory settings.

Best to change the port from 4040 to 9000 once things are up and running. Also, http://www.mymusicsite.com is something that you'll need to do at your router and port forward to Madsonic but firstly it needs to work internally.

I gather that you're using Debian with a GUI since you're trying http://localhost:4040 - correct? I suppose I'm trying to determine if you're doing all these operations on the same computer. Just checking, that's all.


Ah, yes, it is a GUI installation of Debian - didn't realize you meant the installation of the Debian platform, and not just the method of installing Madsonic.

Regarding the http, I know I was able to do the change in Windows (either via the config file or through the browser), so why would that change in this case? Seems odd to me - I already have my router port forwarding the proper ports (from before, when it was on Windows).

I suspect it's a networking issue as you indicated. Testing today, I've found that I cannot even connect to http://localhost nor http://127.0.0.1, yet they are defined in the hosts file correctly, and there's nothing in hosts.allow nor hosts.deny. I'm not sure this is something that you could help with, but if you do know anything, again, greatly appreciated! I'm kind of missing my music on my mobile devices!
arcylix
 
Posts: 8
Joined: 22 Apr 2014, 00:02
Has thanked: 4 times
Been thanked: 0 time

Re: Installing Madsonic on Debian Linux

Unread postby c0utta » 30 May 2014, 04:47

I span up a vanilla Debian Linux virtual machine and installed Madsonic and it worked perfectly, both from the VM (using http://localhost:4040) and externally (using http://ipaddress:4040).

Therefore, you've certainly got a networking issue but since I use Debian from the command line it might be difficult for me to diagnose.

Anyway, start with the output of "ifconfig" - that will at least tell us if network services are running and the loopback is working.

Cheers!
Last edited by c0utta on 30 May 2014, 07:28, edited 1 time in total.
c0utta
 
Posts: 12
Joined: 21 Aug 2013, 04:16
Has thanked: 0 time
Been thanked: 10 times

Re: Installing Madsonic on Debian Linux

Unread postby arcylix » 30 May 2014, 06:39

Hopefully you'll be able to help diagnose it. As a side note, I can ping both localhost and 127.0.0.1. I just can't seem to access them via web browser (tried across three different browsers, two newly installed, just to make sure it wasn't the browser). Here's the output from ifconfig:

Code: Select all
eth0      Link encap:Ethernet  HWaddr 98:4b:e1:96:2a:ff 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:5326 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5326 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:416609 (406.8 KiB)  TX bytes:416609 (406.8 KiB)

wlan0     Link encap:Ethernet  HWaddr 90:00:4e:08:2d:96 
          inet addr:192.168.2.6  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::9200:4eff:fe08:2d96/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:459397 errors:0 dropped:0 overruns:0 frame:0
          TX packets:154493 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:214796362 (204.8 MiB)  TX bytes:30909701 (29.4 Mi)
arcylix
 
Posts: 8
Joined: 22 Apr 2014, 00:02
Has thanked: 4 times
Been thanked: 0 time

Re: Installing Madsonic on Debian Linux

Unread postby c0utta » 30 May 2014, 07:43

I'm hoping a Debian Linux guru will chip in, because I've only ever got through with trial and error!

If you do a "netstat -pln" you'll see what ports are open, and their listening status. For example, on my minimal installation:

Code: Select all
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      369/sshd
tcp6       0      0 :::9412                 :::*                    LISTEN      403/java
tcp6       0      0 :::60008                :::*                    LISTEN      403/java
tcp6       0      0 :::4040                 :::*                    LISTEN      403/java
tcp6       0      0 :::22                   :::*                    LISTEN      369/sshd
udp6       0      0 :::1900                 :::*                                403/java

You can see my 4040 which is the web port so I'd expect to the same at your end.
c0utta
 
Posts: 12
Joined: 21 Aug 2013, 04:16
Has thanked: 0 time
Been thanked: 10 times

Re: Installing Madsonic on Debian Linux

Unread postby arcylix » 30 May 2014, 07:50

Eh, this is what I get:

Code: Select all
tcp        0      0 127.0.0.1:5939          0.0.0.0:*               LISTEN      2668/teamviewerd
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      3232/dropbox   
tcp6       0      0 192.168.2.6:50045       :::*                    LISTEN      29961/java     
udp        0      0 0.0.0.0:29755           0.0.0.0:*                           2529/dhclient   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           2529/dhclient   
udp        0      0 0.0.0.0:17500           0.0.0.0:*                           3232/dropbox   
udp6       0      0 :::1900                 :::*                                29961/java     
udp6       0      0 :::36782                :::*                                2529/dhclient   
udp6       0      0 192.168.2.6:41428       :::*                                29961/java 


Definitely seems like something's amiss here...
arcylix
 
Posts: 8
Joined: 22 Apr 2014, 00:02
Has thanked: 4 times
Been thanked: 0 time

Re: Installing Madsonic on Debian Linux

Unread postby arcylix » 30 May 2014, 10:49

Well now, this is super-weird.

I read somewhere online about how to open ports on Debian, so I tried it:

Code: Select all
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 4040 -j ACCEPT


It didn't open that particular port, but... when I did netstat -pln again, it showed that 127.0.0.1:9000 was open... so I attempted to connect, and lo and behold, I'm able to connect...

Now I just need to figure out the website portion!
arcylix
 
Posts: 8
Joined: 22 Apr 2014, 00:02
Has thanked: 4 times
Been thanked: 0 time

Re: Installing Madsonic on Debian Linux

Unread postby arcylix » 30 May 2014, 11:23

Okay, pretty sure I got it figured out now! I just used the madsonic --host=http://websitehere.com command. Seems like it works, though I can't test it locally since I can't log in Madsonic through the website address on the same network. If anyone wants to test it out: http://arcylix.no-ip.org:9000 -- just let me know if it comes up with the Madsonic page. Thanks for all the help!
arcylix
 
Posts: 8
Joined: 22 Apr 2014, 00:02
Has thanked: 4 times
Been thanked: 0 time

Re: Installing Madsonic on Debian Linux

Unread postby arcylix » 30 May 2014, 19:09

And... it's a no-go. Had a friend test out the IP address, nothing. I can't even access the local IP from my other laptop, nor mobile devices. I can access it on the server laptop just fine, just not anywhere else.

I wonder if I'm missing a setting somewhere? Any ideas?
arcylix
 
Posts: 8
Joined: 22 Apr 2014, 00:02
Has thanked: 4 times
Been thanked: 0 time

Re: Installing Madsonic on Debian Linux

Unread postby Madevil » 31 May 2014, 20:35

Hi there,

You've done it wrong ;)

the --host parameter is to specify the use ip address, this is not a dns service.

the parameter 0.0.0.0 would send all trafic of the service through each IP adress on this device.
example: if you set --host=10.10.1.1 the only this address will be used. No DNS name are allowed.

For this you have to route your internal address over your own router to an external DNS-server/service.
example: http://www.dyn.com or http://www.noip.com

best regards
User avatar
Madevil
Administrator
Administrator
 
Posts: 941
Joined: 07 Dec 2012, 03:58
Has thanked: 1338 times
Been thanked: 964 times

Re: Installing Madsonic on Debian Linux

Unread postby arcynix » 31 May 2014, 20:46

Ah, so if I set it back to 0.0.0.0, it should allow all traffic to access it? I've done that, and still not able to connect locally.

Additionally, my website is set up through noip (see previous posts about testing the page). Not sure what I have to do there or with my router now, as I didn't have to do anything on the Windows platform. What's different about the setup on a Linux platform vs Windows that I have to make all these changes?

I'll definitely look into my router settings regarding DNS, but last I remember, it didn't allow for custom DNS settings, only for their (paid) DNS setting. :\ Thanks again for the help!
arcynix
 
Posts: 2
Joined: 04 Nov 2013, 19:09
Has thanked: 0 time
Been thanked: 1 time

Re: Installing Madsonic on Debian Linux

Unread postby GJ51 » 01 Jun 2014, 01:46

arcylix wrote:And... it's a no-go. Had a friend test out the IP address, nothing. I can't even access the local IP from my other laptop, nor mobile devices. I can access it on the server laptop just fine, just not anywhere else.

I wonder if I'm missing a setting somewhere? Any ideas?


If you can access on the local host but can't get to it from another device inside your network, then it's a firewall issue on the host machine.

If you get access from inside the network with other local devices inside the network and can't get through from outside, it's a port forwarding issue.

HTH

Obviously, you want to make sure you get local access working first and then move to outside access. I also recommend not tackling ssl until you have regular http access sorted out. Don't confuse yourself with more than one issue at a time. Local machine hosting Subsonic, inside network from other devices, outside access, SSL if you want to tackle that last.
GJ51
Contributor
Contributor
 
Posts: 194
Joined: 15 Dec 2012, 17:52
Has thanked: 68 times
Been thanked: 106 times

Re: Installing Madsonic on Debian Linux

Unread postby c0utta » 02 Jun 2014, 01:34

This was also my point - get it working locally on your Debian installation and then look at changing the port from 4040 to 9000.

I notice that you're not running a vanilla installation of Debian - you appear to have both Dropbox and TeamViewer listening on ports at the same time, albeit different ports than 4040 and 9000. It would be highly unlikely that these two applications would be causing you any problems, but they are still variables in the mix that need to be eliminated.

As I said, when I created a vanilla Debian VM and installed Madsonic it just worked!

GJ51 is correct - you've got a firewall issue somewhere that you've got to fix first.
c0utta
 
Posts: 12
Joined: 21 Aug 2013, 04:16
Has thanked: 0 time
Been thanked: 10 times

Re: Installing Madsonic on Debian Linux

Unread postby arcynix » 02 Jun 2014, 03:48

Ha, I was waiting for my previous post to be approved before I responded/updated. Silly new user restrictions (though I understand why!).

I realized shortly after my delayed post that I was still using 9000 on my mobile devices for local connection. As soon as I switched it over to 4040, it worked flawlessly.

The only issue that remains now is setting it up on the website. I've done the change on the Madsonic page itself (under Settings -> Network), but it doesn't seem to reflect anywhere. It also claims Port 9000 is being forwarded, which is correct as I can verify that on my router, as well.

I can see the builds between Debian and Windows are vastly different - I know I had a much easier time setting it up on Windows than I seem to have on Debian, unfortunately. I'm not sure what ports Teamviewer and Dropbox were listening on in Windows, but there were no conflicts then, so I'm not sure there would be any conflicts now.

Again, thanks for all your help and patience in this matter. I'm truly a lover of Madsonic, and prefer it over Plex (which I started using in the very beginning based on a friend's recommendation. I've since switched him over to Madsonic, too.)
arcynix
 
Posts: 2
Joined: 04 Nov 2013, 19:09
Has thanked: 0 time
Been thanked: 1 time

Re: Installing Madsonic on Debian Linux

Unread postby c0utta » 02 Jun 2014, 08:12

Now that you've got it working internally you don't need to worry about TeamViewer and Dropbox - that was only if you were still having networking problems.

I've always kept Madsonic at 4040, so have not changed the port before but the instructions seem relatively easy:
- modify madsonic.sh, by changing MADSONIC_PORT=9000 and restart
- check this on your own home network by using http://internal-ipaddress:9000
- on your router, point port 9000 to internal-ipaddress:9000. It looks like you've already done this

Others can correct me if I'm wrong, but I've never had success using the Settings -> Network option. I've always wanted to control port forwarding at my router level including re-directing the external address internally on my home network.
c0utta
 
Posts: 12
Joined: 21 Aug 2013, 04:16
Has thanked: 0 time
Been thanked: 10 times


Return to Support 5.x

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron