views:

51

answers:

2

I have two Grails apps developing in the same time that needs to comunicate with each other.

How can I run both of them with grails run-app? If the server is already started and try to run the second app I get:

Server failed to start: LifecycleException: Protocol handler initialization failed: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind

+1  A: 

You can set

grails.server.port.http

In BuildConfig.groovy of one of the apps to something other than the default of 8080

How do they communicate though? Do they need to be in run the same Tomcat? If so then you won't be able to use run-app as this will start a new tomcat instance each time.

cheers

Lee

leebutts
No, they will not be needed to run the same Tomcat. I just want one app to provide a web service that the other will use.This answers my question, thank you very much!
cripox
+1  A: 

You can also try running app like this for one of the app

grails -Dserver.port=8082 run-app
Paras
nice to know also
cripox