I am trying out Lagom from Lightbend, using the my-first-system template from the GettingStarted page.
I am on Windows 10, and behind a corporate proxy.
Activator fails to download some dependencies due to missing credentials for the proxy. I have set the HTTP_PROXY environment variable.
The following error is reported by activator:
[info] Updating {file:/E:/Projects/LagomHelloWorld/my-first-system/project/}my-first-system-build...
[info] Resolving com.lightbend.lagom#lagom-sbt-plugin;1.0.0 ...
[error] Server access Error: Connection timed out: connect url=https://repo.typesafe.com/typesafe/ivy-releases/com.lightbend.lagom/lagom-sbt-plugin/scala_2.10/sbt_0.13/1.0.0/ivys/ivy.xml
[error] Server access Error: Connection timed out: connect url=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.lightbend.lagom/lagom-sbt-plugin/scala_2.10/sbt_0.13/1.0.0/ivys/ivy.xml
[error] Server access Error: Connection timed out: connect url=https://repo1.maven.org/maven2/com/lightbend/lagom/lagom-sbt-plugin_2.10_0.13/1.0.0/lagom-sbt-plugin-1.0.0.pom
[error] Unable to find credentials for [ # <proxy-ipv4-addr> ].
[warn] module not found: com.lightbend.lagom#lagom-sbt-plugin;1.0.0
Note: The error message contains the actual IPv4 address, not the substitute I show above.
Where should I specify the user id and password for the proxy?
How can I do that in a secure way?
Activator should check for system properties, in your case
#-Dhttp.proxyUser=PUT YOUR PROXY USER HERE
#-Dhttp.proxyPassword=PUT YOUR PROXY PASSWORD HERE
in a file ~/.activator/activatorconfig.txt.
This is described in detail in the FAQ section on https://www.lightbend.com/activator/docs
Scroll down to the section "Behind a Proxy".
Related
When I run any maven command with specified http and https proxy address and port as below:
mvn <command> -Dhttps.proxyHost=<MY.PROXY.HOST.ADDRESS> -Dhttps.proxyPort=<MY_PROXY_PORT> -Dhttp.proxyHost...
It's running without any error.
I want to set those configurations as default for my STS network connections and select the manual Active Provider (see attached screenshot for my configurations),
I think it's not related to the STS versions because I faced the same problem with 3.8 and 4.6 version. Anyway, Here is my STS version
Now, when I try the same maven command without proxy and port arguments, the maven command fails due to a network connection error.
[ERROR] unable to read java.net.ConnectException: Connection timed out
I am new in ldap enviromnet and I am trying to set up the apache fortress with symas openldap (https://github.com/apache/directory-fortress-core/blob/master/README-QUICKSTART-SLAPD.md)
When I set up with ldap, all the integration tests pass succesfully but when I set the ldaps it throws an handshake error.
Does someone now where I have to set all the client and server certificates because setting up as the repository README, it is not possible.
Fixed:
Following the below answer of the creator of that project, I got the proper set up with LDAPS.
Next Problem:
But now I get an error when I run the 3rd step of Apache Fortress Rest Set Up:
mvn clean install -Dload.file=./src/main/resources/FortressRestServerPolicy.xml tomcat:deploy
error output:
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.0-beta-1:deploy (default-cli) on project fortress-rest: Cannot invoke Tomcat manager: Error writing to server -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.0-beta-1:deploy (default-cli) on project fortress-rest: Cannot invoke Tomcat manager
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke Tomcat manager
Caused by: java.io.IOException: Error writing to server
I set up in tomcat the roles and users manager-gui (which I am able to access through http and https, hostname/manager/html) and manager-script
Changing tomcat maven plugin in pom.xml, I could deploy:
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
but after I get that error...
FAIL - Deployed application at context path [/fortress-rest] but context failed to start
Any ideas what it could be?
Using TLS or LDAPS for the connection to the LDAP server does not require a client-side certificate. You will need to create a server-side cert for the LDAP host, and add that to the OpenLDAP configuration. You also must add that server's CA certificate to the Java truststore on the client-side, i.e. the fortress runtime.
For a tutorial on how to accomplish this, checkout the Apache Fortress Demo. (Note that I am the author of this demo.)
This tutorial's scope goes beyond just creating and using certificates. The specific steps you're going to be interested in are:
http://shawnmckinney.github.io/apache-fortress-demo/apidocs/doc-files/keys.html
http://shawnmckinney.github.io/apache-fortress-demo/apidocs/doc-files/hosts.html
http://shawnmckinney.github.io/apache-fortress-demo/apidocs/doc-files/openldap-ssl.html
http://shawnmckinney.github.io/apache-fortress-demo/apidocs/doc-files/apache-fortress-core-ssl.html
I am trying to run SBT example behind corporate proxy.
sbt new sbt/scala-seed.g8
I set proxy as per instructions:
export SBT_OPTS="$SBT_OPTS -Dhttp.proxyHost=myusername:mypassword#correcthost -Dhttp.proxyPort=correctport -Dhttps.proxyHost=myusername:mypassword#correcthost -Dhttps.proxyPort=correctport"
Error that is showing:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-sbt.sbt-giter8-resolver#sbt-giter8-resolver_2.12;0.1.3: public: unable to get resource for org/scala-sbt/sbt-giter8-resolver#sbt-giter8-resolver_2.12;0.1.3: res=https://repo1.maven.org/maven2/org/scala-sbt/sbt-giter8-resolver/sbt-giter8-resolver_2.12/0.1.3/sbt-giter8-resolver_2.12-0.1.3.pom: java.net.UnknownHostException: myusername:mypassword#correcthost: invalid IPv6 address
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] java.lang.RuntimeException: Retrieval of org.scala-sbt.sbt-giter8-resolver:sbt-giter8-resolver:0.1.3 failed.
Why is it throwing invalid IPv6 address error?
How to properly set proxy for SBT?
Thanks.
As far as I can tell, the -Dhttps.proxyHost=myusername:mypassword#correcthost shouldn't be formatted like that. Instead you provide the following setup in your ~/.profile and you'll have to set the variables of course:
export SBT_OPTS="-Dhttp.proxyHost=${PROXY_HOST} -Dhttp.proxyPort=${PROXY_PORT} -Dhttps.proxyHost=${PROXY_HOST} -Dhttps.proxyPort=${PROXY_PORT} -Dhttp.proxyUser=$USER -Dhttp.proxyPassword=$PASS -Dhttps.proxyUser=$USER -Dhttps.proxyPassword=$PASS"
So the user and password are provided in their own settings override (-Dhttps.proxyUser/Password).
If you are using a Proxy which requires authentication, I have a solution for you :)
SBT has a very hard time handling proxy requiring authentication. The solution is to bypass this authentication, if you cannot turn off your proxy on demand (corporate proxy for example). To do so, I suggest you use a squid proxy, and configure it with your username and password to access your corporate proxy. See : https://doc.ubuntu-fr.org/squid Then, you can set JAVA_OPTS or SBT_OPTS environment variables so that SBT connects to your own local squid proxy instead of your corporate proxy :
export JAVA_OPTS = "-Dhttps.proxyHost=localhost -Dhttps.proxyPort=3128 -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128"
(just c/c this in your bashrc without modifying anything and it should work fine).
The trick is that Squid Proxy does not require any authentication, and acts as an intermediate between SBT and your other proxy.
If you have troubles in applying this advise, please let me know.
Regards,
Edgar
I am trying to run a blank Flutter project behind a corporate proxy requiring basic authentication and self-signing HTTPS connections.
I added the necessary config in ~/.gradle/gradle.properties and in ~/.profile. I also imported my root certificate in $JAVA_HOME/jre/lib/security/cacerts and told Gradle to use it. I even tried this solution and set java.net.useSystemProxies=true in $JAVA_HOME/jre/lib/net.properties.
But, still, it doesn't build, and it asks for authentication.
flutter run
Launching lib/main.dart on Nexus 5 in debug mode...
Initializing gradle... 0.8s
Resolving dependencies...
* Error running Gradle:
Exit code 1 from: ~/GitLab/n.gendron/techno_store/android/gradlew app:properties:
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-2.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-1.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
Failed to download any source lists!
This guide helped me a lot trough this process, and this one helped me import the CA, but now I'm stuck.
Any idea?
You need in gradle/gradle.properties write:
# Project-wide Gradle settings.
...
systemProp.http.proxyHost=proxy.company.com
systemProp.http.proxyPort=443
systemProp.http.proxyUser=username
systemProp.http.proxyPassword=password
systemProp.http.auth.ntlm.domain=domain
systemProp.https.proxyHost=proxy.company.com
systemProp.https.proxyPort=443
systemProp.https.proxyUser=username
systemProp.https.proxyPassword=password
systemProp.https.auth.ntlm.domain=domain
...
Attempting to upload a binary that has passed 'validation' I get:
Communications error. Please use diagnostic mode to check connectivity. You need to have outbound access to TCP port 443
An exception has occurred: sun.security.validator.Validator.Exception: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not connect to Apple's web service
Unable to authenticate the package: 617269104.itms
Transport update failed with unexpected exception
An exception has occurred: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.ceertpath.SunCertPathBuilder\exception: unable to find valid certification path to requested target
I still have this problem despite trying all the suggestions in various similar SO threads. Running App Loader 2.9.1; Java version 7 build 1.7.0.; Yosemite beta 4; Xcode 5.1.1. Also tried all the settings in Java Control Panel General/Network Settings. All firewall ports open for outbound traffic.
Any new/further suggestions appreciated...