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

Mqtt Client Can't connect through http proxy #501

Open
2 tasks
onkariwaligunje opened this issue Nov 22, 2023 · 0 comments
Open
2 tasks

Mqtt Client Can't connect through http proxy #501

onkariwaligunje opened this issue Nov 22, 2023 · 0 comments

Comments

@onkariwaligunje
Copy link

onkariwaligunje commented Nov 22, 2023

Hello,

mqtt paho java client cannot connect to server through http proxy from an android device. Getting below error:
ERROR-MqttAgent Error message: Connection to the Mqtt Failed due to MqttException (0) - java.net.SocketTimeoutException: after 90000ms: isConnected failed: ETIMEDOUT (Connection timed out)

Tried to check if same issue is there using android service, but when using android service got below error:
java.lang.IllegalArgumentException: com.lenovo.udcsystem: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

Is there any way to send proxy details to Mqtt while making a connect call to make a successful connection?

Any help is greatly appreciated.
Thanks!

  • [] Bug exists Release Version 1.1.1 (Java Repository Master Branch)
  • Bug exists in Snapshot Version 1.1.2-SNAPSHOT (Android Service Repository Master Branch)
  • Bug is just in the Sample Application.

Android API Version Bug Seen on: and Android Version Bug Seen on:
Android 13 (API level 33)

Please also check that if you have found the bug in the Release version (1.1.1) that you check that it also exists in the Snapshot (1.1.2-SNAPSHOT) before raising a bug.

Description of Bug:

Connect to server without having proxy set on android device - client gets connected to server
Connect to server after setting proxy on android device - client is unable to connect to server
Tried using ssl:// and wss:// for connection, but client is not able to connect to server through proxy
Proxy is http proxy

Console Log output (if available):

ERROR-MqttAgent Error message: Connection to the Mqtt Failed due to MqttException (0) - java.net.SocketTimeoutException: failed to connect to / (port 443) from / (port 47692) after 90000ms: isConnected failed: ETIMEDOUT (Connection timed out)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant