java.security.AccessControlException: access denied (java.net.SocketPermission "123.45.67.89" resolve)

logging-log4j-user | AbelMacAdam | 9 years ago
  1. 0

    Logging events in Applet to server using log4j?

    logging-log4j-user | 9 years ago | AbelMacAdam
    java.security.AccessControlException: access denied (java.net.SocketPermission "123.45.67.89" resolve)
  2. 0

    Logging events in Applet to server using log4j?

    logging-log4j-user | 9 years ago | AbelMacAdam
    java.security.AccessControlException: access denied (java.net.SocketPermission "123.45.67.89" resolve)
  3. 0

    cannot load IGV

    Google Groups | 2 years ago | Shwetal Mehta
    java.security.AccessControlException: access denied ("java.net.SocketPermission" "broadinstitute.org" "resolve")
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    FULL PRODUCT VERSION : java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 6.1.7601] EXTRA RELEVANT SYSTEM CONFIGURATION : Corporate Environment - No direct connection to the internet - only via http/socks-proxys A DESCRIPTION OF THE PROBLEM : When in an environment where proxy configuration is determined by an autoconfig-script and jars have to be downloaded via proxys, JavaWS fails because of java.security.AccessControlException: access denied ("java.net.SocketPermission" "docs.oracle.com" "resolve") Because of different proxys for different destinations a single proxy configuration isn't applicable. REGRESSION. Last worked in version 8u20 ADDITIONAL REGRESSION INFORMATION: java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1. Be in a corporate environment and only have access to the internet and other destinations via (multiple) proxies 2. Deploy an autoconfig.conf like this: (actual content doesn't really matter here) ==================== function FindProxyForURL(url, host) { if(dnsResolve(host) == '') { return "DIRECT" } if (!isResolvable(host) && dnsDomainIs(host, "some.domain.com")) { return "PROXY a.proxy.in.your.company:proxyport"; } if (isInNet(host, "255.255.0.0", "255.255.0.0") && false) { return "DIRECT"; } return "PROXY yourproxy:yourproxyport"; } ==================== 3. Go to http://docs.oracle.com/javase/tutorial/uiswing/layout/gridbag.html and launch the demo: http://docs.oracle.com/javase/tutorialJWS/samples/uiswing/GridBagLayoutDemoProject/GridBagLayoutDemo.jnlp EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The jnlp should load and spawn a new java process launching the demo. ACTUAL - The Application could not be started because of com.sun.deploy.net.FailedDownloadException: Ressource konnte nicht geladen werden: http://docs.oracle.com/javase/tutorialJWS/samples/uiswing/GridBagLayoutDemoProject/GridBagLayoutDemo.jnlp ERROR MESSAGES/STACK TRACES THAT OCCUR : java.security.AccessControlException: access denied ("java.net.SocketPermission" "docs.oracle.com" "resolve") at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getByName(Unknown Source) at com.sun.deploy.net.proxy.PACFunctionsImpl.dnsResolve(Unknown Source) at com.sun.deploy.net.proxy.PACFunctionsImpl.isResolvable(Unknown Source) at com.sun.deploy.net.proxy.SunAutoProxyHandler$9.apply(Unknown Source) at com.sun.deploy.net.proxy.SunAutoProxyHandler$9.apply(Unknown Source) at jdk.nashorn.internal.scripts.Script$\^eval\_.:scopeCall-6(<eval>) at jdk.nashorn.internal.scripts.Script$\^eval\_.FindProxyForURL(<eval>:155) at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:539) at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:209) at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:378) at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:185) at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:505) at jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:227) at com.sun.deploy.net.proxy.SunAutoProxyHandler.jsGetProxyInfo(Unknown Source) at com.sun.deploy.net.proxy.SunAutoProxyHandler.access$100(Unknown Source) at com.sun.deploy.net.proxy.SunAutoProxyHandler$2.run(Unknown Source) at com.sun.deploy.net.proxy.SunAutoProxyHandler$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.deploy.net.proxy.SunAutoProxyHandler.jsGetProxyInfo(Unknown Source) at com.sun.deploy.net.proxy.SunAutoProxyHandler.getProxyInfo(Unknown Source) at com.sun.deploy.net.proxy.DynamicProxyManager.getProxyList(Unknown Source) at com.sun.deploy.net.proxy.DeployProxySelector.select(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessController.doPrivileged(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessController.doPrivileged(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source) at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source) at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source) at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source) at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source) at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source) at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source) at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source) at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) at com.sun.javaws.Launcher.launch(Unknown Source) at com.sun.javaws.Main.launchApp(Unknown Source) at com.sun.javaws.Main.continueInSecureThread(Unknown Source) at com.sun.javaws.Main.access$000(Unknown Source) at com.sun.javaws.Main$1.run(Unknown Source) at java.lang.Thread.run(Unknown Source) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- http://docs.oracle.com/javase/tutorialJWS/samples/uiswing/GridBagLayoutDemoProject/GridBagLayoutDemo.jnlp ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : When you must use an autoconfig-script in your environment - there's no workaround except sticking to Java 8u20 or Java 7u67; but those have critical security advirories. SUPPORT : YES

    JDK Bug System | 2 years ago | Webbug Group
    java.security.AccessControlException: access denied ("java.net.SocketPermission" "docs.oracle.com" "resolve")
  6. 0

    Bug ID: JDK-8061643 JavaWS fails with proxy autoconfig due to missing "resolve" permission

    java.com | 7 months ago
    java.security.AccessControlException: access denied ("java.net.SocketPermission" "docs.oracle.com" "resolve")

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.security.AccessControlException

      access denied (java.net.SocketPermission "123.45.67.89" resolve)

      at java.security.AccessControlContext.checkPermission()
    2. Java RT
      InetAddress.getByName
      1. java.security.AccessControlContext.checkPermission(Unknown Source)
      2. java.security.AccessController.checkPermission(Unknown Source)
      3. java.lang.SecurityManager.checkPermission(Unknown Source)
      4. java.lang.SecurityManager.checkConnect(Unknown Source)
      5. java.net.InetAddress.getAllByName0(Unknown Source)
      6. java.net.InetAddress.getAllByName(Unknown Source)
      7. java.net.InetAddress.getAllByName(Unknown Source)
      8. java.net.InetAddress.getByName(Unknown Source)
      8 frames
    3. Apache Log4j
      SocketAppender.setRemoteHost
      1. org.apache.log4j.net.SocketAppender.getAddressByName(SocketAppender.java:277)
      2. org.apache.log4j.net.SocketAppender.setRemoteHost(SocketAppender.java:298)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    5. Apache Log4j
      Logger.getLogger
      1. org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:206)
      2. org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:165)
      3. org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:130)
      4. org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)
      5. org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)
      6. org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
      7. org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
      8. org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
      9. org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
      10. org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
      11. org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
      12. org.apache.log4j.Logger.getLogger(Logger.java:118)
      12 frames
    6. foo.bar
      MyApplet.init
      1. foo.bar.MyApplet.init(MyApplet.java:61)
      1 frame
    7. Java RT
      Thread.run
      1. sun.applet.AppletPanel.run(Unknown Source)
      2. java.lang.Thread.run(Unknown Source)
      2 frames