Jump to content

java.net.UnknownHostException: libraries.minecraft.net


Dyp1xy

Recommended Posts

Downloading library from https://libraries.minecraft.net/commons-io/commons-io/2.4/commons-io-2.4.jar
java.net.UnknownHostException: libraries.minecraft.net
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:560)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:666)
at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:178)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:531)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:636)
at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:378)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1241)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1127)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1661)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1585)
at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308)
at net.minecraftforge.installer.DownloadUtils.getConnection(DownloadUtils.java:243)
at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:184)
at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:174)
at net.minecraftforge.installer.DownloadUtils.downloadLibrary(DownloadUtils.java:159)
at net.minecraftforge.installer.actions.Action.downloadLibraries(Action.java:89)
at net.minecraftforge.installer.actions.ServerInstall.run(ServerInstall.java:114)
at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:128)

forge-1.19.2-43.2.4-installer, i did something wrong? i strongly believe that the problem is the minecraft site this time, but did not found anything supporting this view

Link to comment
Share on other sites

In order to root out one of the more common issues, we'll need to see your hosts file. Here's the steps to getting this file.

1) Press the Win + R key on your keyboard.

2) Paste the following into the prompt that opens: notepad %windir%\system32\drivers\etc\hosts

3) Use Ctrl+A to select everything in the file, then Ctrl+C into the textbox to post to this thread.

Link to comment
Share on other sites

Just now, ChampionAsh5357 said:

Isn't your host address supposed to be 127.0.0.1?

i think it's because 127.0.0.1 is reserved for loopback only, gonna change it real quick and see if there's a difference

ย 

edit: nop, no difference, same error tho

Edited by Dyp1xy
Link to comment
Share on other sites

$ ping libraries.minecraft.net
ping: libraries.minecraft.net: Name or service not known

but

ping minecraft.net
PING minecraft.net (108.158.145.65) 56(84) bytes of data.
64 bytes from server-108-158-145-65.gru3.r.cloudfront.net (108.158.145.65): icmp_seq=1 ttl=247 time=11.1 ms
64 bytes from 65.145.158.108.in-addr.arpa (108.158.145.65): icmp_seq=2 ttl=247 time=11.4 ms

ย 

Link to comment
Share on other sites

i disabled ipv6 and tried, same error, then forced ipv4 with "IPV4 is required for this connection" option, nothing changed. I strongly believe my network or my pc is causing it, gonna try it on another pc on the same network and see the result

Edited by Dyp1xy
Link to comment
Share on other sites

Just now, ChampionAsh5357 said:

Currently throwing this over to the discord to see if they have any new ideas since I've run out. One of them suggested seeing if your Java version is out of date (e.g. at least latest Java 8 for the launcher, but recommended Java 17 since that's what 1.19.2 uses).

First thing i tried, using openjdk 19 and 8, gonna try openjdk 17 and see if there's any difference, this is kinda frustrating, i searched the error and tried a lot of things, including changing environmental variables of HOSTNAME and all, i have no idea what the fuck is the problem and already has passed 9 days (not full time trying to solve but still annoying).

Link to comment
Share on other sites

Just now, Dyp1xy said:

nop, tried with openjdk 11, 17, 8 and 19, i think it could be my router for some reason blocking the connection

ย 

btw, it's not OS problem, i tried on the Windows i have on dual boot

Edited by Dyp1xy
Link to comment
Share on other sites

Ok i have no idea what is the problem tbh, but i found a solution that i should had done earlier, i connected to a VPN and tried again, everything worked, server successfully installed.

i thought it could be regional block, but i reside in Brazil, maybe problem is the mirror?

Edited by Dyp1xy
Link to comment
Share on other sites

9 minutes ago, Dyp1xy said:

i thought it could be regional block, but i reside in Brazil, maybe problem is the mirror?

Potentially? Though usually the vpn infers there's something wrong with the traffic between the two, so I don't know. You would need to verify that the network isn't the issue using a separate network before then.

  • Like 1
Link to comment
Share on other sites

16 hours ago, ChampionAsh5357 said:

Potentially? Though usually the vpn infers there's something wrong with the traffic between the two, so I don't know. You would need to verify that the network isn't the issue using a separate network before then.

yeah, words cannot describe my confusion, i tested installing on a pc in my workplace, two blocks away, and works fine, my router fucked up? idk, just in case it happens to future people:

ย 

use a vpn to install, and stop using when you start the server.

Link to comment
Share on other sites

  • 4 months later...

HI there! I know this is a dead thread, but I wanted to throw in my 2 cents since this is the thread which popped up when i searched for the issue.ย 

I was having this exact issue- unable to download a file via the launcher, cant ping libraries.minecraft.net, but could ping minecraft.net.

Turns out the DNS server my computer was automagically getting assigned was borked. What fixed it was:

  1. going to my 'network connections' in control panel
  2. right clicking the adapter I'm using (wifi, in my case), and selecting properties
  3. click the IPV4 property, then select the properties button
  4. In this screen, select the 'use the following DNS server addresses' radio button, then enter the following 2 DNS server IDs without the quotes
    1. ย  ย  ย "1.1.1.1" - thats the BetterDNS IP
    2. ย  ย  ย "8.8.8.8" - thats Google's DNS address
  5. after applying these settings, i was immediately able to ping libraries.minecraft.net, and the launcher could download all necessary files to launch mincraft, and the forge version i wanted

ย 

eklztwj.png0e2AVU2.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • https://pastebin.com/VwpAW6PX My game crashes upon launch when trying to implement the Oculus mod to this mod compilation, above is the crash report, I do not know where to begin to attempt to fix this issue and require assistance.
    • https://youtube.com/shorts/gqLTSMymgUg?si=5QOeSvA4TTs-bL46
    • CubeHaven is a SMP server with unique features that can't be found on the majority of other servers! Java: MC.CUBEHAVEN.NET Bedrock: MC.CUBEHAVEN.NET:19132 3 different stores: - CubeHaven Store: Our store to purchase using real money. - Bitcoin Store: Store for Bitcoin. Bitcoin can be earned from playing the server. Giving options for players if they want to spend real money or grind to obtain exclusive packages. - Black Market: A hidden store for trading that operates outside our traditional stores, like custom enchantments, exclusive items and more. Some of our features include: Rank Up: Progress through different ranks to unlock new privileges and perks. ๐Ÿ“ˆ Skills: RPG-style skill system that enhances your gaming experience! ๐ŸŽฎ Leaderboards: Compete and shine! Top players are rewarded weekly! ๐Ÿ† Random Teleporter: Travel instantly across different worlds with a click! ๐ŸŒ Custom World Generation: Beautifully generated world. ๐ŸŒ Dungeons: Explore challenging and rewarding dungeons filled with treasures and monsters. ๐Ÿฐ Kits: Unlock ranks and gain access to various kits. ๐Ÿ› ๏ธ Fishing Tournament: Compete in a friendly fishing tournament! ๐ŸŽฃ Chat Games: Enjoy games right within the chat! ๐ŸŽฒ Minions: Get some help from your loyal minions. ๐Ÿ‘ฅ Piรฑata Party: Enjoy a festive party with Piรฑatas! ๐ŸŽ‰ Quests: Over 1000 quests that you can complete! ๐Ÿ“œ Bounty Hunter: Set a bounty on a player's head. ๐Ÿ’ฐ Tags: Displayed on nametags, in the tab list, and in chat. ๐Ÿท๏ธ Coinflip: Bet with other players on coin toss outcomes, victory, or defeat! ๐ŸŸข Invisible & Glowing Frames: Hide your frames for a cleaner look or apply a glow to it for a beautiful look. ๐Ÿ”ฒโœจ[ Player Warp: Set your own warp points for other players to teleport to. ๐ŸŒŸ Display Shop: Create your own shop and sell to other players! ๐Ÿ›’ Item Skins: Customize your items with unique skins. ๐ŸŽจ Pets: Your cute loyal companion to follow you wherever you go! ๐Ÿพ Cosmetics: Enhance the look of your character with beautiful cosmetics! ๐Ÿ’„ XP-Bottle: Store your exp safely in a bottle for later use! ๐Ÿถ Chest & Inventory Sorting: Keep your items neatly sorted in your inventory or chest! ๐Ÿ“ฆ Glowing: Stand out from other players with a colorful glow! โœจ Player Particles: Over 100 unique particle effects to show off. ๐ŸŽ‡ Portable Inventories: Over virtual inventories with ease. ๐Ÿงณ And a lot more! Become part of our growing community today! Discord:ย https://cubehaven.net/discord Java: MC.CUBEHAVEN.NET Bedrock: MC.CUBEHAVEN.NET:19132
    • # Problematic frame: # C [libopenal.so+0x9fb4d] It is always the same issue - this refers to the Linux OS - so your system may prevent Java from working ย  I am not familiar with Linux - check for similar/related issues ย 
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.