Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting 'internet not reachable' with sdkman

Tags:

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!

like image 834
ether_joe Avatar asked May 12 '16 13:05

ether_joe


2 Answers

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

like image 193
Mohammad Salem Avatar answered Oct 08 '22 11:10

Mohammad Salem


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.

like image 37
YVrancken Avatar answered Oct 08 '22 11:10

YVrancken