Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websockets not working on ubuntu production server #1570

Closed
MohammadAdil opened this issue Apr 28, 2014 · 2 comments
Closed

Websockets not working on ubuntu production server #1570

MohammadAdil opened this issue Apr 28, 2014 · 2 comments

Comments

@MohammadAdil
Copy link

I am using this war -
http://search.maven.org/remotecontent?filepath=org/atmosphere/samples/atmosphere-rest-chat/2.1.0/atmosphere-rest-chat-2.1.0.war

This works on local Tomcat server but fails to work on production server.
I have tomcat 7.0.42 on both development and production. the only difference is that development server uses port 8080 while production server uses port 80.

This is what i see when i try to connect.

pictures2014-04-28_20-22_atmosphere chat

On Chrome console

2014-04-28_20-27_atmosphere chat

and on network tab of chrome console

2014-04-28_20-38_atmosphere chat

I have this setting in server.xml (Production Server)

<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" URIEncoding="UTF-8" redirectPort="8443" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,application/javascript,text/css" />

and

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

OS Info

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"

Is their something on server that is blocking the request ?

Please note that this works if i set transport to long-polling.

Is their anything i missed to post here ?

@MohammadAdil
Copy link
Author

I tried changing production server tomcat port to 8080 and websockets started working !

i.e

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" URIEncoding="UTF-8" redirectPort="8443" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,application/javascript,text/css" />

Now, the question is, what is the issue in using port 80 ?

@jfarcand
Copy link
Member

Please use the mailing list for questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants