-
Notifications
You must be signed in to change notification settings - Fork 59
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
Feature: AMQP over Websockets (with proxy) #264
Comments
Hi @pgbhagat I am not sure - if this will work though. I think there are 2 technical limitations:
if there is a limitation at |
We will try it out. Before that, few questions.
I will try out AMQP over websockets and will see if it works. |
I am trying out this branch, i am facing two problems;
Now correct library code got picked. i.e. MessagingFactory.createConnection with port 443. I tried to send messages with some more code changes as per library APIs and got the below error.
|
Also I raised an issue #270 |
hi @pgbhagat - using for http - every request goes through our authentication layer - but for websockets - its done only when you are creating the sender or receiver. So, websockets will perform better than http. I didn't understand where you are facing the problem. This is where we create the connection on port 443: https://github.com/Azure/azure-event-hubs-java/blob/websocket.with.1_0/azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/MessagingFactory.java#L116 your dependency should look something like this (don't include azure-eventhubs-eph yet):
|
Shutting down executor after sometime (say 60 seconds) post EventHubClient.send(event) resolved error 'rejected from java.util.concurrent.ThreadPoolExecutor'. It looks 'amqp over websocket' works. I can see data reaching azure. When websocket library will be released so that i can use it? |
Hi @pgbhagat - we don't have concrete dates yet. I will update you with the release dates for websocket support.
Thanks a lot for trying a reporting back.! |
@SreeramGarlapati , Sorry, it does not work. Exception in thread "main" com.microsoft.azure.eventhubs.EventHubException: connection aborted Our Firewall preventing outgoing TCP connection. We wanted 'amqp over websocket' to work with http proxy server. |
@SreeramGarlapati any update on release date for websocket support? |
Hi @pgbhagat, Thanks a lot checking back! We don't have any crisp dates yet. I am trying to get basic |
Hi @pgbhagat - may I request you to validate the POC for |
@SreeramGarlapati - yes, we will try this POC library, but will be able to do so by next week. |
We have many end users looking for some type of proxy support that doesn't have a requirement to allow 5671/5672 to be directly open, we're also using the azure-eventhubs-eph code and would be anxious to know when a test version that the Websockets code extends to would be available to test out! |
When will the WS enhancement be merged back to master and be released? |
1. Supports max_frame_size of 4k (current limitation of <a href="https://github.com/Azure/qpid-proton-j-extensions">qpid-proton-j-extensions</a> library) 2. doesn't support PROXY on websockets - this will follow. Amqp over WebSockets is particularly used when enterprise policies (ex: firewall outbound port rules) doesn't allow traffic on the default Amqp secure port (`5671`). To send or receive over websockets - which uses port `443`, set the `TransportType` on `ConnectionStringBuilder`, like this: ``` connectionStringBuilder.setTransportType(TransportType.AmqpWebSockets) ``` related: #264
@SreeramGarlapati - looks good |
@dak0ta @pgbhagat - here's the preview package of proxy support for websockets
Code Sample to set proxy:
Appreciate your (n)ack.!! |
We'll give it a look - thanks! |
So we've done some experimenting and haven't been able to get things working. We setup a Dante SOCKS5 proxy and pointed the client at it but got errors. In /var/log/socks.log Sep 21 11:52:18 (1537541538.423074) sockd[8103]: info: pass(1): tcp/accept [: X.X.X.X.46622 Y.Y.Y.Y.8888 And from the Azure SDK: [pool-1-thread-1] INFO com.microsoft.azure.eventhubs.impl.ProxyConnectionHandler - addProxyHandshake: hostname[XXXXXXXXXXXX.servicebus.windows.net:443] ===================================== So what type of Proxy should we be using? An HTTPS proxy doesn't seem relevant for AMQP over Websockets. Any help is appreciated! |
@dak0ta |
Thanks. So we had an older squid that wasn't working great with HTTP CONNECT tunnelling so I setup a newer one. New one works fine with CURL to test, but when trying out the sample EventHubs code we get
Squid logs show a request to the eventhubs on 443, but I don't think that's what this request here is.
Is this first request succeeding then a subsequent AMQP request failing? Or is this first one actually failing? |
Hi All, I have a solution for the Servicebus Exception issue where The firewall is restricting to use the PORT:5671 for some of the client network VMs. If your Firewall is set ON by the Administrator which is blocking the AMQP request then use the below steps to set your firewall OFF and try to test the Service bus Connection again. Search for Command --> Right click and Run as Administrator Then run the below command to check the Firewall status for different profiles in the system. netsh advfirewall show allprofiles Then run the below commands to turn the firewall off. netsh advfirewall set domainprofile state off Now you can check the firewall status again. Please reply here if the solution works. It worked for me for my client network. |
1. Supports max_frame_size of 4k (current limitation of <a href="https://github.com/Azure/qpid-proton-j-extensions">qpid-proton-j-extensions</a> library) 2. doesn't support PROXY on websockets - this will follow. Amqp over WebSockets is particularly used when enterprise policies (ex: firewall outbound port rules) doesn't allow traffic on the default Amqp secure port (`5671`). To send or receive over websockets - which uses port `443`, set the `TransportType` on `ConnectionStringBuilder`, like this: ``` connectionStringBuilder.setTransportType(TransportType.AmqpWebSockets) ``` related: #264
Issue Description
System.getProperties().put("proxySet", "true"); System.getProperties().put("socksProxyHost", <proxy hostname>); System.getProperties().put("socksProxyPort", <proxy port>);
Another way of setting socks proxy through java invocation
java -DsocksProxyHost=<socks proxy hostname> -DsocksProxyPort=<port>
It does not work, amqp traffic still hits firewall directly where it gets blocked.
Few questions:
Has anyone faced this problem?
Is there any other way to allow this traffic through some proxy?
How does a typical deployment outside AZURE environment works?
Appreciate your help.
The text was updated successfully, but these errors were encountered: