Closed arthurolara closed 7 years ago
yes the problem is very easy:
wschat.hostname="localhost:8080"
you can see it in the error console it suggest localhost:8080/wscha1.31/
was unavailable.
To try and get your head around this. When you communicate via websockets, it has to transmit the traffic to the actual host that communicates in websockets.
Whilst you are in development mode you will notice and even visit url http://localhost:8080/appName
which then binds and runs and would not throw that error message.
In short edit this line for production and set it to be the actual hostname used to access your production site.
so if production url to get access to the site is
http://www.myexampledomain.com/wschat1.31/
the wschat.hostname='www.myexampledomain.com'
nice!!, thaks it works fine now
regards
Hi,I'm trying to use this plugin, with grails 2.5.0, it looks fine when i run the app in development mode, but when i try to run in Production mode, it doesn't work, hope some one can help.
Intellji Log: | Error javax.websocket.DeploymentException: The HTTP response from the server [HTTP/1.1 404 Not Found ] did not permit the HTTP upgrade to WebSocket | Error at org.apache.tomcat.websocket.WsWebSocketContainer.parseStatus(WsWebSocketContainer.java:597) | Error at org.apache.tomcat.websocket.WsWebSocketContainer.processResponse(WsWebSocketContainer.java:581) | Error at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:307) | Error at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:166) | Error at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:187)
My settings
BuildConfig.grovey
plugins { // plugins for the build system only build ":tomcat:7.0.55.2" // or ":tomcat:8.0.20"
Config.grovy
wschat.enableSecurity='true'
grails.plugin.springsecurity.userLookup.userDomainClassName = 'grails.plugin.wschat.ChatAuth' grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'grails.plugin.wschat.ChatAuthChatRole' grails.plugin.springsecurity.authority.className = 'grails.plugin.wschat.ChatRole' grails.plugin.springsecurity.controllerAnnotations.staticRules = [ '/': ['permitAll'], '/error': ['permitAll'], '/index': ['permitAll'], '/index.gsp': ['permitAll'], '/shutdown': ['permitAll'], '/assets/': ['permitAll'], '//js/': ['permitAll'], '//css/': ['permitAll'], '//images/': ['permitAll'], '//favicon.ico': ['permitAll'], '/wsChat/': ['permitAll'], '/wsChatAdmin/': ['permitAll'], '/wsCamEndpoint/': ['permitAll'], '/wsChatEndpoint/': ['permitAll'], '/wsChatFileEndpoint/': ['permitAll'], '/TicTacToeServer/': ['permitAll'], '/wsCamEndpoint': ['permitAll'], '/wsChatEndpoint': ['permitAll'], '/wsChatFileEndpoint': ['permitAll'], '/TicTacToeServer': ['permitAll'], '/dbconsole/': ['permitAll'], '/ChatClientEndpoint/': ['permitAll'], '/WsChatClientEndpoint/**': ['permitAll'], '/ChatClientEndpoint': ['permitAll'], '/WsChatClientEndpoint': ['permitAll'] ]
grails.plugin.springsecurity.securityConfigType = "Annotation"
//Para el chat //https://github.com/vahidhedayati/grails-wschat-plugin/wiki/Config.groovy
wschat.defaultperm='user'
/*
wschat.removeAppName=no
/* DB Booking Date
/*
*/ wschat.hostname="localhost:8080"
Thanks