Websocket passed the local test, but cannot be connected in the production environment.

Source: Internet
Author: User
Use swoole for websocket. The Development Environment passes the test. The test details are: {code ...} the Development Environment encountered a problem. The test details are: {code ...} second Attempt: backend: {code ...} front end: {code ...} third attempt: backend: {code ...} front end: {code... use swoole for websocket,
The Development Environment passes the test. The test details are as follows:

Backend: swoole 0.0.0.0 terminal 9503.html page: ws // 192.168.1.101: 9503 can be connected, and ws // 127.0.0.1: 9503 can be connected.

The test details are as follows:

Backend: IP address of the swoole listening server A. B .C.D, port 9503. an error occurred while enabling the process. The message [16:57:23 @ 9876.0] WARN swSocket_listen: bind (A. B .C.D: 9503) is displayed. error: Cannot assign requested address [99]

Second Attempt:
Backend:

Swoole listens to the server IP address 127.0.0.1 and port 9503. The process is successfully enabled.

Front end:

Ws // A. B .C.D: 9503 cannot be connected,

The third attempt:
Backend:

Swoole listens to the server IP address 0.0.0.0 and port 9503. The process is successfully enabled.

Front end:

Ws // A. B .C.D: 9503 cannot be connected,

There is no clue why the process is successfully enabled but cannot be connected. Help !!!

Reply content:

Use swoole for websocket,
The Development Environment passes the test. The test details are as follows:

Backend: swoole 0.0.0.0 terminal 9503.html page: ws // 192.168.1.101: 9503 can be connected, and ws // 127.0.0.1: 9503 can be connected.

The test details are as follows:

Backend: IP address of the swoole listening server A. B .C.D, port 9503. an error occurred while enabling the process. The message [16:57:23 @ 9876.0] WARN swSocket_listen: bind (A. B .C.D: 9503) is displayed. error: Cannot assign requested address [99]

Second Attempt:
Backend:

Swoole listens to the server IP address 127.0.0.1 and port 9503. The process is successfully enabled.

Front end:

Ws // A. B .C.D: 9503 cannot be connected,

The third attempt:
Backend:

Swoole listens to the server IP address 0.0.0.0 and port 9503. The process is successfully enabled.

Front end:

Ws // A. B .C.D: 9503 cannot be connected,

There is no clue why the process is successfully enabled but cannot be connected. Help !!!

Network Firewall Problems

The IP address is incorrect. swoole cannot listen to the specified address and port.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.