6

Getting net.java.dev.jna jna 3.2.3 ... You probably access the destination server through a proxy server that is not well configured. You probably access the destination server through a proxy server that is not well configured. You probably access the destination server through a proxy server that is not well configured.

:: problems summary :: :::: WARNINGS Host repo.typesafe.com not found. url=http://repo.typesafe.com/typesafe/ivy-releases/net.java.dev.jna/jna/3.2.3/ivys/ivy.xml

Host repo1.maven.org not found. url=http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.2.3/jna-3.2.3.pom

Host oss.sonatype.org not found. url=https://oss.sonatype.org/content/repositories/snapshots/net/java/dev/jna/jna/3.2.3/jna-3.2.3.pom

    module not found: net.java.dev.jna#jna;3.2.3

==== local: tried

  /root/.ivy2/local/net.java.dev.jna/jna/3.2.3/ivys/ivy.xml

==== typesafe-ivy-releases: tried

  http://repo.typesafe.com/typesafe/ivy-releases/net.java.dev.jna/jna/3.2.3/ivys/ivy.xml

==== Maven Central: tried

  http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.2.3/jna-3.2.3.pom

==== sonatype-snapshots: tried

  https://oss.sonatype.org/content/repositories/snapshots/net/java/dev/jna/jna/3.2.3/jna-3.2.3.pom

    ::::::::::::::::::::::::::::::::::::::::::::::

    ::          UNRESOLVED DEPENDENCIES         ::

    ::::::::::::::::::::::::::::::::::::::::::::::

    :: net.java.dev.jna#jna;3.2.3: not found

    ::::::::::::::::::::::::::::::::::::::::::::::

:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS unresolved dependency: net.java.dev.jna#jna;3.2.3: not found Error during sbt execution: Error retrieving required libraries (see /root/.sbt/boot/update.log for complete log) Error: Could not retrieve jna 3.2.3

user3733525
  • 231
  • 1
  • 3
  • 5

4 Answers4

5

I think the answer is found in the log:

You probably access the destination server through a proxy server that is not well configured.

If you can use another proxy server you can set it in the sbt start script:

-Dhttp.proxyHost=<proxy> -Dhttp.proxyPort=<port>
Christian
  • 4,543
  • 1
  • 22
  • 31
  • 3
    I figured the problem by setting environment variables, both http_proxy and https_proxy. – user3733525 Jun 23 '14 at 03:55
  • That's another possibility, yes. But if you need the proxy only for sbt, you can configure it in the sbt script (as shown above). – Christian Jun 23 '14 at 08:53
  • Hi @Christian, I have the same problem here. but I don't have any valid proxyHost and proxyPort. How can I solve it? I have also asked the same question [here](https://stackoverflow.com/questions/57744072/how-to-run-scala-code-in-spark-container-using-docker) !? – Mostafa Ghadimi Sep 03 '19 at 10:59
  • If I understand correctly, you don't know the proxyHost you have to set? – Christian Sep 05 '19 at 07:38
5

For me, this problem was caused by a temporary issue with our company's DNS server. I mention this only because this question is one of the top results when searching online for the above error message.

Dylan Nissley
  • 594
  • 1
  • 5
  • 12
  • Hi Dylan, I still have problem. I have configured the command with one of proxy which exists on [this site](https://free-proxy-list.net/). But it doesn't solve my problem. I don't know what to do. Would you please guide me to solve my problem? [my stackoverflow question](https://stackoverflow.com/questions/57744072/how-to-run-scala-code-in-spark-container-using-docker) and [my github issue](https://github.com/sindbach/mongodb-spark-docker/issues/5) – Mostafa Ghadimi Sep 03 '19 at 11:55
2

In WINDOWS environment, simply add following line in the sbt/conf/sbtconfig.txt

-Dhttp.proxyHost=PROXYHOST 
-Dhttp.proxyPort=PROXYPORT 
-Dhttp.proxyUser=USERNAME 
-Dhttp.proxyPassword=XXXX

or the Https equivalent

-Dhttps.proxyHost=PROXYHOST 
-Dhttps.proxyPort=PROXYPORT 
-Dhttps.proxyUser=USERNAME 
-Dhttps.proxyPassword=XXXX

or simply set following variable on dos command prompt

set JAVA_OPTS=-Dhttp.proxyHost=XXXXXXX -Dhttp.proxyPort=YYYY -Dhttp.proxySet=true -Dhttps.proxyHost=XXXXXXX -Dhttps.proxyPort=YYYY -Dhttps.proxySet=true
Girdhar Singh Rathore
  • 5,030
  • 7
  • 49
  • 67
  • 1
    set JAVA_OPTS=-Dhttp.proxyHost=XXXXXXX -Dhttp.proxyPort=YYYY -Dhttp.proxySet=true -Dhttps.proxyHost=XXXXXXX -Dhttps.proxyPort=YYYY -Dhttps.proxySet=true works fine thanks – Haider Raza Sep 14 '17 at 07:39
  • I still have problem. I have configured the command with one of proxy which exists on [this site](https://free-proxy-list.net/). But it doesn't solve my problem. I don't know what to do. Would you please guide me to solve my problem? [my stackoverflow question](https://stackoverflow.com/questions/57744072/how-to-run-scala-code-in-spark-container-using-docker) and [my github issue](https://github.com/sindbach/mongodb-spark-docker/issues/5) – Mostafa Ghadimi Sep 03 '19 at 11:55
0

Just change the web location http to https in ivysettings.xml file.

Adam Bardon
  • 3,829
  • 7
  • 38
  • 73
Jobu J
  • 11
  • 2