Can't change Ubuntu port

Need help? Post your questions here.

Moderator: moderators

Can't change Ubuntu port

Postby jimmyenglish » Wed Jan 11, 2012 1:48 am

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
jimmyenglish
 
Posts: 5
Joined: Wed Jan 11, 2012 1:42 am

Re: Can't change Ubuntu port

Postby ytechie » Wed Jan 11, 2012 1:53 am

Hold tight. I am looking at my Ubuntu server right now, and I will step you through changing the port. :D
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: Can't change Ubuntu port

Postby ytechie » Wed Jan 11, 2012 2:10 am

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.
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: Can't change Ubuntu port

Postby jimmyenglish » Wed Jan 11, 2012 4:06 am

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?
jimmyenglish
 
Posts: 5
Joined: Wed Jan 11, 2012 1:42 am

Re: Can't change Ubuntu port

Postby ytechie » Wed Jan 11, 2012 4:16 am

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?
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: Can't change Ubuntu port

Postby ytechie » Wed Jan 11, 2012 7:15 pm

Take a look at /usr/bin/subsonic. Careful though! :wink:
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: Can't change Ubuntu port

Postby jimmyenglish » Thu Jan 12, 2012 4:35 pm

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!!
jimmyenglish
 
Posts: 5
Joined: Wed Jan 11, 2012 1:42 am

Re: Can't change Ubuntu port

Postby Poffa » Thu Jan 12, 2012 8:28 pm

You must remove "#" before "SUBSONIC_ARGS="--port=8081 --https-port=443 --max-memory=120""
Poffa
 
Posts: 62
Joined: Sun Jun 28, 2009 4:21 pm
Location: Bergen, Bergen

Re: Can't change Ubuntu port

Postby ytechie » Fri Jan 13, 2012 12:52 am

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.
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: Can't change Ubuntu port

Postby jimmyenglish » Fri Jan 13, 2012 5:36 pm

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?
jimmyenglish
 
Posts: 5
Joined: Wed Jan 11, 2012 1:42 am

Re: Can't change Ubuntu port

Postby ytechie » Fri Jan 13, 2012 5:39 pm

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.
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: Can't change Ubuntu port

Postby jimmyenglish » Fri Jan 13, 2012 8:28 pm

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?
jimmyenglish
 
Posts: 5
Joined: Wed Jan 11, 2012 1:42 am

Re: Can't change Ubuntu port

Postby ytechie » Fri Jan 13, 2012 8:39 pm

Check your firewall on the computer. Make sure the port you want to use is not blocked.
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 37 guests