-
Notifications
You must be signed in to change notification settings - Fork 70
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
The process that fails to listen does not exit? #58
Comments
Can you provide a detailed description of the scenario that caused this problem, so that I can reproduce it.
…---- Replied Message ----
| From | ***@***.***> |
| Date | 04/28/2024 11:41 |
| To | ***@***.***> |
| Cc | ***@***.***> |
| Subject | [rmqtt/rmqtt] listen failed process not exist? (Issue #58) |
Listen "external/0.0.0.0:1883" failed on 0.0.0.0:1883, IoError(Os { code: 98, kind: AddrInUse, message: "Address already in use" })
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
In the ntex framework, reuseaddr is set to true by default, but reuseport is not set to true, so see if there are any processes occupying port 1883. That is to say, it has not completely exited after starting rmqtt last time. You can wait for a while and try again to see if this error will still be reported.
…---- Replied Message ----
| From | ***@***.***> |
| Date | 04/29/2024 11:23 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [rmqtt/rmqtt] The process that fails to listen does not exit? (Issue #58) |
_1714360987652.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
How to exit the program when the port is occupied |
Currently we can only kill the process directly, and we will consider the implementation of graceful exit later.
…---- Replied Message ----
| From | ***@***.***> |
| Date | 04/29/2024 11:45 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [rmqtt/rmqtt] The process that fails to listen does not exit? (Issue #58) |
How to exit the program when the port is occupied
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
This would always happen when exec |
Thank you for reporting this issue. However, I was unable to reproduce the problem. I performed the following commands:
docker restart rmqtt
or
docker-compose restart
In both cases, the client was able to reconnect successfully. I tested this on a single-node setup.
Could you please provide more details about the issue? Specifically, whether you are using a single node or a cluster, the version of rmqtt, whether you are using docker-compose or directly starting the container with docker, and what client tool you are using.
…---- Replied Message ----
| From | ***@***.***> |
| Date | 05/22/2024 10:22 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [rmqtt/rmqtt] The process that fails to listen does not exit? (Issue #58) |
This would always happen when exec docker restart mqtt and client is connecting.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
All config and run bash here: https://github.com/ForNetCode/mqtt-exec/tree/master/shell/prod $ uname -a
Linux 10-23-70-251 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ docker restart rmqtt
rmqtt
$ docker logs --tail 10 rmqtt
024-05-22 03:40:30.968 ERRO rmqttd.189 | Listen "external/0.0.0.0:1883" failed on 0.0.0.0:1883, IoError(Os { code: 98, kind: AddrInUse, message: "Address in use" })
2024-05-22 03:40:30.968 INFO rmqtt_http_api::api.98 | HTTP API Listening on 0.0.0.0:6060, reuseaddr: true, reuseport: false
2024-05-22 03:40:30.969 INFO rmqtt::grpc::server.29 | gRPC server is listening on tcp://0.0.0.0:5363, reuseaddr: true, reuseport: false After about 5 mins, |
rmqtt.toml中添加"reuseport"配置试试:
## MQTT/TCP - External TCP Listener for MQTT Protocol
listener.tcp.external.addr = "0.0.0.0:1883"
listener.tcp.external.reuseport = true
…---- Replied Message ----
| From | ***@***.***> |
| Date | 05/22/2024 11:43 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [rmqtt/rmqtt] The process that fails to listen does not exit? (Issue #58) |
All config and run bash here: https://github.com/ForNetCode/mqtt-exec/tree/master/shell/prod
$ uname -a
Linux 10-23-70-251 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ docker restart rmqtt
rmqtt
$ docker logs --tail 10 rmqtt
024-05-22 03:40:30.968 ERRO rmqttd.189 | Listen "external/0.0.0.0:1883" failed on 0.0.0.0:1883, IoError(Os { code: 98, kind: AddrInUse, message: "Address in use" })
2024-05-22 03:40:30.968 INFO rmqtt_http_api::api.98 | HTTP API Listening on 0.0.0.0:6060, reuseaddr: true, reuseport: false
2024-05-22 03:40:30.969 INFO rmqtt::grpc::server.29 | gRPC server is listening on tcp://0.0.0.0:5363, reuseaddr: true, reuseport: false
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
same error with This would not happen when I use Centos. |
I built 'rmqtt:0.4.1-rc1' and fixed the issue where listener.tcp.external.reuseport = true was not effective in version 0.4.0 and earlier. If convenient, could you please try again and see the results? |
@rhello2999 it works. |
Listen "external/0.0.0.0:1883" failed on 0.0.0.0:1883, IoError(Os { code: 98, kind: AddrInUse, message: "Address already in use" })
The text was updated successfully, but these errors were encountered: