Raffaele
Raffaele

Reputation: 20885

How to stop Play server started from Eclipse launcher

A very noob question, I know. The play eclipsify command creates two Eclipse launchers, so I started the server (in DEV mode), then I wrote a test and wanted to run in TEST mode. This is impossible as long as port 9000 is already bound. I need a way to stop the Play webserver. I tried with play stop but it complains about missing server.pid. I don't know where Eclipse puts this pid file, and even if I knew it I think play stop wouldn't work outside of the project directory.

BTW, I am on Play 1.2.4

Upvotes: 2

Views: 1108

Answers (2)

Raffaele
Raffaele

Reputation: 20885

There is a BIG RED SQUARED button for stopping! Shame on me :P

Now it's very strange but if I start my app from the Eclipse launcher, the SASS module doesn't compile SCSS files before serving them, so the browser doesn't get valid CSS. If I start the server with play run everything works as expected. Like @Codemwnci said it's better to start from the command line, even if I think this can't be the definitive way...

Upvotes: 3

Codemwnci
Codemwnci

Reputation: 54924

play stop will only end a process which has been started with play start. When using play start it will create the associated server.pid file to allow the stop command to function as expected.

Eclipse is likely using play run which runs the process inline. Therefore, you should be able to stop the server from within eclipse.

Upvotes: 3

Related Questions