Re: need help with websocket
WSS will work if you enable and configure the HTTPS connector in server.xml. This part of the configuration is not really wss specific and tomcat site contains a bunch of good docs on how to do this. > On Mar 29, 2017, at 4:40 PM, Sharat Jagannath wrote: > > The code on the tomcat page does not have examples for wss. But I will look > into his ngnix is configured > > Thanks > > On Mar 29, 2017 1:15 PM, "Mark Eggers" > wrote: > >> Sharat, >> >>> On 3/29/2017 9:23 AM, Sharat Jagannath wrote: >>> I get a 404 error when I call my server endpoint with wss. >>> I'm using tomcat 9 which sits behind ngnix. Does that make a difference? >>> here's how my server.xml looks like- >>> >>> >>> >>> >>> >>> >>> > /> >>> >>> >>> >> SSLEngine="on" /> >>> >>> >> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> >>> >> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" >> /> >>> >> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" >> /> >>> >>> >>> >>> >>> >>>>> type="org.apache.catalina.UserDatabase" >>> description="User database that can be updated and saved" >>> factory="org.apache.catalina.users. >> MemoryUserDatabaseFactory" >>> pathname="conf/tomcat-users.xml" /> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>>>> connectionTimeout="2" >>> redirectPort="8443" URIEncoding="UTF-8" >>> useBodyEncodingForURI="true" compression="on" compressionMinSize="2048" >>> noCompressionUserAgents="gozilla, traviata" >>> compressableMimeType="text/html,text/xml,text/plain,text/ >> css,text/javascript" >>> /> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>>>> resourceName="UserDatabase"/> >>> >>> >>> >>unpackWARs="true" autoDeploy="true"> >>> >>> >>> >>> >>> >>>>> directory="logs" >>> prefix="localHost_access_log" suffix=".txt" >>> pattern="%h %l %u %t "%r" %s %b" /> >>> >>> >>> >>> >>> >>> >>> >>> On Mar 29, 2017 6:24 AM, "calder" wrote: On Tuesday, March 28, 2017, Sharat Jagannath >> wrote: > how do i setup websocket on server side for using wss with tomcat >> config? > is there any config i need to do with tomcat? any certification to >> setup? > Read up using the How-to: https://tomcat.apache.org/tomcat-8.0-doc/web-socket-howto.html http://tomcat-configure.blogspot.com/2014/05/tomcat-websock et-example.html >>> >> >> Two things to try: >> >> 1. Have you tried to connect without using NGINX as a front end proxy? >> >> 2. Have you configured your NGINX server appropriately? >> >> See the following for configuring NGINX to act as a websocket proxy: >> >> http://nginx.org/en/docs/http/websocket.html >> https://www.nginx.com/blog/websocket-nginx/ >> >> Also, see the following: >> >> http://tomcat.apache.org/tomcat-9.0-doc/web-socket-howto.html >> >> and follow the links to look at both the server and client side code. >> >> Please note that I've not done any of this, since I have Tomcat sitting >> behind Apache HTTPD 2.2. I have not ported the proxy_wstunnel module >> from Apache HTTPD 2.4 to 2.2. >> >> . . . just my two cents >> /mde/ >> >> Please note that I've not done any of this. >> >> >> - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: need help with websocket
The code on the tomcat page does not have examples for wss. But I will look into his ngnix is configured Thanks On Mar 29, 2017 1:15 PM, "Mark Eggers" wrote: > Sharat, > > On 3/29/2017 9:23 AM, Sharat Jagannath wrote: > > I get a 404 error when I call my server endpoint with wss. > > I'm using tomcat 9 which sits behind ngnix. Does that make a difference? > > here's how my server.xml looks like- > > > > > > > > > > > > > >/> > > > > > >> SSLEngine="on" /> > > > >> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> > >> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" > /> > >> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" > /> > > > > > > > > > > > > > type="org.apache.catalina.UserDatabase" > > description="User database that can be updated and saved" > > factory="org.apache.catalina.users. > MemoryUserDatabaseFactory" > > pathname="conf/tomcat-users.xml" /> > > > > > > > > > > > > > > > > > > > > > > > > > > >connectionTimeout="2" > >redirectPort="8443" URIEncoding="UTF-8" > > useBodyEncodingForURI="true" compression="on" compressionMinSize="2048" > > noCompressionUserAgents="gozilla, traviata" > > compressableMimeType="text/html,text/xml,text/plain,text/ > css,text/javascript" > > /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >resourceName="UserDatabase"/> > > > > > >> unpackWARs="true" autoDeploy="true"> > > > > > > > > > > > > > directory="logs" > >prefix="localHost_access_log" suffix=".txt" > >pattern="%h %l %u %t "%r" %s %b" /> > > > > > > > > > > > > > > > > > > On Mar 29, 2017 6:24 AM, "calder" wrote: > > > >> On Tuesday, March 28, 2017, Sharat Jagannath > wrote: > >> > >>> how do i setup websocket on server side for using wss with tomcat > config? > >>> is there any config i need to do with tomcat? any certification to > setup? > >> > >> > >>> > >> > >> Read up using the How-to: > >> > >> https://tomcat.apache.org/tomcat-8.0-doc/web-socket-howto.html > >> > >> > >> http://tomcat-configure.blogspot.com/2014/05/tomcat-websock > >> et-example.html > >> > > > > Two things to try: > > 1. Have you tried to connect without using NGINX as a front end proxy? > > 2. Have you configured your NGINX server appropriately? > > See the following for configuring NGINX to act as a websocket proxy: > > http://nginx.org/en/docs/http/websocket.html > https://www.nginx.com/blog/websocket-nginx/ > > Also, see the following: > > http://tomcat.apache.org/tomcat-9.0-doc/web-socket-howto.html > > and follow the links to look at both the server and client side code. > > Please note that I've not done any of this, since I have Tomcat sitting > behind Apache HTTPD 2.2. I have not ported the proxy_wstunnel module > from Apache HTTPD 2.4 to 2.2. > > . . . just my two cents > /mde/ > > Please note that I've not done any of this. > > >
Re: need help with websocket
Sharat, On 3/29/2017 9:23 AM, Sharat Jagannath wrote: > I get a 404 error when I call my server endpoint with wss. > I'm using tomcat 9 which sits behind ngnix. Does that make a difference? > here's how my server.xml looks like- > > > > > > > > > >SSLEngine="on" /> > >className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> >className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> >className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> > > > > > >type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved" > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > > > > > > > > > > > > > connectionTimeout="2" >redirectPort="8443" URIEncoding="UTF-8" > useBodyEncodingForURI="true" compression="on" compressionMinSize="2048" > noCompressionUserAgents="gozilla, traviata" > compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript" > /> > > > > > > > > > > > > > > > > > > > > > > > > > > resourceName="UserDatabase"/> > > >unpackWARs="true" autoDeploy="true"> > > > > > > directory="logs" >prefix="localHost_access_log" suffix=".txt" >pattern="%h %l %u %t "%r" %s %b" /> > > > > > > > > > On Mar 29, 2017 6:24 AM, "calder" wrote: > >> On Tuesday, March 28, 2017, Sharat Jagannath wrote: >> >>> how do i setup websocket on server side for using wss with tomcat config? >>> is there any config i need to do with tomcat? any certification to setup? >> >> >>> >> >> Read up using the How-to: >> >> https://tomcat.apache.org/tomcat-8.0-doc/web-socket-howto.html >> >> >> http://tomcat-configure.blogspot.com/2014/05/tomcat-websock >> et-example.html >> > Two things to try: 1. Have you tried to connect without using NGINX as a front end proxy? 2. Have you configured your NGINX server appropriately? See the following for configuring NGINX to act as a websocket proxy: http://nginx.org/en/docs/http/websocket.html https://www.nginx.com/blog/websocket-nginx/ Also, see the following: http://tomcat.apache.org/tomcat-9.0-doc/web-socket-howto.html and follow the links to look at both the server and client side code. Please note that I've not done any of this, since I have Tomcat sitting behind Apache HTTPD 2.2. I have not ported the proxy_wstunnel module from Apache HTTPD 2.4 to 2.2. . . . just my two cents /mde/ Please note that I've not done any of this. signature.asc Description: OpenPGP digital signature
Re: need help with websocket
I get a 404 error when I call my server endpoint with wss. I'm using tomcat 9 which sits behind ngnix. Does that make a difference? here's how my server.xml looks like- On Mar 29, 2017 6:24 AM, "calder" wrote: > On Tuesday, March 28, 2017, Sharat Jagannath wrote: > > > how do i setup websocket on server side for using wss with tomcat config? > > is there any config i need to do with tomcat? any certification to setup? > > > > > > Read up using the How-to: > > https://tomcat.apache.org/tomcat-8.0-doc/web-socket-howto.html > > > http://tomcat-configure.blogspot.com/2014/05/tomcat-websock > et-example.html >
Re: need help with websocket
On Tuesday, March 28, 2017, Sharat Jagannath wrote: > how do i setup websocket on server side for using wss with tomcat config? > is there any config i need to do with tomcat? any certification to setup? > Read up using the How-to: https://tomcat.apache.org/tomcat-8.0-doc/web-socket-howto.html http://tomcat-configure.blogspot.com/2014/05/tomcat-websocket-example.html
need help with websocket
how do i setup websocket on server side for using wss with tomcat config? is there any config i need to do with tomcat? any certification to setup? Thanks -- Sharat Jagannath