aMule Forum

English => en_Bugs => Topic started by: Pitxyoki on March 06, 2009, 05:44:36 PM

Title: RESOLVED - Default Port=-1 for amuleweb corresponds to TCP port 65535
Post by: Pitxyoki on March 06, 2009, 05:44:36 PM
When doing a fresh install of amuled + amuleweb, issuing these commands is enough to get amuleweb up and running:
Code: [Select]
$ amuled --ec-config
$ amuleweb --write-config
$ amuleweb
On the guide at the wiki (http://www.amule.org/wiki/index.php/HowTo_get_aMule_web_interface), there is information on how to set the passwords using parameters to these commands, but there is nothing relating to the port that amuleweb should be listening to.
This gets configured by default as -1 on the remote.conf file. On older versions this meant "use the same port as amuled uses for EC minus 1". On more recent versions (since about 2.2.1 or so), this means "use port 65535", which you can only find out using netstat or by a big guess.

On that wiki page, there is even this:
Quote
Go to the web address http://hostname:4711, where hostname is the name of the computer running amuleweb and 4711 is the port amuleweb is using. In most cases this should be http://localhost:4711.
Well, this was what happened in most cases, but when the -1 meant "EC port -1". Now in most cases it's 65535 (coincidentally or not, the last usable TCP port).

I believe this should be documented somewhere (if it already is, where?) and/or the default should be altered to a different port. Or perhaps (I would prefer if) you could bring the old behaviour of "EC port -1" back.
Title: Re: Default Port=-1 for amuleweb corresponds to TCP port 65535
Post by: GonoszTopi on March 06, 2009, 10:41:17 PM
I have to say, you're getting this wrong but you're right.

The port value -1 has never meant "EC port -1", its real meaning was "ask remote core for the port". But since default EC port is 4712 and default webserver port is (should be) 4711, I see why you got it wrong.

However, somewhere in time this behaviour was changed and -1 has no special meaning anymore. It is treated literally and converting it to a 32-bit unsigned value yields 65535.
Title: Re: Default Port=-1 for amuleweb corresponds to TCP port 65535
Post by: Pitxyoki on March 06, 2009, 11:43:15 PM
...then please don't make -1 the default port for amuleweb when generating it's config automatically!
Title: Re: Default Port=-1 for amuleweb corresponds to TCP port 65535
Post by: wuischke on March 07, 2009, 09:46:11 AM
Quote
It is treated literally and converting it to a 32-bit unsigned value yields 65535.
I can't resist on this one...:D
Title: Re: Default Port=-1 for amuleweb corresponds to TCP port 65535
Post by: GonoszTopi on March 07, 2009, 11:20:56 PM
 
Quote
It is treated literally and converting it to a 32-bit unsigned value yields 65535.
I can't resist on this one...:D
You won, it's 16-bit. :/
Title: Re: Default Port=-1 for amuleweb corresponds to TCP port 65535
Post by: Pitxyoki on January 09, 2010, 01:39:38 AM
If I were able to edit my posts, I'd add a nice "RESOLVED" tag to this one.
But I can't.  :-[

Anyway: this bug is resolved as of aMule 2.2.6.