-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
HTTP_PROXY and HTTPS_PROXY environment variables are not correctly respected when jar-dependency fetch the pom. #6044
Comments
@tronicum Would you add the output of the following command to this issue, this will give us a bit more idea of what is actually going on.
Also the rc1 contains the latest beats so the update isn't needed. |
From the docket build log I see you are using a proxy, I am pretty sure the ENV is case sensitive and should be Reference #5906 |
yeah i noticed some Java programs require upper case HTTP_PROXY so I made the ENV to have both now and added the DEBUG=1:
|
i hoped for the Pioneer Program label ;-) |
This is the interesting part that we want :)
Can you rerun the same command with theses options and attach a gist to this issue, I have omited them at first because of the verbosity.
Also what distribution you are running? |
Lets link this issue to #5583, to make sure we found the root cause. |
I am using logstash:5 |
@tronicum what is the content of /root/.m2/repository/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom.lastUpdated ? |
I think maven which we use internally to resolve java dependency isn't able to use your http_proxy OR something with the certificates, the content of the lastUpdated will tell us exactly what is going on. I've tested the install and update on a clean debian jessie vm with rc1, and I did not encounter any errors. I will check with a proxy.
|
Good news, after configuring a few vagrant VMs, messing with squid and configuring the http_proxy and https_proxy I can now reproduce this error reliably. Looking at the mavengem-wagon-0.2.1.pom.lastUpdated
If use |
I have a workaround create a <settings>
<proxies>
<proxy>
<id>example-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>192.168.33.11</host>
<port>3128</port>
</proxy>
</proxies>
</settings> This seems the same issue I've created a few months ago mkristian/jar-dependencies#16 |
@ph any possibilities to fix this for 5.0.1? |
@gmoskovicz It wont be for 5.0.1 since it was released yesterday an upstream fix should be merged soon see mkristian/jar-dependencies#16 |
I cannot test this locally because: * logstash 5.x is not in the official package tree * the local package can be retrieved over VPN * but my local VPN client keeps crashing after a while * SSH proxy works but a Java package `logstash` depends on does not respect HTTP_PROXY "HTTP_PROXY and HTTPS_PROXY environment variables are not correctly respected when jar-dependency fetch the pom" elastic/logstash#6044 (comment) "Proxy support not working if using the environment" mkristian/jar-dependencies#16 mkristian/jar-dependencies#16 (comment)
As a temporary workaround for those that need to use a proxy, you could set the proxy as part of JRUBY_OPTS: For Docker images (in Dockerfile): Update 2:
|
* s/plugin/logstash-plugin/g `plugin` is deprecated. recent logstash documentation refer to `logstash-plugin`. while here remove `when: ansible_os_family == 'FreeBSD'`. * logstash-plugin is also installed without exec bit * support ubuntu * introduce logstash_package_name because FreeBSD has multiple version of logstash * try logstash 5.x I cannot test this locally because: * logstash 5.x is not in the official package tree * the local package can be retrieved over VPN * but my local VPN client keeps crashing after a while * SSH proxy works but a Java package `logstash` depends on does not respect HTTP_PROXY "HTTP_PROXY and HTTPS_PROXY environment variables are not correctly respected when jar-dependency fetch the pom" elastic/logstash#6044 (comment) "Proxy support not working if using the environment" mkristian/jar-dependencies#16 mkristian/jar-dependencies#16 (comment) * enable DEBUG * more debug flags * mount fdescfs and procfs also, remove DEBUG as it turns out that sysutils/logstash5 has a bug that removes exec bit of bundled gems' binaries. the port has been fixed. * the port has been merged * use canonical port name * s/fdesc/procfs/ * support logstash5 * wait for logstash after starting it in the first ansible play, it restarts logstash immediately after starting. this probably causes a race. * the default port is 9600 * validate logstash configuration files as there are multiple files, you cannot use `validate:`. * a typo * reload logstash instead of restarting it when the change is something in configuration files. * swap single quote and double quote * remove TODOs * pipeline.unsafe_shutdown can be enabled in logstash.yml * visualvm should be handled by its own role * config.reload.automatic can be enabled in logstash.yml * reload handler has been implemented * with ansible-role-redis, you can implement queuing * plugins has been managed by the role * comment why pif file is not used * always run logstash as user logstash as logstash creates directory and files when invoked. if logstash binaries, including logstash-plugin, runs as root, it causes subsequent logstash run to fail. * fix wrong keys * use logstash_config_merged instead of logstash_config * wait for logstash to start in handler there is a race when HUP terminates restart * fix a typo * document the finding * manage jvm.options * add other defaults * document new valiables * add License * add some comments * add comments on the task and the template with new configuration option system, the task and the template will be removed * update the example * add some notices * restore logstash_config no, rc.conf will not be removed as 'conf.d' must bedefined.
Fixed in 5.2.0 |
Faced same issue in Logstash version: 5.2.0 and resolved. On top of @alexvranceanu suggestions, I had to update proxy settings for Ruby-Mavan plugin at this location: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-libs-3.3.9/maven-home/conf/settings.xml |
I have also tested this on Logstash 5.2.0, the issue does not appear to be resolved. I had to set the JRUBY_OPTS variable: add the /root/.m2/settings.xml
modify /usr/share/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-libs-3.3.9/maven-home/conf/settings.xml
After doing these steps I was able to remove and install alternative versions of the Kafka plugins
|
Also not working on logstash 5.2.1 behind proxy with HTTP_PROXY, HTTPS_PROXY, http_proxy and https_proxy environment variables set |
@suyograo It is still broken in 5.2.2, @aleakhtar and @wonkyto workaround works. |
I can confirm the workarounds from @aleakhtar and @wonkyto on 5.2 with Ubuntu 14.04.4. |
I've managed to get it to work on Windows by changing this file (on top of the workarounds above): logstash-5.3.0\lib\pluginmanager\utils\http_client.rb Changing this line: To: Net::HTTP.start(uri.host, uri.port, "proxy.COMPANY.XXX", 83, "USER", "PASSWORD", :use_ssl => uri.scheme == HTTPS_SCHEME) { |http| yield http } However, I see that this file has been changed in the latest commits, so the issue should be fixed when 5.4 gets released. |
Guys! I don't know if I have to open a new issue or not. OS: Fedora 25 Note: I don't have a proxy configured in my network. Trying to install the logstash-filter-translate as following: I'm getting the following error :
Thanks in advance. |
@rabbitmz yes your problem is unlreated to the proxy case in this issue. but it seems to be a file permission problem (Errno::EPERM: Operation not permitted - Operation not permitted) in your case. please open a new issue if you need further assistance. |
I got this problem when accidentally executed |
Here I'm using v5.5.1 behind a proxy and still get the problem. error message below:
|
same issue as @TaurusD for me. |
FWIW (and after googling about for half an hour), I added
This managed to get me past logstash-plugin hanging (despite my proxy settings being correct). |
Trying to build docker image, changed from logstash:latest to logstash:5
I changed
logstash-plugin install logstash-input-beats
to
logstash-plugin update logstash-input-beats
as suggested in #5777 but it did not improve.
The text was updated successfully, but these errors were encountered: