Page 1 of 1

Address already in use - I'm stumped.

Posted: Wed Sep 26, 2007 10:25 pm
by caliban
Hello,

I had Deluge installed by default (Linux Mint) and it was uninstalled at some point. I have since used synaptic to reinstall it, but it will not start.

I removed it via synaptic and told it to "completely" remove it.

Reinstalled via synaptic and it still won't start. ( I was not thinking to launch it from the console and look for error messages yet. Linux noob.)

Did a complete uninstall again via synaptic.

Installed the debian package from the download page of the Deluge website.

Now I get this when I try to start it:

Code: Select all

no existing Deluge session
Starting new Deluge session...
deluge_core; using libtorrent 0.13.0.0. Compiled with NDEBUG.
Applying preferences
Pickling state...
Scanning plugin dir /usr/share/deluge/plugins
Initialising plugin TorrentPeers
Initialising plugin TorrentFiles
Initialising plugin MoveTorrent
Initialising plugin WebSeed
Initialising plugin SimpleRSS
Initialising plugin DesiredRatio
Initialising plugin Locations
Initialising plugin EventLogging
Initialising plugin NetworkHealth
Initialising plugin SpeedLimiter
Initialising plugin TorrentCreator
Initialising plugin TorrentNotification
Initialising plugin NetworkGraph
Initialising plugin TorrentSearch
Initialising plugin ExtraStats
Initialising plugin TorrentPieces
Initialising plugin BlocklistImport
Applying preferences
Starting DHT...
terminate called after throwing an instance of 'asio::system_error'
  what():  Address already in use
Aborted (core dumped)
I really miss having a nice BT client since leaving Windows and uTorrent behind. I'm looking forward to exploring Deluge if I can get it running!

Thanks in advance,

-Doc

Re: Address already in use - I'm stumped.

Posted: Wed Sep 26, 2007 10:35 pm
by markybob
this means you have another client using the ports assigned to deluge. probably azureus or something else running. close them, wait a few seconds, then try again

Re: Address already in use - I'm stumped.

Posted: Wed Sep 26, 2007 11:08 pm
by caliban
I apparently had bitorrent and python-torrent(?) installed, but nothing was running. (I haven't touched a bt client on this machine in at least a month.)

I did a complete uninstall of everything, including Deluge again, and then reinstalled it from scratch.

Same error.

Wouldn't it be easy to just edit a config file and change something? When it says address, does it mean the port? Otherwise I don't know what IP address it would be referring to.

Thanks for the quick reply, and at least I got that other stuff out of there!

-Doc

Re: Address already in use - I'm stumped.

Posted: Wed Sep 26, 2007 11:48 pm
by markybob
caliban wrote:I apparently had bitorrent and python-torrent(?) installed, but nothing was running. (I haven't touched a bt client on this machine in at least a month.)

I did a complete uninstall of everything, including Deluge again, and then reinstalled it from scratch.

Same error.

Wouldn't it be easy to just edit a config file and change something? When it says address, does it mean the port? Otherwise I don't know what IP address it would be referring to.

Thanks for the quick reply, and at least I got that other stuff out of there!

-Doc
package 'bittorrent' conflicts. yes, it means port. edit ~/.config/deluge/prefs.state and change
sS'listen_on'
p26
(lp27
F6881
aF6889

to something like
sS'listen_on'
p26
(lp27
F52923
aF52933

Re: Address already in use - I'm stumped.

Posted: Thu Sep 27, 2007 2:38 am
by caliban
Fast and accurate answers. Thanks a million.

-Doc

Re: Address already in use - I'm stumped.

Posted: Fri Sep 28, 2007 7:57 am
by egil
A nice solution would be to start with a random port and inform the user when catching the exception instead of just dying.

Re: Address already in use - I'm stumped.

Posted: Fri Sep 28, 2007 8:01 am
by andar
egil wrote:A nice solution would be to start with a random port and inform the user when catching the exception instead of just dying.
Yes it would be a nice solution. Please don't hesitate to send us the patch.

Re: Address already in use - I'm stumped.

Posted: Fri Sep 28, 2007 12:01 pm
by egil
I'm working on it, but I don't have much time until my midterm exams are done.
Anyways, I have started, and written a function to check if the port is available

Code: Select all

def try_port(port):

    import socket

    port = int(port)
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
        s.bind((socket.gethostname(), port))
    except socket.error:
        return 0

    #we know the port is ready to use
    s.close()
    return port



I will integrate it with apply_prefs when I get the time :geek:

Re: Address already in use - I'm stumped.

Posted: Fri Sep 28, 2007 1:21 pm
by andar
egil wrote:I'm working on it, but I don't have much time until my midterm exams are done.
Anyways, I have started, and written a function to check if the port is available

Code: Select all

def try_port(port):

    import socket

    port = int(port)
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
        s.bind((socket.gethostname(), port))
    except socket.error:
        return 0

    #we know the port is ready to use
    s.close()
    return port



I will integrate it with apply_prefs when I get the time :geek:
A better way would be to handle the libtorrent alert 'listen_failed'.