Closed drewhk closed 10 years ago
Please fix this issue ASAP. I work with Ericsson and thousands of developers in the company are behind the http proxy server and cannot evaluate the new tool/product that cannot support HTTP proxy. So I can only try it at home. Please fix this issue ASAP, it will help thousands of developers as well as TypeSafe.
Note: I believe someone has already issued a fix which will be included in activator 0.4. If you'd like to try it out, please checkout https://github.com/typesafehub/activator
Then run the "stage" or "dist" commands. You should have a directory/zip file you can take into work and test out. If you need any help, let me know. I'd love to know if this issue is truly fixed before we issue the 0.4 release, but I'm not 100% positive the proxy will meet your needs. E.g. I know kerberos authentication still has issues with Ivy, but I'm not positive that would affect the Amazon S3 client.
I ran into a little trouble with this as to run the latest version of activator you need sbt. sbt also requires you to setup appropriate proxy settings.... So im in a bit of a circular problem really.
Technically, activator is sbt with a GUI (and always has been). You can use activator to build activator (as it'll just use sbt). Let me know what issues you're running into. and I can try to fix it. In particular, if you're building activator via the command line, the proxy settings should work now, however you'll have to pass the -Dhttp.proxy*=?
settings directly to the activator script. You'll also have to build with the command line.
The instructions for configuring "trunk" activator are going onto typesafe.com with the next release, but I'm including them here for folks who want to build and try it out.
sbt> stage
On windows you'll see a chmod failure, ignore itcd dist/target/stage/bin
./activator ui
When running activator behind a proxy, some additional configuration is needed. First, we need to open the activator configuration file, found in your user home directory under ~/.activator/activatorconfig.txt
. Note that this file may not exist. Once you have the file open and ready to configure, we need to make sure it has the following lines:
# This are the proxy settings we use for activator
-Dhttp.proxyHost=PUT YOUR PROXY HOST HERE
-Dhttp.proxyPort=PUT YOUR PROXY PORT HERE
# Here we configure the hosts which should not go through the proxy. You should include your private network, if applicable.
-Dhttp.nonProxyHosts="localhost|127.0.0.1"
# These are commented out, but if you need to use authentication for your proxy, please fill these out.
#-Dhttp.proxyUser=PUT YOUR PROXY USER HERE
#-Dhttp.proxyPassword=PUT YOUR PROXY PASSWORD HERE
Thanks for the detailed info on this. Unfortunately my company's proxy settings are actually embedded somewhere in a really long script. I'm not sure of any other way to find them out other than have a dig around in the script.
@georgiknox Do you run into the issue when using vanilla java HTTP requests? If not, there must be configuration somewhere that we could access. If you could ping your IT department to find out what they do, that would certainly help us. There's not a lot we can do for custom scripts. At some point someone needs to configure the proxy, but maybe they're using a standard mechanism we can draw in.
I clone the source code from master 1-2 days ago and did a 'stb stage' and run it on Windows7. I created the config file as instructed and initial download was successful - the proxy is working! But it run into error. See log below.
c:\tool\activator\dist\target\stage>activator.bat ui Found previous process id: 9068 Play server process ID is 7932 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/ekinhua/.sbt/boot/scala-2.10.2/com.t ypesafe.activator/activator-ui/1.0-f7876b93e25ac2c447093ed7a553146aa207265f/logb ack-classic-1.0.7.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/ekinhua/.sbt/boot/scala-2.10.2/com.t ypesafe.activator/activator-ui/1.0-f7876b93e25ac2c447093ed7a553146aa207265f/slf4 j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorSta ticBinder] [info] play - Application started (Prod) [info] play - Listening for HTTP on /127.0.0.1:8888 [error] application -
! @6fg0popa2 - Internal server error, for (GET) [/home] ->
play.api.Application$$anon$1: Execution exception[[AskTimeoutException: Timed ou t]] at play.api.Application$class.handleError(Application.scala:289) ~[play 2.10-2.1.2.jar:2.1.2] at play.api.DefaultApplication.handleError(Application.scala:383) [play
Hi georgiknox, my company also use script to set the proxy. You can open the script file and find the line that can tell the proxy server by looking for the pattern 'PROXY yourproxyserver:port' in the file.
I startup as follows (this is nth time I am trying activator, things like this keeps me away from not trying typesafe, sorry)
./activator -Dhttp.proxyHost="10.x.y.z" -Dhttp.proxyPort="9090" -Dhttp.nonProxyHosts="localhost|127.0.0.1" ui
Found previous process id: 29011 FOUND REPO = activator-local @ file:/home/userRaj/programs/typesafe/activator-1.0.11/repository Play server process ID is 29179 [info] play - Application started (Prod) [info] play - Listening for HTTP on /127.0.0.1:8888 [error] application -
! @6h754lh0n - Internal server error, for (GET) [/home] ->
play.api.Application$$anon$1: Execution exception[[AskTimeoutException: Timed out]] at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10-2.2.1.jar:2.2.1] at play.api.DefaultApplication.handleError(Application.scala:399) [play_2.10-2.2.1.jar:2.2.1] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:165) [play_2.10-2.2.1.jar:2.2.1] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:162) [play_2.10-2.2.1.jar:2.2.1] at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) [scala-library.jar:0.13.0] at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185) [scala-library.jar:0.13.0] akka.pattern.AskTimeoutException: Timed out at akka.pattern.PromiseActorRef$$anonfun$1.apply$mcV$sp(AskSupport.scala:334) ~[akka-actor_2.10-2.2.0.jar:2.2.0] at akka.actor.Scheduler$$anon$11.run(Scheduler.scala:118) ~[akka-actor_2.10-2.2.0.jar:2.2.0] at scala.concurrent.Future$InternalCallbackExecutor$.scala$concurrent$Future$InternalCallbackExecutor$$unbatchedExecute(Future.scala:782) ~[scala-library.jar:na] at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:779) ~[scala-library.jar:na] at akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(Scheduler.scala:455) ~[akka-actor_2.10-2.2.0.jar:2.2.0] at akka.actor.LightArrayRevolverScheduler$$anon$12.executeBucket$1(Scheduler.scala:407) ~[akka-actor_2.10-2.2.0.jar:2.2.0] ^X[error] application -
It looks like Activator is using an existing process instead of creating a new one. Make sure that you kill all of the existing ones and then run that command again. Let me know if that helps.
Thanks for quick reply, I am impressed! I ran = ps -afew | grep activator = I do not see anything
Same error, I tried again FOUND REPO = activator-local @ file:/home/rpradeshik/programs/typesafe/activator-1.0.11/repository Play server process ID is 30082 [info] play - Application started (Prod) [info] play - Listening for HTTP on /127.0.0.1:8888 [error] application -
! @6h7595e89 - Internal server error, for (GET) [/home] ->
play.api.Application$$anon$1: Execution exception[[AskTimeoutException: Timed out]] at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10-2.2.1.jar:2.2.1]
You didn't get a Found previous process id
message that time?
Also, they way I find Java processes (like the activator
one) is with ps auxwww|grep java
.
Using ~/.activator/activatorconfig.txt
didn't work for me? Should it be the version folders? Because what I currently have in ~/.activator/
is as follows:
$ ls -1 .activator
1.0
1.1.3
activatorconfig.txt
And when I run ./activator ui it seems that the config file doesn't get honored. However passing proxy arguments via cli works fine. So should I make an alias for this until things get sorted out?
Right now I think it is ~/.activator/<VERSION>/activatorconfig.txt
; making it unversioned would make sense we think but we haven't done it yet. cc @henrikengstrom to correct me if required.
On Windows7: %USERPROFILE%.activator\
Don't know how to have multiple nonproxyhosts (| , ; and space do not work) ! is password is not OK
1. Using activatorconfig.txt file
# This are the proxy settings we use for activator
-Dhttp.proxyHost=PUT YOUR PROXY HOST HERE
-Dhttp.proxyPort=PUT YOUR PROXY PORT HERE
# Here we configure the hosts which should not go through the proxy. You should include your private network, if applicable.
-Dhttp.nonProxyHosts="localhost|127.0.0.1"
# These are commented out, but if you need to use authentication for your proxy, please fill these out.
#-Dhttp.proxyUser=PUT YOUR PROXY USER HERE
#-Dhttp.proxyPassword=PUT YOUR PROXY PASSWORD HERE
2. Changing activator.bat
set HTTP_PROXY=http://<PUT YOUR PROXY HOST HERE>:<PUT YOUR PROXY PORT HERE>
set HTTPS_PROXY=https://<PUT YOUR PROXY HOST HERE>:<PUT YOUR PROXY PORT HERE>
I have set HTTP_PROXY
then run activator run
, it seems the activator
does not read the HTTP proxy settings by default.
As reported by user:
"On Windows, setting the variables below did not help.
set JAVA_OPTS=-Dhttp.proxyHost=x.y.com -Dhttp.proxyPort=8080 set SBT_OPTS=-Dhttp.proxyHost=x.y.com -Dhttp.proxyPort=8080
Neither parameter affects the sbt-child's java params.