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

[Bug]: netclient unable connect to mq server #1464

Closed
1 task done
czongxin opened this issue Aug 18, 2022 · 10 comments
Closed
1 task done

[Bug]: netclient unable connect to mq server #1464

czongxin opened this issue Aug 18, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@czongxin
Copy link

czongxin commented Aug 18, 2022

Contact Details

hybgpx@163.com

What happened?

netclient was unable to connect to the MQ server because of a certificate problem。

i have see #1100 and #1186, but not resolved

Version

v0.14.6

What OS are you using?

Linux

Relevant log output

--- netclient
Aug 19 00:10:29 VM-32-13-ubuntu netclient[376475]: [netclient] 2022-08-19 00:10:29 started daemon for server  broker.domain.com
Aug 19 00:10:29 VM-32-13-ubuntu netclient[376475]: [netclient] 2022-08-19 00:10:29 netclient daemon started for server:  broker.domain.com
Aug 19 00:10:59 VM-32-13-ubuntu netclient[376475]: [netclient] 2022-08-19 00:10:59 unable to connect to broker, retrying ...
Aug 19 00:11:00 VM-32-13-ubuntu netclient[376475]: Ping tcp://broker.domain.com:443(ip:443) - Connected - time=4.732861ms
Aug 19 00:11:01 VM-32-13-ubuntu netclient[376475]: Ping tcp://broker.domain.com:443(ip:443) - Connected - time=4.634077ms
Aug 19 00:11:02 VM-32-13-ubuntu netclient[376475]: Ping tcp://broker.domain.com:443(ip:443) - Connected - time=3.616715ms
Aug 19 00:11:03 VM-32-13-ubuntu netclient[376475]: [netclient] 2022-08-19 00:11:03 could not connect to broker broker.domain.com connect timeout
Aug 19 00:11:03 VM-32-13-ubuntu netclient[376475]: [netclient] 2022-08-19 00:11:03 connection issue detected.. attempt connection with new certs and broker infor>



------ mq

1660839139: New connection from 172.22.0.3:35410 on port 8883.
1660839139: OpenSSL Error[0]: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
1660839139: Client <unknown> disconnected: Protocol error.
1660839143: New connection from 172.22.0.3:35412 on port 8883.
1660839143: OpenSSL Error[0]: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
1660839143: Client <unknown> disconnected: Protocol error.
1660839147: New connection from 172.22.0.3:35414 on port 8883.
1660839147: OpenSSL Error[0]: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
1660839147: Client <unknown> disconnected: Protocol error.
1660839151: New connection from 172.22.0.3:35416 on port 8883.
1660839151: OpenSSL Error[0]: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
1660839151: Client <unknown> disconnected: Protocol error.

Contributing guidelines

  • Yes, I did.
@czongxin czongxin added the bug Something isn't working label Aug 18, 2022
@Amansinghtech
Copy link

I am having the same issue right now. It took my entire day and i am still stuck with this issue here.

@mattkasun
Copy link
Contributor

Have your tried the MQ troubleshooting steps described at
this gist

@czongxin
Copy link
Author

czongxin commented Aug 19, 2022

I use this gist, netclient now is ok, but mq always has error:

1660872933: New connection from 172.22.0.3:53806 on port 8883.
1660872933: OpenSSL Error[0]: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
1660872933: Client disconnected: Protocol error.
1660872937: New connection from 172.22.0.3:53808 on port 8883.
1660872937: OpenSSL Error[0]: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
1660872937: Client disconnected: Protocol error.
1660872941: New connection from 172.22.0.3:53810 on port 8883.
1660872941: OpenSSL Error[0]: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
1660872941: Client disconnected: Protocol error.

@Amansinghtech
Copy link

Amansinghtech commented Aug 19, 2022

i tried to troubleshoot with the given methods, but client connecting and disconnecting it seems.
i my case i added - traefik.http.routers.mqtt_websocket.rule=Host(broker.nekione.com) this label under mq service in docker-compose.yaml. SSL issue is fixed but there is some new issue i just found

1660886129: New connection from 172.18.0.5:60496 on port 1883.
1660886129: New client connected from 172.18.0.5:60496 as ljMEzgtfruS1kcP0Pd5qUa1 (p2, c1, k60).
1660886129: Client ljMEzgtfruS1kcP0Pd5qUa1 disconnected.
1660886130: New connection from 172.18.0.5:60498 on port 1883.
1660886130: New client connected from 172.18.0.5:60498 as ss0yPHvelGS1kdcwHp6Xb3x (p2, c1, k60).
1660886358: New connection from 172.18.0.5:60504 on port 1883.
1660886358: New client connected from 172.18.0.5:60504 as 1eL7mR5dtMoHpEplm35Qp4J (p2, c1, k60).
1660886358: Client 1eL7mR5dtMoHpEplm35Qp4J disconnected.
1660886848: New connection from 172.18.0.5:60510 on port 1883.
1660886848: New client connected from 172.18.0.5:60510 as UtD7zspemCPUwI0OGEdd1Lx (p2, c1, k60).
1660886848: Client UtD7zspemCPUwI0OGEdd1Lx disconnected.
1660886854: New connection from 172.18.0.5:60512 on port 1883.
1660886854: New client connected from 172.18.0.5:60512 as sYsqzuqHP9B3OyLOfi1LcZg (p2, c1, k60).
1660886854: Client sYsqzuqHP9B3OyLOfi1LcZg disconnected.

@mattkasun
Copy link
Contributor

@Amansinghtech those mq logs are expected in a functional setup

@afeiszli
Copy link
Contributor

Are you still experiencing this issue?

@czongxin
Copy link
Author

Are you still experiencing this issue?

has fix

@arnonh
Copy link

arnonh commented Sep 2, 2022

@Amansinghtech have you managed to get the mqtt working through websocket?

@Amansinghtech
Copy link

Amansinghtech commented Sep 3, 2022

@Amansinghtech have you managed to get the mqtt working through websocket?

No i didn't, i just used an older version of netmaker and it worked for me, also the new release 15.0 is also working great when i last tested.

@Exchizz
Copy link
Contributor

Exchizz commented Sep 8, 2022

i tried to troubleshoot with the given methods, but client connecting and disconnecting it seems. i my case i added - traefik.http.routers.mqtt_websocket.rule=Host(broker.nekione.com) this label under mq service in docker-compose.yaml. SSL issue is fixed but there is some new issue i just found

1660886129: New connection from 172.18.0.5:60496 on port 1883. 1660886129: New client connected from 172.18.0.5:60496 as ljMEzgtfruS1kcP0Pd5qUa1 (p2, c1, k60). 1660886129: Client ljMEzgtfruS1kcP0Pd5qUa1 disconnected. 1660886130: New connection from 172.18.0.5:60498 on port 1883. 1660886130: New client connected from 172.18.0.5:60498 as ss0yPHvelGS1kdcwHp6Xb3x (p2, c1, k60). 1660886358: New connection from 172.18.0.5:60504 on port 1883. 1660886358: New client connected from 172.18.0.5:60504 as 1eL7mR5dtMoHpEplm35Qp4J (p2, c1, k60). 1660886358: Client 1eL7mR5dtMoHpEplm35Qp4J disconnected. 1660886848: New connection from 172.18.0.5:60510 on port 1883. 1660886848: New client connected from 172.18.0.5:60510 as UtD7zspemCPUwI0OGEdd1Lx (p2, c1, k60). 1660886848: Client UtD7zspemCPUwI0OGEdd1Lx disconnected. 1660886854: New connection from 172.18.0.5:60512 on port 1883. 1660886854: New client connected from 172.18.0.5:60512 as sYsqzuqHP9B3OyLOfi1LcZg (p2, c1, k60). 1660886854: Client sYsqzuqHP9B3OyLOfi1LcZg disconnected.

I had to add that label as well.. Thanks for sharing !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants