Madsonic error 503 Service Unavailable

Hi,

I have installed the Madsonic module using the instructions here https://wiki.nethserver.org/doku.php?id=madsonic

However, when I go to the url, I get an error:

HTTP ERROR: 503

Problem accessing /music. Reason:

    Service Unavailable

Powered by Jetty:// 8.y.z-SNAPSHOT

I have googled the error and have tried stopping Madsonic, removing everything except the madsonic.properties from the madsonic/db directory and starting it again, but with no luck.

In the Nethserver web admin pages, Madsonic is not listed on the installed software pages, but there is a configuration page that lets me enable it, set it to public or private access and add samba users.

The samba share is showing up 
 but now I cannot log into samba shares using Domain\username and password, but need to use the users email address and password. Don’t know if this is related.

In the /var/madsonic/madsonic.log, I get

2017-05-25 09:53:19,867] WARN HsqlDaoHelper - Checking HSQLDB database schema ...
[2017-05-25 09:53:22,010] INFO HSqlSchema02 - Database table 'audio_ad' not found.  Creating it.
[2017-05-25 09:53:22,040] ERROR HsqlDaoHelper - Failed to initialize HSQLDB database.
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [create table audio_ad (id identity,media_file_id int,weight double,comment varchar,enabled boolean default false not null,created datetime not null,changed datetime not null,foreign key (media_file_id) references media_file(id) on delete cascade)]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: MEDIA_FILE in statement [create table audio_ad (id identity,media_file_id int,weight double,comment varchar,enabled boolean default false not null,created datetime not null,changed datetime not null,foreign key (media_file_id) references media_file(id) on delete cascade)]

So seems as though there is no database being set up for Madsonic to use.

Any help with this appreciated :slight_smile:

Also - I notice on this page Nethserver-madsonic needs testers, it says to install 20161208_madsonic-6.2.9040.rpm, but the wiki page mentioned above says to only install the nethserver-madsonic module. Do I need to install madsonic separately?

Cheers,

Don

working out of the box here on a ns7

I can read /music did you change the alias

please output the command line

config show madsonic

rm -qa | grep madsonic

systemctl status madsonic
the database is only for the music collection

1 Like

Hi - I changed the alias using the command config setprop madsonic Name music

output from config show madsonic

madsonic=service
    MaxMemory=512
    Name=music
    SambaUsers=don
    TCPPort=4040
    status=enabled
    webaccess=public

rm -qa | grep madsonic
rm: invalid option -- 'q'

[root@server ~]# systemctl status madsonic -l
● madsonic.service - LSB: Madsonic daemon
   Loaded: loaded (/etc/rc.d/init.d/madsonic; bad; vendor preset: disabled)
   Active: active (running) since Thu 2017-05-25 09:53:03 NZST; 2 days ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1078 ExecStart=/etc/rc.d/init.d/madsonic start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/madsonic.service
           └─2008 java -Xms256m -Xmx512m -Dmadsonic.home=/var/madsonic -Dmadsonic.host=0.0.0.0 -Dmadsonic.port=4040 -Dmadsonic.httpsPort=0 -Dmadsonic.contextPath=/music -Dmadsonic.defaultMusicFolder=/var/media/artists -Dmadsonic.defaultUploadFolder=/var/media/incoming -Dmadsonic.defaultPodcastFolder=/var/media/podcast -Dmadsonic.defaultPlaylistImportFolder=/var/media/playlists/import -Dmadsonic.defaultPlaylistExportFolder=/var/media/playlists/export -Dmadsonic.defaultPlaylistBackupFolder=/var/media/playlists/backup -Dmadsonic.defaultTranscodeFolder= -Duser.timezone= -Dmadsonic.update=true -Dmadsonic.gzip= -Dmadsonic.db= -Djava.awt.headless=true -jar madsonic-booter.jar

May 25 09:52:04 server.rnet.duckdns.org systemd[1]: Starting LSB: Madsonic daemon...
May 25 09:52:32 server.rnet.duckdns.org madsonic[1078]: Starting madsonic ...
May 25 09:52:33 server.rnet.duckdns.org su[1675]: (to madsonic) root on none
May 25 09:52:58 server.rnet.duckdns.org su[1675]: pam_systemd(su:session): Failed to create session: Activation of org.freedesktop.login1 timed out
May 25 09:52:58 server.rnet.duckdns.org su[1675]: pam_unix(su:session): session opened for user madsonic by (uid=0)
May 25 09:53:02 server.rnet.duckdns.org madsonic[1078]: Started Madsonic [PID 2008, /var/madsonic/madsonic_sh.log]
May 25 09:53:02 server.rnet.duckdns.org su[1675]: pam_unix(su:session): session closed for user madsonic
May 25 09:53:03 server.rnet.duckdns.org systemd[1]: Started LSB: Madsonic daemon.

Cheers,

DOn

PS also get

java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: CLIENT_ID in statement [delete from player where name is null and client_id is null and (last_seen is null or last_seen < ?)]

and other, similar, errors in the madsonic.log and madsonic_sh.log

sorry

rpm -qa |grep madsonic

you might try

‘signal-event nethserver-madsonic-update’

did you manually remove the files, not sure it is the way to go, the yum process is better for this.

removing manually files/folder in /var/madsonic, make reproducible your Issue

yum remove madsonic nethserver-madsonic
rm -rf /var/madsonic
yum install nethserver-madsonic

if needed you can restart/reconfigure madsonic by

signal-event nethserver-madsonic-update

Hi - I have removed Madsonic with the first two commands. I notice I am now able to log into the samba server with my domain login rather than with an email address. IE can log in with ADdomainname\username and password. After I installed Madsonic I noticed I could only log in with my email address and password. So that does seem to be related to the Madsonic installation.

Will try to reinstall now.

Okay - reinstalled using the command yum install nethserver-madsonic

I have tried the signal-event nethserver-madsonic-update command, but still get the same error.

Madsonic is showing up in the web-admin screens. There is an entry on the Appications screen and an entry on the services page, and a configuration screen.

I can log into samba with the domain name/username login.

systemctl status madsonic -l gives

madsonic.service - LSB: Madsonic daemon
   Loaded: loaded (/etc/rc.d/init.d/madsonic; bad; vendor preset: disabled)
   Active: active (exited) since Thu 2017-06-01 13:06:38 NZST; 9min ago
     Docs: man:systemd-sysv-generator(8)

Jun 01 13:06:38 server.rnet.duckdns.org systemd[1]: Starting LSB: Madsonic daemon...
Jun 01 13:06:38 server.rnet.duckdns.org madsonic[3252]: Starting madsonic ...
Jun 01 13:06:38 server.rnet.duckdns.org su[3257]: (to madsonic) root on none
Jun 01 13:06:38 server.rnet.duckdns.org madsonic[3252]: Started Madsonic [PID 3267, /var/madsonic/madsonic_sh.log]
Jun 01 13:06:38 server.rnet.duckdns.org systemd[1]: Started LSB: Madsonic daemon.

And

rpm -qa |grep madsonic
madsonic-6.2-9260.i386
nethserver-madsonic-0.1.2-1.ns7.sdl.noarch

And

config show madsonic
madsonic=service
    MaxMemory=512
    Name=music
    SambaUsers=don
    TCPPort=4040
    status=enabled
    webaccess=private

Hi @Don_Robertson
I installed madsonic on my NS7 and ran into the exact same problem as you.

Together with @stephdl i have a working madsonic module.

There are a few issues we tried:

As you will notice this is a different version than shipped with the nethserver module.
After installing this version I still had the 503 error. The reason seems to be a java problem. The madsonic database is not created/populated.

What finally did the trick was deleting everything in the /var/madsonic directory and after that reinitialize madsonic:
[root@ns7 ~]# rm /var/madsonic/* -rf
[root@ns7 ~]# systemctl restart madsonic
the last command will take a while since the application is a big java resource hog, but after the it was finished I had a login prompt for madsonic and could log in with the default credentials: admin/admin

1 Like

I switch back to the stable version -> Madsonic 6.2.9040 (20161208_madsonic-6.2.9040.rpm)

Normally you might have (if you have an issue) to remove madsonic and then reinstall it from my server

Thank @robb, I could find a workaround because he let me an access to the server.

Hi - sorry not to have got back to everyone about this. I was about to uninstall madsonic, but in a last desperate effort I deleted the /var/madsonic/db directory, and it started to work. May have restarted it 
 don’t recall.

Unfortunately I’m not finding Madsonic that easy to use 
 I’ve installed Ampache as well, but have not had a chance to look and see which one I will go with.

Don

the killer feature is to play music on your gsm mobile with the subsonic android application (free app), but unfortunately it needs a premium account (24€/year)

Ampache implements the Subsonic api - so you can use all the subsonic clients. The ampache clients are pretty lame, but I’m using the Madsonic app on my phone. I will give the subsonic app a try.

My needs are not great. Mostly playing the ‘Wheels on the bus’ for the kids 
 by the time they are listening to music themselves, the idea of having your own music on your own machine will probably seem like some fantastic tale of a magical past as they hide in the rubble from the machines.

Optimistically yours :expressionless:

1 Like

I should do a module for ampache, it could be nice !

I love to own my music
the rent of music like we can see with deezer or any other providers did not satisfy me. If you stop to pay, you lose what you bought.

I know i’m an old man, born in the last century but I assume it

:slight_smile:

2 Likes