Why is UnknownHostException: downloads.typesafe.com when running activator ui? - typesafe-activator

I am getting the following exception after starting activator ui from command line.
Checking for a newer version of Activator (current version 1.2.2)...
... our current version 1.2.2 looks like the latest.
Found previous process id: 2988
FOUND REPO = activator-local # file:////C:/shakti/scala/typesafe-activator-1.2.2
/activator-1.2.2/repository
Play server process ID is 5712
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /127.0.0.1:8888
[ERROR] [06/15/2014 05:46:13.851] [default-akka.actor.default-dispatcher-3] [ActorSystem(default)] Failed to download http://downloads.typesafe.com/typesafe-activator/index/v2/index-07064250cfd1cc2444f19c731541332ccf93bc13.zip: sbt.TranslatedIOException: Error opening http://downloads.typesafe.com/typesafe-activator/index/v2/index-07064250cfd1cc2444f19c731541332ccf93bc13.zip: java.net.UnknownHostException: downloads.typesafe.com
[INFO] [06/15/2014 05:46:13.860] [default-akka.actor.default-dispatcher-3] [akka://default/user/template-cache] Unable to check remote server for template updates.
[INFO] [06/15/2014 05:46:19.155] [default-akka.actor.default-dispatcher-2] [akka://default/user/home-socket-1] Firing up web socket
What could be the reason and how to fix it?

Seems it was an intermittent issue due to some network problem. It is working fine now.

I resolve this prolem using ./activator ui instead using activator ui on linux

Related

Why does cancelling my running akka quickstart example app throw a java error?

When I hit control-C to cancel my running akka quickstart app I get the following error.
Is this normal or is there an akka config that can avoid this?
Can someone explain why this occurs?
sbt:akka-quickstart-scala> exit
[info] shutting down sbt server
[warn] Run canceled.
Exception in thread "sbt-bg-threads-1" java.util.concurrent.RejectedExecutionException
at java.util.concurrent.ForkJoinPool.externalSubmit(ForkJoinPool.java:2328)
at java.util.concurrent.ForkJoinPool.externalPush(ForkJoinPool.java:2419)
at java.util.concurrent.ForkJoinPool.execute(ForkJoinPool.java:2648)
at scala.concurrent.impl.ExecutionContextImpl.execute(ExecutionContextImpl.scala:24)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.$anonfun$cleanup$1(DefaultBackgroundJobService.scala:390)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.$anonfun$cleanup$1$adapted(DefaultBackgroundJobService.scala:389)
at scala.collection.immutable.List.foreach(List.scala:392)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.cleanup(DefaultBackgroundJobService.scala:389)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:359)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
This is a known issue that can be seen in this github issue link.
In my case, When I upgraded my sbt to 1.3.3, same issue cropped up, my akka code was not getting closed using CTRL+C when launched by sbt run. It only logs a warning message and does not stop. So, I had to downgrade the sbt version from 1.3.3 to 1.2.8 to make it work.
Please let me know if it helps!!

sbt server fails to start throwing error 231

When I am trying to start sbt, it fails throwing an IO exception.
Version of SBT - 1.1.2
Version of Scala - 2.12.6
Error:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading project definition from C:\Users\username\IdeaProjects\projectname\project
[info] Loading settings from build.sbt ...
[info] Set current project to example (in build file:/C:/Users/username/IdeaProjects/projectname/)
[error] server failed to start on local:sbt-server-ad238fc8ee352b69065c. java.io.IOException: Could not create lock for
\\.\pipe\sbt-server-ad238fc8ee352b69065c_lock, error 231
Analysing the source of the throw it seems error code 231 refers to Windows error:
ERROR_PIPE_BUSY
231 (0xE7)
All pipe instances are busy.
The pipe cannot be accessed because another process is using it, so try closing down IntelliJ and any other SBT server running, and try again later. Perhaps even reboot the machine, and then start a single system SBT server (not IntelliJ), and see if the issue persists.

SAP WEB IDE Error when building application

In SAP WEB IDE I'm building my project (Right-Clck + Build).
This was working correctly but now it's erroring with:
4​:43:07 PM (Build) Build started. 4:43:10 PM (DIBuild) Build of /rsa-complete-survey in progress 4:43:11 PM (DIBuild) [INFO] Retrieving source code
[INFO] Preparing node environment
[INFO] package.json not modified, skipping npm installation
[INFO] Using recently cached node_modules
[INFO] Node environment ready
4:43:15 PM (DIBuild) grunt-cli: The grunt command line interface (v1.2.0)
Fatal error: Unable to find local grunt.
If you're seeing this message, grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,
please see the Getting Started guide:
http://gruntjs.com/getting-started
[INFO] Build finished in 4 seconds
Any ideas?
Should to be a temporary problem. Others are reporting similar issues as well. To join the discussion, click here to get invited and visit the channel #sapwebide.

Scala Play SBT is timing out [duplicate]

I am starting the the application from the command line using either
activator run
activator ~run
or after I start the activator console I use run or ~run.
everything seems to work and it gives the expected
--- (Running the application, auto-reloading is enabled) ---
play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
I can view the application in the browser and I can make changes in the code and they are reloaded just fine. the issue is that after only a couple minutes it seems like something "times-out" because if I try to reload after this the browser just sits there spinning.
if i let it spin long enough I get.
[error] application -
[info]
[info] ! Internal server error, for (GET) [/] ->
[info]
[info] java.util.concurrent.TimeoutException: Futures timed out after [300000 milliseconds]
[info] at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219) ~[scala-library-2.11.1.jar:na]
[info] at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223) ~[scala-library-2.11.1.jar:na]
[info] at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:111) ~[scala-library-2.11.1.jar:na]
[info] at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53) ~[scala-library-2.11.1.jar:na]
[info] at scala.concurrent.Await$.result(package.scala:111) ~[scala-library-2.11.1.jar:na]
I would really appreciate any help. Since having to restart the app all over again each time I make a change really takes away the appeal of the framework.
I upgraded to activator 1.3.2 with Play 2.3.9 and I also had the same issue. It drove me nuts. I found that the cause was the new set "fork in run" setting added in activator 1.3.2.
Open up build.sbt and you will find :
fork in run := true
Set this to false as follows :
fork in run := false
Running activator start or better sbt start fixes the issue as well without having to remove the forking behavior.

Deploying Play Framework 2.3.x (Java style) on Ubuntu 14.04 production server

I have a Play application on my laptop, which I am trying to get running on my production server. Locally the application compiles and works without errors.
On my production server, I do the following:
root#example:~/mysite# ./activator
[info] Loading project definition from home/mysite/project
[info] Set current project to mysite (in build file:/home/mysite/)
[mysite] $ ~run
--- (Running the application, auto-reloading is enabled) ---
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
[info] Compiling 4 Scala sources and 2 Java sources to /home/mysite/target/scala-2.11/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.11.1. Compiling...
Killed
root#example:~/mysite#
As you can see, `compiler-interface' is not yet compiled. I am wondering why this is. Is this because I don't have the Scala compiler installed?
Probably the Killed part is because you don't have enough memory to compile your application.
Either way I think it would be better to deploy your app already compiled than compile it on place. You can do that using ./activator dist.
This will generate a zip file in YOUR_PROJECT_DIR/target/universal named YOUR-PROJECT-NAME-VERSION.zip with everything already compiled and with every needed dependency packaged already. You can then upload this file to somewhere in your production server, extract it and then start the server using
$ EXTRACTED_FOLDER/bin/YOUR-APP-NAME
If you still want to build it in your production server, try to reduce the memory used by activator using
$ ./activator -mem 200 # MAX 200mb
// (...)
[PROJECT-NAME] ~start
Note that ~run will start your server in dev mode (ie sensible information like stacktraces etc can be shown on error) and recompile it on changes, so you may want to use start or ~start instead.