Tag Archives: Workerman

[note] solve the problem of error during websocket Handshake: Net:: err when using workerman and Apache to create WSS service_ RESPONSE_ HEADER…

The error during websocket Handshake: Net:: err often appears in WSS services generated by Apache proxy_ RESPONSE_ HEADERS_ Truncated , but you can connect successfully by refreshing the page several times

No way was found in the official documents, and finally in the https://github.com/ratchetphp/Ratchet/issues/645 A solution has been found

This is not a worker’s warehouse, but the solution is universal

I could say that when some client disconnects without default websockt close protocol, ratchet keeps the connection “open”, but when a new user connects then ratchet reuses somehow the last “open”(closed) connection… Because the new client uses a old “active” connection, when it sends the HTTP handshake, ratchet complains because it isn’t the default message frame.

It’s the reuse of connections that causes this problem

Modify the configuration file of Apache conf.d/ssl.conf

Add a configuration disableeuse = on in the reverse proxy, and the problem is solved

ProxyPass /wss ws://127.0.0.1:8282/wss disablereuse=On
ProxyPassReverse /wss ws://127.0.0.1:8282/wss

Reference Links

https://github.com/ratchetphp/Ratchet/issues/645

http://doc.workerman.net/faq/secure-websocket-server.html

[Solved] Composer Workerman:Installation failed, reverting ./composer.json to its original content.

Today, I want to install workerman on TP5 to realize a background message reminder function

The first step is stuck. According to the manual, install through composer first

$ composer require topthink/think-worker

Result report error

$ composer require topthink/think-worker
Using version ^2.0 for topthink/think-worker
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - topthink/think-worker v2.0.5 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v2.0.4 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v2.0.3 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v2.0.2 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v2.0.1 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
    - topthink/think-worker v2.0.0 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
    - Installation request for topthink/think-worker ^2.0 -> satisfiable by topthink/think-worker[v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5].


Installation failed, reverting ./composer.json to its original content.

The prompt here is to restore the composer. JSON file. If it’s right, you can see something like topthink in the file. Delete it

I found a lot of information on the Internet, but they were all wrong. Later I found that it was a problem with the workerman version, so I need to install it again

I don’t know the meaning of – VVV behind here. Do you have any friends who know?Welcome to leave a message, thank you very much

composer require topthink/think-worker=1.0.* -vvv

If you need to be a server in windows, you need to

composer require workerman/workerman-for-win -vvv

After installation, there will be two more folders in the vendor directory under the root directory of the project. At this step, we can test according to the instructions in the manual

This is the problem I encountered in my work, record it, if there is anything wrong, please leave a message to discuss and exchange