Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get the following error every time I load BiglyBT, Failed to install DNS manager #2570

Closed
MelchiorGaspar opened this issue May 29, 2022 · 50 comments

Comments

@MelchiorGaspar
Copy link

MelchiorGaspar commented May 29, 2022

  • Windows 11 Pro x64 (v21H2)(build 22000.708)
  • BiglyBT Version Number = v3.0.0.1_Beta 29

Java 18.0.1 (64 bit)
BellSoft
c:\program files\bellsoft\libericajre-18-full

SWT v4942r22, win32, zoom=100, dpi=96
Windows 11 v10.0, amd64 (64 bit)
B3.0.0.1_B29/4 az2

Does anyone know why I am seeing this issue?
what I can do to resolve it.

Failed to install DNS manager
This will impact functions such as forced DNS resolution prevention with SOCKS
Error: DNS SPI not loaded

@MelchiorGaspar MelchiorGaspar changed the title I get the following error every time I load NiglyBT, Failed to install DNS manager I get the following error every time I load BiglyBT, Failed to install DNS manager May 29, 2022
@MelchiorGaspar
Copy link
Author

of course if I had Googled first and not tried GitHub internal search of issues...
#1017

@MelchiorGaspar
Copy link
Author

MelchiorGaspar commented May 29, 2022

I am using Java 18 from
https://bell-sw.com/pages/downloads/#/java-18-current
Java RTE (v18.0.1+12)

so does that mean that I cannot fully run BiglyBT using Java 18?

@Havokdan
Copy link
Contributor

I think this problem happens with all versions of java after version 11.

@MelchiorGaspar
Copy link
Author

aah.. hmm....

@Havokdan
Copy link
Contributor

Like:

#2340
#2330
#1017
#942

@MelchiorGaspar
Copy link
Author

lol so I am not the first to report on it... wow.

ooh well.. is there nothing that can be done to fix it in code?
outside of downgrading to Java 8?

@parg
Copy link
Contributor

parg commented May 30, 2022

@MelchiorGaspar
Copy link
Author

MelchiorGaspar commented May 30, 2022

See https://github.com/BiglySoftware/BiglyBT/wiki/Java-Versions

thx for the info Parg.
I have Java RTE v18.0.1 installed right now..
can I install them side by side Java 8 and Java 18 so only! Java 8 is used by BiglyBT?
I have the installer ready.. just not sure about settings.. so they don;t overwrite Java 18
image

so there is little to none chance of updating BiglyBT to use newer Java RTEs?
do to removed features..?

I tried to install Java RTE 8 alongside Java RTE 18 but BiglyBT is still starting up with Java 18..
O_o.
image

@Havokdan
Copy link
Contributor

If you use BiglyBT on Windows, you can use java, downloading the zip version and putting it in the "jre" folder in the program folder, so only BiglyBT will use it.

@MelchiorGaspar
Copy link
Author

MelchiorGaspar commented May 30, 2022

If you use BiglyBT on Windows, you can use java, downloading the zip version and putting it in the "jre" folder in the program folder, so only BiglyBT will use it.

I am using Windows..
Windows 11 Pro x64 (v21H2)(build 22000.708)
BiglyBT Version Number = v3.0.0.1_Beta 29

just downloaded the zip file should I drag and drop the directory structure as is into
the BiglyBT\jre folder I just created?

it comes in a 'jre8u332-full' sub-folder..

@Havokdan
Copy link
Contributor

image

@MelchiorGaspar
Copy link
Author

yeah I tried that...
its not detecting it...
I use the Bellsoft version of Java RTE v8
https://bell-sw.com/pages/downloads/#/java-8-lts

Liberica Full JRE 8u332+9 x86 64 bit for Windows

its still not detecting it.. even though I overwrote the Java 18 settings when installing Java 8 its not working.. strange..
Java 18 is still being used.. :(

@Havokdan
Copy link
Contributor

Havokdan commented May 30, 2022

I then suggest that you remove this java 18 temporarily, reinstall BiglyBT from scratch, erasing all traces of the previous installation, so that, when doing a new installation, BiglyBT will detect the lack of java and will install the portable java in the folder where BiglyBT is installed, then you can reinstall java 18, maybe with that, it will detect portable java in BiglyBT folder.

@MelchiorGaspar
Copy link
Author

MelchiorGaspar commented May 30, 2022

ooh so it will do that install a portable version?
interesting..
uninstalling won't get rid of my addons and profile and settings right?

edit:
ok, I will try that.

oops I forgot to uninstall the Java first...
gotta start over LOL!

@Havokdan
Copy link
Contributor

Havokdan commented May 30, 2022

ooh so it will do that install a portable version? interesting.. uninstalling won't get rid of my addons and profile and settings right?

edit: ok, I will try that.

oops I forgot to uninstall the Java first... gotta start over LOL!

You can always backup your BiglyBT settings...

@MelchiorGaspar
Copy link
Author

MelchiorGaspar commented May 31, 2022

It installed Sun brand, portable RTE v8.0.202.8 so its outdated by a long shot... :(
I backed up that portable version of Java and dropped in the v8.0.332 from Bellsoft... it runs it but the Firewall feature is not working again.. so back to the old version of Sun Java?

You can always backup your BiglyBT settings...
right, I do backups regularly.

EDIT:
the latest Oracle Java is Version 8 Update 333 but there is no zip portable version.. :(

EDIT2:
Java 1.8.0_333 (64 bit) installed temporarily copied the files to the BiglyBT\jre folder then uninstalled Oracle Java RTE again..
it runs... but the NAT indicator is not working now... :(

@MelchiorGaspar
Copy link
Author

MelchiorGaspar commented May 31, 2022

I tried the portable Java v8.202 again and the NAT still is not working strange...
sorry I am might be piggy back another issue on to this report..
I will create a new issue ticket if asked to do so.

"Firewall/NAT reachability status unknown"

trying again backup version of
Java 1.8.0_333 (64 bit)
Oracle Corporation
c:\programs64\biglybt\jre

SWT v4942r22, win32, zoom=100, dpi=96
Windows 11 v10.0, amd64 (64 bit)
BiglyBT v3.0.0.1_B29

@MelchiorGaspar
Copy link
Author

I guess this ticket can be closed.
I have Java RTE v8.0.u333 (64 bit) in the jre folder and the error message from DNS manager no longer appearing..
so this ticket has been addressed as best as can be I guess.

@cantalupo555
Copy link

cantalupo555 commented Jun 7, 2022

I guess this ticket can be closed. I have Java RTE v8.0.u333 (64 bit) in the jre folder and the error message from DNS manager no longer appearing.. so this ticket has been addressed as best as can be I guess.

How to solve this problem in linux?
I'm using Java version 17 LTS.

@cantalupo555
Copy link

cantalupo555 commented Jun 7, 2022

I then suggest that you remove this java 18 temporarily, reinstall BiglyBT from scratch, erasing all traces of the previous installation, so that, when doing a new installation, BiglyBT will detect the lack of java and will install the portable java in the folder where BiglyBT is installed, then you can reinstall java 18, maybe with that, it will detect portable java in BiglyBT folder.

Thank you!

I removed all versions on my system (Ubuntu 22.04).
sudo apt remove --autoremove openjdk*

Then I installed version 8.
sudo apt install openjdk-8-jdk

When I opened Biglybt again the problem was solved.

@as-muncher
Copy link

Java 1.8.0_202 (64 bit)
Oracle Corporation
c:\program files\biglybt\jre

SWT v4942r22, win32, zoom=100, dpi=120
Windows 10 v10.0, amd64 (64 bit)
B3.0.0.1_B47/4 az3

I'm getting this too. Plus, "Error: DNS SPI not loaded"

@as-muncher
Copy link

Is there some data in the log file that I can post here that would be helpful?

@parg
Copy link
Contributor

parg commented Jul 6, 2022

fek, just noticed a recent pull-request stuffed this up :(

@coyote3
Copy link

coyote3 commented Jul 6, 2022

I tried the OP's fix, putting Java RTE v8.0.u333 (64 bit) in the jre folder, but I still get the
"Failed to install DNS manager
DNS SPI not loaded"

error message.

Java 1.8.0_333 (64 bit)
Oracle Corporation
c:\program files\biglybt\jre

SWT v4942r22, win32, zoom=100, dpi=96
Windows 10 v10.0, amd64 (64 bit)
B3.0.0.1_B47/4 az2

@parg
Copy link
Contributor

parg commented Jul 6, 2022

Recent Beta versions are broken...

@coyote3
Copy link

coyote3 commented Jul 6, 2022

Ah, thank you parg!
I just donated again in thanks for everything you do.

@as-muncher
Copy link

BiglyBT will update the Java it uses to 1.9 for me, right? Or do I have to do it manually? When you say Java 8 in the commits, is that 1.8?

@parg
Copy link
Contributor

parg commented Jul 6, 2022

1.8 is where it is at

@as-muncher
Copy link

After upgrading to java 18, and deleting the c:\program files\biglybt\jre folder, I am now getting this "failed to install DNS manager" error.

Java 18.0.2 (64 bit)
Oracle Corporation
c:\program files\java\jdk-18.0.2

SWT v4942r22, win32, zoom=100, dpi=120
Windows 11 v10.0, amd64 (64 bit)
B3.1.0.1_B12/4 az3

@parg
Copy link
Contributor

parg commented Jul 27, 2022

Read the issue

@parg parg closed this as completed Jul 27, 2022
@as-muncher
Copy link

@parg, So how does one get webtorrent to work? It seems like the Java version that comes with BiglyBT is the way to go, but then webtorrent won't work. But then if I want webtorrent to work, I've got to upgrade to a later java version. I thought maybe the way to go is to use openjdk, but openjdk doesn't come with an installer file. So I just extract the windows openjdk version to my c:\program files\biglybt\jre folder? Parg, how do you get webtorrent to work on your machine?

@parg
Copy link
Contributor

parg commented Jul 27, 2022

The DNS error is nothing to do with webtorrent, ignore it or read the issue above where I posted a link about the problem to the wiki

@as-muncher
Copy link

I read the wiki. The DNS error has nothing to do with webtorrent, ok, that's new information. I will try putting the openjdk version in the jre folder and see if that helps.

@as-muncher
Copy link

So what am I looking at? If I install the webtorrent plugin and java 11+, that means I won't be able to torrent over i2p and tor?

@parg
Copy link
Contributor

parg commented Jul 30, 2022

I2P will work fine but the fact that you are using an I2P address (e.g. an I2P tracker) will be leaked by the DNS system. You can fix the problem with

--add-opens java.base/java.net=ALL-UNNAMED

as it says in the wiki.

@as-muncher
Copy link

@parg, Thanks for the comment. I wish I had as much attention to detail as you do. I totally missed that part. Maybe I'm lazy and wish that these things were more automated...
Or, I was surprised you couldn't just do an #include with a java 8 library for the java 8 functions, and then use that call. Or use C++. But thank you. I will open up the shortcut link and add that to the command line.

@as-muncher
Copy link

ok, well, still getting "failed to install DNS manager. This will impact functions such as forced DNS resolution prevention with SOCKS. Error: DNS SPI not loaded"

I did add the thing to the command line as mentioned above. I should just ignore this error?

@as-muncher
Copy link

I2P will work fine but the fact that you are using an I2P address (e.g. an I2P tracker) will be leaked by the DNS system. You can fix the problem with

--add-opens java.base/java.net=ALL-UNNAMED

as it says in the wiki.

Java 17.0.4 (64 bit)
Oracle Corporation
c:\program files\java\jdk-17.0.4

SWT v4942r22, win32, zoom=100, dpi=120
Windows 11 v10.0, amd64 (64 bit)
B3.1.0.1_B15/4 az3

Now I get this error intermittently, not every time:
Failed to access torrent file '--add-opens'. Ensure sufficient temporary file space available (check browser cache usage).
and
Failed to access torrent file 'java.base/java.net=ALL-UNNAMED'. Ensure sufficient temporary file space available (check browser cache usage).

@parg
Copy link
Contributor

parg commented Aug 5, 2022

You haven't modified the java vm options correctly

@as-muncher
Copy link

as-muncher commented Aug 5, 2022

Oh. I entered these switches to the biglybt shortcut. I wasn't supposed to do that? It would be handy if you did some automatic thing in code, to recognise java 11+ and then add this in the proper place. I'm sorry, please spell it out for me explicitly. Am I supposed to open the java.vmoptions file in roaming\biglybt and put it there? I see one option there with only one hyphen, not two.

@parg
Copy link
Contributor

parg commented Aug 6, 2022

As https://github.com/BiglySoftware/BiglyBT/wiki/Java-Versions says, you need to use the Java command line, for example

"C:\Program Files\Java\jdk-17.0.2\bin\java.exe" --add-opens java.base/java.net=ALL-UNNAMED -cp BiglyBT.jar;swt.jar com.biglybt.ui.Main

Of course you then have the problem that restarting BiglyBT doesn't work properly.

As the wiki says, "In the future the BiglyBT launcher may be updated to do this."

@as-muncher
Copy link

Ok it ended up being "C:\Program Files\Java\jdk-17.0.4\bin\javaw.exe" --add-opens java.base/java.net=ALL-UNNAMED -cp BiglyBT.jar;swt.jar com.biglybt.ui.Main and I had to start it in the biglybt directory. Then, I had to allow javaw to have access through the firewall. I'm noticing the download speeds aren't good.

Thanks for spelling it out for me. I actually needed it.

@as-muncher
Copy link

seems like it wouldn't take much to code something to alter the command line if java 11+ is detected.

@as-muncher
Copy link

ah, but interesting, that DNS SPI message is not happening any more, maybe because I'm using javaw this way.

@as-muncher
Copy link

Yes, after changing the shortcut from

"C:\Program Files\Java\jdk-17.0.4\bin\javaw.exe" --add-opens java.base/java.net=ALL-UNNAMED -cp BiglyBT.jar;swt.jar com.biglybt.ui.Main

to

biglybt

I notice that my download speeds are a lot faster, but then also get this "failed to install DNS manager" and "DNS SPI not loaded". But if I switch back to the javaw version, I get no DNS SPI message, but download speeds suck but biglybt upload speed is fast.

Java 17.0.4 (64 bit)
Oracle Corporation
C:\Program Files\Java\jdk-17.0.4

SWT v4942r22, win32, zoom=100, dpi=120
Windows 11 v10.0, amd64 (64 bit)
B3.1.0.1_B16/4 az3

@parg
Copy link
Contributor

parg commented Aug 7, 2022

Rewind.

BiglyBT officially supports Java 8.

Unfortunately the WebTorrent plugin requires Java 11 due to the webrtc library this uses being Java 11.

If you want to use WebTorrent then use Java 11 (not recommended but necessary)

If you want to go ahead and use Java > 11 then things will generally work but this isn't supported.

If you want to use Java 17+ then there is an issue these versions of Java, caused by the Java developers changing the JVM functionality, that requires the use of the "add-opens" option to fix the "DNS SPI" issue.

If speeds vary then that is most likely nothing to do with Java/BiglyBT version but rather something else on your system (e.g. firewall)

@Pandoriaantje
Copy link

Pandoriaantje commented Jul 16, 2023

So i'm running windows 11, java 20 (Azul build).

modifying java.vmoptions withing "AppData\Roaming\BiglyBT" as i've seen suggested has no effect.

screenshot

I just can't get rid of the error.

@MelchiorGaspar
Copy link
Author

@Pandoriaantje
BiglyBT is only supports Java 8 from
https://www.java.com/en/download/manual.jsp
so Java versions from
https://bell-sw.com/pages/downloads/
do not work with BiglyBT... :( ooh well..

your comment is different from my issue..
please create a new issue ticket.

@Pandoriaantje
Copy link

Pandoriaantje commented Jul 29, 2023

It is the exact same issue. I'm also getting the same error message.

Failed to install DNS manager
This will impact functions such as forced DNS resolution prevention with SOCKS
Error: DNS SPI not loaded

I was also getting an error trying from commandline but that was user error, and only noticed after posting. So i edited/removed that from my previous post. So adding the 'fix' through commandline gets rid of the error, but I was under the impression it could be added to java.vmoptions also.

As mentioned at https://github.com/BiglySoftware/BiglyBT/wiki/Java-Versions
The workaround is to add --add-opens java.base/java.net=ALL-UNNAMED to the commandline. The page also mentions In the future the BiglyBT launcher may be updated to do this..

Why has this not been implemented yet? and why can we not just add the fix to the .vmoptions file?

at the same page, there is also mention of the fact that Java version 18 (and up, I assume) re-introduced the ability to officially add a DNS service provider. So why cling to an old and deprecated Java version? Why not update the code and change the Java version requirement to v18+?

On A personal note, this is why I despise projects of this magnitude being a Java project... Things break al the time. App 'A' needs java version XXX, app 'B' needs version XXX... dependency and compatibility hell... Not to mention The Java GUI frameworks... even a simple Double click on a column divider to auto adjust column size doesn't work.
No offence to the Dev and with all due respect (as a solo dev). BiglyBT seemed so promising, as a (one of the most) feature rich BT client(s), but for me it has been mostly a source of frustration.

@parg
Copy link
Contributor

parg commented Jul 31, 2023

Indeed, it is all a pain in the arse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants