Bug 735336
Summary: | Gnome proxy settings not picked up by JVM, with java.net.useSystemProxies=true | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Reinout van Schouwen <reinouts> | ||||
Component: | java-1.7.0-openjdk | Assignee: | Andrew John Hughes <ahughes> | ||||
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 20 | CC: | ahughes, control-center-maint, dbhole, jerboaa, jon.vanalten, jvanek, lkundrak, mjw, mmatejov, omajid, rstrode, typrase | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-06-30 00:34:19 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 738952 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Reinout van Schouwen
2011-09-02 12:08:31 UTC
Just looked into this one.. it looks like a bug in gnome-control-center. When proxy settings are changed through gnome-control-center, it does not modify the value of any of the elements in /system/http_proxy/ as it ought to. If the elements are manually set (via cli or a tool like gconf-editor), Java uses the proxy correctly. Changing component to control-center. (In reply to comment #1) > When proxy settings are changed through gnome-control-center, it does not > modify the value of any of the elements in /system/http_proxy/ as it ought to. > > If the elements are manually set (via cli or a tool like gconf-editor), Java > uses the proxy correctly. > > Changing component to control-center. Note that changes *do* show up in dconf-editor under System > proxy. Perhaps gconf settings should also be adjusted for backwards compatibility. Ah, didn't realize it is read from dconf now. Java currently has no mechanism to check dconf, so if the settings could be replicated into gconf for compatibility, that'd be great! It sounds like OpenJDK needs updating to use glib and GSettings (which has a dconf backend) and not gconf. Had a look at this more this morning. The change to OpenJDK looks pretty simple. Reassign as a Java bug. Taking bug. Well, I have this working: public class TestProxy { public static void main(String[] args) throws Exception { System.out.println(new DefaultProxySelector().select(new URI("http://redhat.com"))); } } phost: null, pport: 0, systemProxies: true cproto: http use_same_proxy: 1 used_proto: http use_proxy: 1, mode: manual phost: orthanc, pport: 3128 *ptr: localhost, urlhost: redhat.com *ptr: 127.0.0.0/8, urlhost: redhat.com [HTTP @ orthanc:3128] The final line being the output from the program, and the above ones the result of a few debugging lines I added to the native code to check the return values from gsettings. An issue that came up in developing this is that GNOME Control Center currently doesn't set some of the required values explicitly, notably enabling the HTTP proxy: <key type="b" name="enabled"> <default>false</default> <summary>Use HTTP proxy</summary> <description>Enables the proxy settings when accessing HTTP over the Internet.</description> </key> and allowing per-protocol settings: <key type="b" name="use-same-proxy"> <default>true</default> <summary>Use same proxy for all protocols</summary> <description>Whether to use the same proxy for all protocols or not.</description> </key> Instead, we get the default values which means the HTTP proxy is always disabled and the same proxy (assumed to be HTTP in the existing code) is used for all. I'll file an appropriate bug with the control center for this. The settings can be fixed manually using dconf-editor and, as GSettings works via backends, this also works with gconf via the GSettings gconf backend. Depend on control center bug. This is fixed in IcedTea7: http://icedtea.classpath.org/hg/icedtea7-forest/jdk/rev/a8b6a570543b I'll make a backport to IcedTea6 once 7-2.0 is out the door. This message is a notice that Fedora 15 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 15. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '15' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 15 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping (In reply to comment #10) > This is fixed in IcedTea7: > > http://icedtea.classpath.org/hg/icedtea7-forest/jdk/rev/a8b6a570543b > > I'll make a backport to IcedTea6 once 7-2.0 is out the door. Did this happen? It would be good for F16 users still... This is in 7, as far as I'm aware. There didn't seem to be much point adding it to 6 with it being gone in F17. Can someone confirm the issue is fixed? Moving to F16, but I'd like to know it works with 7 before backporting. $ java -version java version "1.7.0_05-icedtea" OpenJDK Runtime Environment (fedora-2.2.1.fc17.9-x86_64) OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode) [reinout@elmont Downloads]$ java TestProxy proxy hostname : DIRECT No Proxy I'm afraid it doesn't work with current icedtea in F17... This message is a reminder that Fedora 16 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '16'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 16's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 16 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Still an issue. We fixed the issue, but then GNOME changed the schemas and broke the fix... (In reply to comment #17) > Still an issue. We fixed the issue, but then GNOME changed the schemas and > broke the fix... Looking at the code, the schemas weren't changed as such, but the key org.gnome.system.proxy.use_same_proxy was deprecated and the openjdk patch depended on that. By simply checking whether the org.gnome.system.proxy.mode == 'manual' and forgoing the use_same_proxy check, I believe this issue could be fixed for all GNOME 3 versions. This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19 Moving to java-1.7.0-openjdk as java-1.6.0-openjdk hasn't been in Fedora for a long time. This should have been fixed by the 2.5.3 update in October 2014. Can someone please confirm that it now works? It worked for me with GNOME 3.12.2. This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |