java SQL error after today's ubuntu security update

Need help? Post your questions here.

Moderator: moderators

java SQL error after today's ubuntu security update

Postby ivanxx » Sat Jan 21, 2012 7:14 pm

Hi!,

I just upgraded to today's (jan 21) ubuntu kernel update and after that I'm getting a 503 Service Unavailable message when trying to connect to the subsonic service.
Looking at the logs, I can see the java complainig about this: java.sql.SQLException: User not found: SA

I'm not sure where to look at ( :oops: not a java programmer myself), so any help?

Thanks!
ivanxx
 
Posts: 2
Joined: Sat Jan 21, 2012 6:58 pm

Re: java SQL error after today's ubuntu security update

Postby ytechie » Sun Jan 22, 2012 2:50 am

Did you try restarting the server? SA is the name used for the sql admin user. It's created with the subsonic.script file found in the db folder. Take a look:

Code: Select all
ALTER TABLE SHARE_FILE ALTER COLUMN ID RESTART WITH 281
ALTER TABLE TRANSCODING2 ALTER COLUMN ID RESTART WITH 2
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
INSERT INTO VERSION VALUES(1)
INSERT INTO VERSION VALUES(2)
INSERT INTO VERSION VALUES(3)
INSERT INTO
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: java SQL error after today's ubuntu security update

Postby ivanxx » Sun Jan 22, 2012 2:36 pm

Thanks for the tip ytechie!!!

I took a look at the subsonic.script file just to find it was somehow truncated (it contained just a couple of lines!!)
So I moved /var/subsonic to /var/subsonic.old, reinstalled the .deb package, started the service, and once I saw it was running again I stopped it and moved the script file onto the broken one. Undid the .old folder renaming and started the service again. I had the idea that this would probably get back my config, but nope, had to reassign the music folders and re-create the users (fortunately I have only two at home)...

Thanks again, it is back and rocking! (literally :D )
ivanxx
 
Posts: 2
Joined: Sat Jan 21, 2012 6:58 pm

Re: java SQL error after today's ubuntu security update

Postby ytechie » Sun Jan 22, 2012 2:53 pm

The script is created when the service is shutdown normally. I discovered this in a way you don't want to. I have a headless server that I usually shut down before I go to sleep because it is in my bedroom (I live in Manhattan). Occasionally I would forget to shut the server before I shut down my computer, so I would just do the ol' hold the power button. I had no clue that I was preventing the script from being written!

Now, every so often, I restart the service just so that the script gets written, and back up the whole subsonic folder using rsync.

Keep in mind that the script file doesn't hold all the information. The music_file_info table is held in a different file. Always a good idea to back up the db folder every so often.
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York


Return to Help

Who is online

Users browsing this forum: No registered users and 32 guests