0

H Friends,

the command "activator ui" it downloaded a lot of files finally it throws some exception. PFB of the error

Error Message:
======================================================
https://repo.typesafe.com/typesafe/releases/com/typesafe/sbt/client-all-2-11/0.3.5/client-all-2-11-0.3.5.jar ..
        [SUCCESSFUL ] com.typesafe.sbt#client-all-2-11;0.3.5!client-all-2-11.jar (10156ms)
:: retrieving :: org.scala-sbt#boot-app
        confs: [default]
        91 artifacts copied, 0 already retrieved (79872kB/287ms)
Local repository: activator-launcher-local @ file:////C:/Users/xxx/activator-1.3.6-minimal/repository
Play server process ID is 6124
[info] play - Application started (Prod)
Oops, cannot start the server.
org.jboss.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:8888
        at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
        at play.core.server.NettyServer$$anonfun$8.apply(NettyServer.scala:138)
        at play.core.server.NettyServer$$anonfun$8.apply(NettyServer.scala:135)
        at scala.Option.map(Option.scala:146)
        at play.core.server.NettyServer.<init>(NettyServer.scala:135)
        at play.core.server.NettyServer$.createServer(NettyServer.scala:252)
        at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:289)
        at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:284)
        at scala.Option.map(Option.scala:146)
        at play.core.server.NettyServer$.main(NettyServer.scala:284)
        at activator.UIMain$$anonfun$run$1.apply$mcV$sp(UIMain.scala:106)
        at activator.UIMain$$anonfun$run$1.apply(UIMain.scala:106)
        at activator.UIMain$$anonfun$run$1.apply(UIMain.scala:106)
        at activator.UIMain.withContextClassloader(UIMain.scala:217)
        at activator.UIMain.run(UIMain.scala:106)
        at activator.UIMain.run(UIMain.scala:86)
        at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
        at xsbt.boot.Launch$.run(Launch.scala:109)
        at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
        at xsbt.boot.Launch$.launch(Launch.scala:117)
        at xsbt.boot.Launch$.apply(Launch.scala:18)
        at xsbt.boot.Boot$.runImpl(Boot.scala:41)
        at xsbt.boot.Boot$.main(Boot.scala:17)
        at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
        at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

I checked the previous questions but they are not resembling my issue

strudel
  • 535
  • 1
  • 13
  • 35
  • am unable to see the attached pic. :( – strudel Sep 21 '15 at 14:40
  • If you search for the error message `Address already in use` in a search engine, I guess you would find some hint – cchantep Sep 21 '15 at 14:47
  • What cchantep tries to suggests in his/her charming way is that the port 8888 might be already in use by some other program or even another instance of Play/Activator. – Kris Sep 21 '15 at 16:04
  • its Windows 7 64 bit – strudel Sep 23 '15 at 13:03
  • @Kris and cchantep, Cant we use some other port, which are available. how to find those ports and assign to our Play framework. please help – strudel Sep 23 '15 at 13:13
  • Maybe this question helps: http://stackoverflow.com/questions/8205067/how-do-i-change-the-default-port-9000-that-play-uses-when-i-execute-the-run. – Kris Sep 23 '15 at 13:26

1 Answers1

1

You have a process that is already using that port. You need to kill that process to free it:

On a mac:

lsof -i tcp:3000 to find the process. Then,

kill -9 <PID> to kill the process

On windows:

netstat -a -n -o | find "<PORT>" to find the process. Then,

taskkill /pid <PID>

j will
  • 3,220
  • 9
  • 36
  • 57
  • Another option is to change the port that is used as per http://stackoverflow.com/questions/8205067/how-do-i-change-the-default-port-9000-that-play-uses-when-i-execute-the-run – childofsoong Sep 21 '15 at 17:01
  • Hi.. thank you!! when I tried to kill the session Error :: this process only be terminated forcefully(with F option). I wonder if i am killing an important sesson or something. cant we permanently change the port since the port number 8888 is constantly used by some other applicaiton . – strudel Sep 23 '15 at 13:11