'getting 'internet not reachable' with sdkman
Internet is working fine, but I'm getting this error from sdkman:
06:47 $ sdk version
==== INTERNET NOT REACHABLE! ===============================
Some functionality is disabled or only partially available.
If this persists, please enable the offline mode:
$ sdk offline
============================================================
SDKMAN 4.0.35
My DNS does seem to be resolving very slowly. I can ping, but the resolution takes ~7 seconds. Could that be causing sdkman to time out?
Any thoughts? what's the next step towards debugging? Thanks!
Solution 1:[1]
you need to set the curl connect timeout and curl max time in the config file which is allocated in the following path :
$YOUR_HOME/.sdkman/etc/config
to the following :
sdkman_curl_connect_timeout=20
sdkman_curl_max_time=0
i hope this will help you
Solution 2:[2]
Well, I had to struggle to get SDKMAN let me download packages. I am behind a Corporate proxy and use CNTLM to work around it on my local machine.
I had to edit a file of sdkman on my local machine after downloading it.
Downloading was a thing too. For me adding the -x http://localhost:3128 to the curl command worked. Steps i took to get gradle installed:
- I downloaded the install script and stored it in a /tmp folder.
- Adjusted the installscript and added the extra parameter to the curl command. Now I could see the tool getting downloaded and installed in the $HOME/.sdkman dir.
- After that I had to run sdkman-init.sh
- Then I had to edit the .sdkman/src/sdkman-utils.sh and added the -x option to every line where curl was called.
That did the trick. Remember to close the terminal and open a new one after each step.
Solution 3:[3]
Different applications use different settings to establish network connection.
In my case(I access the internet through a proxy using Macbook Pro), although I had set http and https proxy in System Preferences->Network->Advanced->Proxies. It did take effect for browser(Safari), but not for sdkman command line tool.
I have to set environment variables http_proxy and https_proxy manually.
Below is what I set on my Macbook Pro.
export http_proxy=http://proxy.abc.com:2500
export https_proxy=https://proxy.abc.com:2500
Then sdkman works fine.
Solution 4:[4]
Fix was a two-step process for me:
- Set the executable bit on
sdkman-init.sh(chmod +x .sdkman/bin/sdkman-init.sh) - Modify
~/sdkman/etc/config, set
sdkman_curl_connect_timeout=30
sdkman_curl_max_time=50
And don't forget to restart the terminal.
Solution 5:[5]
I got the same issue (being behind a corporate proxy).
In my case, http_proxy as well as https_proxy environment variable was set.
Interestingly, most distros don't compile openssl with (rather uncommon) https_proxy support and therefore curl fails:
curl https://www.google.com
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to proxy.company.com:3128
Solution for my problem:
unset https_proxy
After unsetting https_proxy, curl and sdkman (because they seem to use openssl) both worked out of the box.
Solution 6:[6]
Try
sdkman_insecure_ssl=true in .sdkman/etc/config
Solution 7:[7]
Looks like it's working now ... maybe an issue on the server side? Or maybe an intermittent networking issue on my side. Anyhow, next crisis ... :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mohammad Salem |
| Solution 2 | YVrancken |
| Solution 3 | cmoaciopm |
| Solution 4 | argoden |
| Solution 5 | MRalwasser |
| Solution 6 | Syscall |
| Solution 7 | ether_joe |
