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

Proxy Parameter #29

Open
SupremeCookie11 opened this issue Feb 5, 2019 · 4 comments
Open

Proxy Parameter #29

SupremeCookie11 opened this issue Feb 5, 2019 · 4 comments
Assignees

Comments

@SupremeCookie11
Copy link

Is it possible to request a proxy parameter like many of the other input plugins for logstash? Microsoft do not allow event hubs to stream data over Express Route so Proxy is our only option.

Thanks

@jsvd jsvd self-assigned this Feb 12, 2019
@LucaWintergerst
Copy link

We were facing the same issue earlier this week.

We managed to get it working after:

Updating the java dependies to newer versions

+    compile 'com.microsoft.azure:azure-eventhubs:2.2.0'
+    compile 'com.microsoft.azure:qpid-proton-j-extensions:1.1.0'
+    compile 'com.microsoft.azure:azure-eventhubs-eph:2.4.0' 

Adding an environment variable that contains the proxy
export https_proxy="https://my_proxy:8080"

Adding the following to the connection String
TransportType=AmqpWebSockets

To include the dependencies we rebuilt the plugin.

I'm posting this comment here so the Logstash team can properly implement this in an upcoming version.

@jhedden
Copy link

jhedden commented Apr 11, 2019

Luca's instructions worked for me too, though I had to update logstash's jvm.options to get the proxy working correctly.

-Dhttp.proxyHost=my_proxy
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=my_proxy
-Dhttps.proxyPort=8443
-Dhttp.nonProxyHosts="localhost|127.0.0.1"

@danhermann danhermann mentioned this issue May 6, 2019
robbavey added a commit to robbavey/logstash-input-azure_event_hubs that referenced this issue May 6, 2019
Update Azure library dependencies. This enables the use of the
 web socket transport, which is required in order to be able to support
 proxying - see logstash-plugins#29 (comment)
elasticsearch-bot pushed a commit that referenced this issue May 15, 2019
Update Azure library dependencies. This enables the use of the
 web socket transport, which is required in order to be able to support
 proxying - see #29 (comment)

Fixes #36
@javanaattori
Copy link

We were facing the same issue earlier this week.

We managed to get it working after:

Updating the java dependies to newer versions

+    compile 'com.microsoft.azure:azure-eventhubs:2.2.0'
+    compile 'com.microsoft.azure:qpid-proton-j-extensions:1.1.0'
+    compile 'com.microsoft.azure:azure-eventhubs-eph:2.4.0' 

Adding an environment variable that contains the proxy
export https_proxy="https://my_proxy:8080"

Adding the following to the connection String
TransportType=AmqpWebSockets

To include the dependencies we rebuilt the plugin.

I'm posting this comment here so the Logstash team can properly implement this in an upcoming version.

Where do you add that TransportType=AmqpWebSockets in the logstash configuration? To var.input.azure_event_hubs.storage_connection or var.input.azure_event_hubs.event_hub_connections?

@ofirEdi
Copy link

ofirEdi commented Jan 9, 2024

I followed the instructions above except updating java version (since the current version seems to include more recent packages) and i'm able to connect to the queue via proxy. The issue is with Azure Blob storage for which I get an error:

Failure while creating lease store com.microsoft.azure.storage.StorageException: The client could not finish the operation within specified maximum execution time out 

Is there another way to define proxy for storage_connection?

UPDATE:
In case this might help someone. we found out that the HTTP class for azure storage container (JDK HTTPConnection) uses the entire value of -Dhttps.proxyHost. Since we have defined the configuration with http:// then the proxy was unresolveable for JDK HTTPConnection while the class used for event hubs knows to parse that configuration and to remove the protocol from the hostname. After removing http:// from https.proxyHost both event hubs and storage_container were able to connect via proxy.

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

No branches or pull requests

7 participants