Page 1 of 1
Can't change Ubuntu port

Posted:
Wed Jan 11, 2012 1:48 am
by jimmyenglish
Hello everyone, great forum!
I'm very new to Ubuntu and after 12 hours, finally got Subsonic installed and working. The android app (which I love and used flawlessly with Windows) won't work. Someone mentioned changing the port from 4040 to 8080 or 8081. I've changed everyinstance of that number in every subsonic log and it sill goes to 4040. the properties log says 8081. I've restarted a million times and the subsonic.sh_log always has 4040 in it. I've looked all over the web and I guess I'm just an idiot. Is there a control panel I can click on instead of all the terminal stuff? Please help! I hate the idea of going back to windows.
John
Re: Can't change Ubuntu port

Posted:
Wed Jan 11, 2012 1:53 am
by ytechie
Hold tight. I am looking at my Ubuntu server right now, and I will step you through changing the port.

Re: Can't change Ubuntu port

Posted:
Wed Jan 11, 2012 2:10 am
by ytechie
Ok. The file you have to edit is in /etc/default. It is /etc/default/subsonic. It appears that you already know how to edit files, and the file does not have much to edit. Just change the port number, save the file, and restart.
Re: Can't change Ubuntu port

Posted:
Wed Jan 11, 2012 4:06 am
by jimmyenglish
Thank you for writing. I've already changed that, restarted 100 times and checked all the logs. The logs say 4040 and the /default one says 8081. I had a laptop access my named domain one time and it said "localhost: 8081" Said site not found or something. I haven't been able to make that happen again. I sure am feeling humbled right now. What could I be missing?
Re: Can't change Ubuntu port

Posted:
Wed Jan 11, 2012 4:16 am
by ytechie
What does your /etc/default/subsonic file look like? Post a copy please. How do you access subsonic right now? Which port is it using?
Re: Can't change Ubuntu port

Posted:
Wed Jan 11, 2012 7:15 pm
by ytechie
Take a look at /usr/bin/subsonic. Careful though!

Re: Can't change Ubuntu port

Posted:
Thu Jan 12, 2012 4:35 pm
by jimmyenglish
So here's all the text in my /default file. Sorry it's messy.
#
# This is the configuration file for the Subsonic service
# (/etc/init.d/subsonic)
#
# To change the startup parameters of Subsonic, modify
# the SUBSONIC_ARGS variable below.
#
# Type "subsonic --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Subsonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 120 MB, use
# the following:
#
# SUBSONIC_ARGS="--port=8081 --https-port=443 --max-memory=120"
SUBSONIC_ARGS="--max-memory=100"
# The user which should run the Subsonic process. Default "root".
# Note that non-root users are by default not allowed to use ports
# below 1024. Also make sure to grant the user write permissions in
# the music directories, otherwise changing album art and tags will fail.
SUBSONIC_USER=root
When I've made the changes I've always been logged in as "Root." Please help!!
Re: Can't change Ubuntu port

Posted:
Thu Jan 12, 2012 8:28 pm
by Poffa
You must remove "#" before "SUBSONIC_ARGS="--port=8081 --https-port=443 --max-memory=120""
Re: Can't change Ubuntu port

Posted:
Fri Jan 13, 2012 12:52 am
by ytechie
Yup. The '#' in linux means that the line following it is to be understood as a comment. However, you can only have one argument line, so delete the other if you uncomment the first. Or, add the correct arguments to the second and leave the first argument line commented for future reference.
Re: Can't change Ubuntu port

Posted:
Fri Jan 13, 2012 5:36 pm
by jimmyenglish
Hey Thanks guys! I was able to successfully get that to work. I opened up port 8080 on my Belkin n300. I'm still having problems connecting with the Android app. All the computers on the network are fine. Then, on the Subsonic settings/ network page it always says "failed port forwarding on 8080." I since changed it to port 80. Same problem. It will say failed again. Then when it comes to my server name it will say "successfully registered web address." but the port forwarding will fail. Or if I turn off my external address, the port forwarding might work but nver both. I'm about to rip my hair out. What could I be missing?
Re: Can't change Ubuntu port

Posted:
Fri Jan 13, 2012 5:39 pm
by ytechie
Do you know how to log into your router and port forward manually? If not, google it and you will quickly figure out what is wrong.
Re: Can't change Ubuntu port

Posted:
Fri Jan 13, 2012 8:28 pm
by jimmyenglish
Yes, I've ported the router forward. Tried a million different numbers. On the subsonic panel the new number shows and says" failed to forward port (whatever)." Just for giggles I reinstalled on a windowz 7 laptop and it worked right away. What could I be doing wrong on the Ubuntu server? Do I have to be logged in as root for the thing to work?
Re: Can't change Ubuntu port

Posted:
Fri Jan 13, 2012 8:39 pm
by ytechie
Check your firewall on the computer. Make sure the port you want to use is not blocked.