Mike
Mike

Reputation: 611

Grails https port closes application

Running a grails application with grails 2.4, i specify the server port and https ports (9191 and 9192, respectively) in a run-app command:

 grails -Dgrails.env=dev -Dgrails.server.port.http=9191 -Dgrails.server.port.https=9192 run-app -https

which gets the server up and running. I can go to the http port just fine, but when i access the https port, i get the following message and then the browser shows a "could not connect" page:

| Server running. Browse to http://localhost:9191/inventory or https://localhost:9192/inventory
14:35:58,091 DEBUG [DefaultListableBeanFactory:128] {localhost-startStop-2} Returning cached instance of singleton bean 'grailsApplication'
14:35:58,092 INFO  [GrailsWebApplicationContext:152] {localhost-startStop-2} Closing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@26a2bd15: startup date [Mon Aug 24 14:35:17 PDT 2015]; parent: Root WebApplicationContext

It looks like going to this non-default port is closing my application! when i don't specify the port, and the default of 8443 is used, the application works fine. I've upgraded this app from a grails 1.3.7 version and never had this issue, now i can only use 8443 as my port, which doesn't work as we have multiple services on this machine requiring HTTPS.

Upvotes: 0

Views: 141

Answers (1)

sCrain
sCrain

Reputation: 104

When not running in "production" mode, whatever the port is for http, if you add one and make a request to that URL, it will stop your application. This is used for killing forked grails processes during development.

Just put a gap between your above ports you should be good to go.

Upvotes: 1

Related Questions