亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Home PHP Framework Workerman What to do if workerman connection error occurs

What to do if workerman connection error occurs

Dec 12, 2019 am 10:00 AM
workerman Report an error connect

What to do if workerman connection error occurs

現(xiàn)象1:

啟動后報錯類似如下:??

php start.php start
PHP Warning: stream_socket_server(): unable to connect to tcp://xx.xx.xx.xx:xxxx (Address already in use) in 
/home/workerman-chat/Workerman/Worker.php on line xxxx

關鍵字: Address already in use

失敗原因:

端口被占用,無法啟動。

解決辦法:

可以通過命令netstat -anp | grep 端口號來找出哪個程序占用了端口。

然后停止對應的程序釋放端口解決。

如果不能停止對應端口的程序,可以通過更換workerman的端口解決。

如果是Workerman占用的端口,又無法通過stop命令停止(一般是丟失pid文件或者主進程被開發(fā)者kill了導致),可以通過運行以下兩個命令殺死Workerman進程。

killall php
ps aux|grep WorkerMan|awk '{print $2}'|xargs kill -9

現(xiàn)象2:

啟動后報錯類似如下:

PHP Warning: stream_socket_server(): unable to connect to tcp://xx.xx.xx.xx:xxx (Cannot assign 
requested address)
 in /home/GatewayWorker/Workerman/Worker.php on line xxxx

關鍵字:Cannot assign requested address

失敗原因:

啟動腳本ip參數(shù)寫錯,不是本機ip。

解決辦法:

請?zhí)顚懕緳Cip機或者填寫 0.0.0.0(表示監(jiān)聽本機所有ip)即可解決。

提示:Linux系統(tǒng)可以通過命令 ifconfig查看本機所有網(wǎng)卡ip。

如果您是騰訊云用戶,注意您的公網(wǎng)ip實際是代理服務器ip,公網(wǎng)ip并不屬于你的服務器,所以無法通過公網(wǎng)ip綁定,但是可以通過0.0.0.0來綁定。

現(xiàn)象3:

Waring stream_socket_server has been disabled for security reasons in ...

失敗原因:

stream_socket_server 函數(shù)被php.ini禁用

解決方法:

1、運行php --ini 找到php.ini文件

2、打開php.ini找到disable_functions一項,將stream_socket_server禁用項刪掉

現(xiàn)象4:

PHP Warning:  stream_socket_server(): unable to connect to tcp://0.0.0.0:xxx (Permission denied)

失敗原因:

linux下監(jiān)聽端口如果小于1024,需要root權限。

解決辦法:

使用大于1024的端口或者使用root用戶啟動服務。

PHP中文網(wǎng),有大量免費的workerman入門教程,歡迎大家學習!

The above is the detailed content of What to do if workerman connection error occurs. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1488
72
Complete Guide to Win11 Gamepad Connection Complete Guide to Win11 Gamepad Connection Jan 02, 2024 pm 05:26 PM

After updating to the latest win11 system, many users are not sure how to connect the controller to play games. For this reason, we have brought you a detailed tutorial on connecting the win11 controller today. If you haven't completed the connection yet, let's take a look at how to operate it. . How to connect the controller in win11: 1. Click Start below and then enter Windows Settings to open the "Control Panel". 2. After entering, you can find "View devices and printers" to enter. 3. At this point you can see the information about the controller device and just make the connection. 4. After the connection is successful, a √ appears, and the connection is completed.

Step-by-step guide to quickly solve pyqt5 installation errors Step-by-step guide to quickly solve pyqt5 installation errors Jan 19, 2024 am 09:32 AM

If you are learning Python and want to develop GUI applications, PyQt5 is a very good choice. It is a bound version of the PyQt library under Python, which makes it very convenient to call and develop the Qt graphics library. However, sometimes you may encounter some problems when installing PyQt5. This guide will provide you with some steps to quickly solve installation error problems, and also attach specific code examples. Make sure the Python version is correct PyQt5 is a Python-based library, so first

Solution: Socket Error when handling HTTP requests Solution: Socket Error when handling HTTP requests Feb 25, 2024 pm 09:24 PM

http request error: Solution to SocketError When making network requests, we often encounter various errors. One of the common problems is SocketError. This error is thrown when our application cannot establish a connection with the server. In this article, we will discuss some common causes and solutions of SocketError. First, we need to understand what Socket is. Socket is a communication protocol that allows applications to

Three Ways to Fix Edge Your Connection Isn't Private Three Ways to Fix Edge Your Connection Isn't Private Mar 13, 2024 pm 01:30 PM

When you use the Edge browser to access web pages, have you ever encountered a prompt that your connection is not a dedicated connection, causing web browsing to fail? How is this going? Many friends don’t know how to deal with this problem. You can take a look at the following three solutions. Method 1 (simple and crude): In the edge browser, you can try to solve the problem of the website being inaccessible by entering the settings and turning off the security function, and then blocking location permissions in the website permissions. It is important to note that the effectiveness and duration of this approach may vary, and specific effects cannot be determined. After restarting your browser, you can try visiting the website to see if the issue is resolved. Method 2: Adjust the keyboard to English input

How to connect keep body fat scale How to connect keep body fat scale Mar 07, 2024 pm 04:50 PM

How to connect the keep body fat scale? Keep has a specially designed body fat scale, but most users do not know how to connect the keep body fat scale. Next is the graphic tutorial on the connection method of the keep body fat scale that the editor brings to users. , interested users come and take a look! How to connect the keep body fat scale 1. First open the keep software, go to the main page, click [My] in the lower right corner, and select [Smart Hardware]; 2. Then on the My Smart Devices page, click the [Add Device] button in the middle; 3 , then select the device you want to add interface, select [Smart Body Fat/Weight Scale]; 4. Then on the device model selection page, click the [keep body fat scale] option; 5. Finally, in the interface shown below, finally [Add Now] at the bottom

Cause analysis: HTTP request error 504 gateway timeout Cause analysis: HTTP request error 504 gateway timeout Feb 19, 2024 pm 05:12 PM

Brief introduction to the reason for the http request error: 504GatewayTimeout: During network communication, the client interacts with the server by sending HTTP requests. However, sometimes we may encounter some error messages during the process of sending the request. One of them is the 504GatewayTimeout error. This article will explore the causes and solutions to this error. What is the 504GatewayTimeout error? GatewayTimeo

How to solve limited network connection in Windows 10 How to solve limited network connection in Windows 10 Feb 19, 2024 pm 09:20 PM

Solutions to Restricted Network Connections in Win10 With the rapid development of technology, the Internet has become an indispensable part of people's lives. However, sometimes we may encounter some problems when connecting to the Internet on computers using the Windows 10 operating system, one of which is restricted connections. In this case, we cannot access web pages, download files, or use network functions normally. So, is there any way to solve this problem? This article will introduce you to several common solutions. 1. Check the network connection settings. First, I

What does printer error code 0x0000011b mean? What does printer error code 0x0000011b mean? Feb 18, 2024 pm 10:02 PM

What does 0x0000011b mean when connecting to a printer? Users often encounter various error codes when using computers, laptops or other devices. Among them, 0x0000011b is a common printer connection error code. So, what does connecting printer 0x0000011b mean? First, we need to understand the basic principles of printer connection. When we need to print files from the computer, we usually need to connect the printer to the computer for data transfer between the two. This connection can be made via

See all articles