Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 930820 - net-p2p/biglybt-3.5.0.0 ERROR: unable to bind to 127.0.0.1:6880
Summary: net-p2p/biglybt-3.5.0.0 ERROR: unable to bind to 127.0.0.1:6880
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-28 11:11 UTC by Marius Stoica
Modified: 2024-04-29 12:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (biglybt.info,19.68 KB, text/plain)
2024-04-28 11:14 UTC, Marius Stoica
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Stoica 2024-04-28 11:11:55 UTC
When trying to start biglybt, I get the following error

> letto@localhost: ~ $  biglybt 
> StartServer ERROR: unable to bind to 127.0.0.1:6880 listening for passed torrent info: sun.net.spi.nameservice.NameServiceDescriptor: Provider com.biglybt.core.util.spi.AENameServiceDescriptor not found
> There appears to be another process already listening on socket [127.0.0.1:6880].
> 
> Locate and terminate the other program or change the control port
> 
> See the wiki for details, https://wiki.biglybt.com/w/Commandline_options#Changing_the_Control_Port



The above error is after executing:
> letto@localhost: ~ $ mv ~/.biglybt/ ~/.biglybt.back


No process seems to be bound to port 6880:

> letto@localhost: ~ $ sudo netstat -tunlp | grep 6880
> letto@localhost: ~ $ lsof -i tcp:6880 
> letto@localhost: ~ $ echo $? 
> 1


I've tried passing the -Dazureus.instance.port=16889 argument, as suggested on the wiki page form the output, but it had no effect. (Not sure if I did pass the argument as I should have tough, seeing as the bigly executable is a script that sources another script..)

It happens on sys-kernel/gentoo-sources, both 6.6.28 and 6.6.29

I've also downgraded dev-java/openjdk-bin and virtual/jdk to version 17 but it didn't make any difference.


Reproducible: Always
Comment 1 Marius Stoica 2024-04-28 11:14:58 UTC
Created attachment 891899 [details]
emerge --info
Comment 2 Marius Stoica 2024-04-29 06:19:41 UTC
I managed to get biglybt to start.


I think the issue was that after updating to dev-java/openjdk-bin:21 the system configuration didn't update correctly even tough I did actually restart the system.

> letto@localhost: ~ $ sudo java-config --list-available-vms 
> The following VMs are available for generation-2:
> *)      Eclipse Temurin JDK 21.0.2_p13 [openjdk-bin-21]
> 2)      Eclipse Temurin JDK 8.402_p06 [openjdk-bin-8]
> 
> letto@localhost: ~ $ sudo eselect java-vm list 
> Available Java Virtual Machines:
>   [1]   openjdk-bin-8 
>   [2]   openjdk-bin-21  system-vm


> letto@localhost: ~ $   ls -l $JAVA_HOME 
> lrwxrwxrwx 1 letto letto 28 Dec 30  2022 /home/letto/.gentoo/java-config-2/current-user-vm -> /usr/lib/jvm//openjdk-bin-17

(this was blinking as /usr/lib/jvm//openjdk-bin-17 doesn't exist)

> eix -I jdk shows that both dev-java/openjdk-bin:21 and dev-java/openjdk-bin:8 are installed


I think this is what made it work...
> letto@localhost: ~ $ eselect java-vm set 2

Another strange thing is that it didn't work even after downgrading to dev-java/openjdk-bin:17
Comment 3 Volkmar W. Pogatzki 2024-04-29 07:22:02 UTC

(In reply to Marius Stoica from comment #2)
> I managed to get biglybt to start.
> 
> 
> I think the issue was that after updating to dev-java/openjdk-bin:21 the
> system configuration didn't update correctly even tough I did actually
> restart the system.
> 
> > letto@localhost: ~ $ sudo java-config --list-available-vms 
> > The following VMs are available for generation-2:
> > *)      Eclipse Temurin JDK 21.0.2_p13 [openjdk-bin-21]
> > 2)      Eclipse Temurin JDK 8.402_p06 [openjdk-bin-8]
> > 
> > letto@localhost: ~ $ sudo eselect java-vm list 
> > Available Java Virtual Machines:
> >   [1]   openjdk-bin-8 
> >   [2]   openjdk-bin-21  system-vm

There is no user-vm? Refrain from prepending sudo for "list", also "eselect java-vm set user <value>" goes as user.

> 
> 
> > letto@localhost: ~ $   ls -l $JAVA_HOME 
> > lrwxrwxrwx 1 letto letto 28 Dec 30  2022 /home/letto/.gentoo/java-config-2/current-user-vm -> /usr/lib/jvm//openjdk-bin-17
> 
> (this was blinking as /usr/lib/jvm//openjdk-bin-17 doesn't exist)
> 
> > eix -I jdk shows that both dev-java/openjdk-bin:21 and dev-java/openjdk-bin:8 are installed
> 
> 
> I think this is what made it work...
> > letto@localhost: ~ $ eselect java-vm set 2
> 
> Another strange thing is that it didn't work even after downgrading to
> dev-java/openjdk-bin:17

Does it definitely not work with user-vm set to 8, 11 or 17 (after installing related version)?
$ eselect java-vm set user openjdk-bin-8
Comment 4 Marius Stoica 2024-04-29 09:50:37 UTC
(In reply to Volkmar W. Pogatzki from comment #3)

> 
> Does it definitely not work with user-vm set to 8, 11 or 17 (after
> installing related version)?
> $ eselect java-vm set user openjdk-bin-8

As I said in the comment above, it started working after I issued "$ eselect java-vm set 2" which set user java-vm to openjdk-bin-21. 

What I don't understand is why it didn't work when openjdk-bin-17 was installed. That is what the setting was supposed to be in that instance.

It works right now tough.
Comment 5 Volkmar W. Pogatzki 2024-04-29 10:19:21 UTC
(In reply to Marius Stoica from comment #4)
> (In reply to Volkmar W. Pogatzki from comment #3)
> [...]
> What I don't understand is why it didn't work when openjdk-bin-17 was
> installed. That is what the setting was supposed to be in that instance.
> 
> It works right now tough.

So would it stop again if you again installed openjdk-bin:17 and have 
'eselect java-vm' set to openjdk-21?

[4]   openjdk-21  system-vm user-vm
Comment 6 Marius Stoica 2024-04-29 10:45:33 UTC
Something is definitely wrong here. This sequence of commands doesn't look right.


> $ sudo emerge -aC dev-java/openjdk-bin:21
> letto@localhost: ~ $ eix -I jdk
> [U] dev-java/openjdk-bin
>      Available versions:  
>      (8)    8.402_p06^s
>      (11)   11.0.22_p7
>      (17)   17.0.10_p7
>      (21)   (~)21.0.2_p13
>        {alsa cups examples headless-awt selinux source}
>      Installed versions:  8.402_p06(8)^s(08:24:12 AM 04/29/2024)(alsa cups -examples -headless-awt -selinux -source) 17.0.10_p7(17)(01:24:45 PM 04/29/2024)(alsa cups -headless-awt -selinux -source)
>      Homepage:            https://adoptium.net
>      Description:         Prebuilt Java JDK binaries provided by Eclipse Temurin
> 
> [U] virtual/jdk
>      Available versions:  
>      (1.8)  1.8.0-r9
>      (11)   11-r2
>      (17)   17
>      (21)   (~)21
>        {headless-awt}
>      Installed versions:  1.8.0-r9(1.8)(10:49:09 PM 04/08/2024)(-headless-awt) 17(17)(01:34:07 PM 04/29/2024)(-headless-awt)
>      Description:         Virtual for Java Development Kit (JDK)
> 
> Found 2 matches


> $  eselect java-vm list 
> Available Java Virtual Machines:
>   [1]   openjdk-bin-8  system-vm
>   [2]   openjdk-bin-17  user-vm

> $  ll $JAVA_HOME 
> lrwxrwxrwx 1 letto letto 27 Apr 29 13:25 /home/letto/.gentoo/java-config-2/current-user-vm -> /usr/lib/jvm/openjdk-bin-17


> $ biglybt
... really long error message 

> StartServer ERROR: unable to bind to 127.0.0.1:6880 listening for passed torrent info: sun.net.spi.nameservice.NameServiceDescriptor: Provider com.biglybt.core.util.spi.AENameServiceDescriptor not found
> 
> There appears to be another process already listening on socket [127.0.0.1:6880].

> $  mv ~/.biglybt ~/.biglybt.back2

> $ biglybt
> StartServer ERROR: unable to bind to 127.0.0.1:6880 listening for passed torrent info: sun.net.spi.nameservice.NameServiceDescriptor: Provider com.biglybt.core.util.spi.AENameServiceDescriptor not found
> There appears to be another process already listening on socket [127.0.0.1:6880].
> 
> Locate and terminate the other program or change the control port
> 
> See the wiki for details, https://wiki.biglybt.com/w/Commandline_options#Changing_the_Control_Port


> $ sudo netstat -tunlp | grep 6880
> $
Comment 7 Marius Stoica 2024-04-29 10:56:05 UTC
After some more testing I can confirm that this error appears always and only when the java system-vm is set to openjdk-bin-8

The user-vm seems to have no effect as far as bigly is concerned. (even tough I am launching it as a normal user)
Comment 8 Volkmar W. Pogatzki 2024-04-29 11:26:56 UTC
(In reply to Marius Stoica from comment #7)
> After some more testing I can confirm that this error appears always and
> only when the java system-vm is set to openjdk-bin-8
> 
> The user-vm seems to have no effect as far as bigly is concerned. (even
> tough I am launching it as a normal user)

Thanks for checking. Can you do one more test and change the ebuild locally replacing:

RDEPEND="${CP_DEPEND}
	>=virtual/jre-1.8:*"

with

RDEPEND="${CP_DEPEND}
	>=virtual/jre-11:*"
Comment 9 Marius Stoica 2024-04-29 12:55:08 UTC
I've changed it, but it doesn't guarantee that biglybt can start if dev-java/openjdk-bin:8 is also installed. What needs to be set is the system-vm for java-vm to something other than 8


> $ sudo vim /var/db/repos/gentoo/net-p2p/biglybt/biglybt-3.5.0.0.ebuild
> $ sudo ebuild /var/db/repos/gentoo/net-p2p/biglybt/biglybt-3.5.0.0.ebuild manifest
> >>> Creating Manifest for /var/db/repos/gentoo/net-p2p/biglybt
> $ sudo emerge -avuDN @world 
...
> Nothing to merge; quitting.
> $ biglybt
...
> StartServer ERROR: unable to bind to 127.0.0.1:6880 listening for passed torrent info: sun.net.spi.nameservice.NameServiceDescriptor: Provider com.biglybt.core.util.spi.AENameServiceDescriptor not found


> $   eix -I openjdk
> [I] dev-java/openjdk-bin
>      Available versions:  
>      (8)    8.402_p06^s
>      (11)   11.0.22_p7
>      (17)   17.0.10_p7
>      (21)   (~)21.0.2_p13
>        {alsa cups examples headless-awt selinux source}
>      Installed versions:  8.402_p06(8)^s(08:24:12 AM 04/29/2024)(alsa cups -examples -headless-awt -selinux -source) 17.0.10_p7(17)(01:24:45 PM 04/29/2024)(alsa cups -headless-awt -selinux -source) 21.0.2_p13(21)(01:47:47 PM 04/29/2024)(alsa cups -headless-awt -selinux -source)