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

GAE+jdk7 regression introduced by ProxyDetector #3676

Closed
zpencer opened this issue Nov 7, 2017 · 0 comments

Comments

@zpencer
Copy link
Contributor

commented Nov 7, 2017

RPCs will just hang because ProxyDetectorImpl tries to use ProxySelector, resulting in this error:

  Caused by: java.lang.NoClassDefFoundError: java.net.ProxySelector is a restricted class. Please see the Google App Engine developer's guide for more details.
  	at com.google.apphosting.runtime.security.shared.stub.java.net.ProxySelector.<clinit>(ProxySelector.java)
  	at io.grpc.internal.ProxyDetectorImpl$2.get(ProxyDetectorImpl.java:69)
  	at io.grpc.internal.ProxyDetectorImpl$2.get(ProxyDetectorImpl.java:65)
  	at io.grpc.internal.ProxyDetectorImpl.detectProxy(ProxyDetectorImpl.java:140)
  	at io.grpc.internal.ProxyDetectorImpl.proxyFor(ProxyDetectorImpl.java:118)
  	at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:202)
  	at io.grpc.internal.InternalSubchannel.obtainActiveTransport(InternalSubchannel.java:183)
  	at io.grpc.internal.ManagedChannelImpl$SubchannelImpl.requestConnection(ManagedChannelImpl.java:928)
  	at io.grpc.PickFirstBalancerFactory$PickFirstBalancer.handleResolvedAddressGroups(PickFirstBalancerFactory.java:79)
  	at io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl$1.run(ManagedChannelImpl.java:834)
  	at io.grpc.internal.ChannelExecutor.drain(ChannelExecutor.java:72)
  	at io.grpc.internal.ManagedChannelImpl$LbHelperImpl.runSerialized(ManagedChannelImpl.java:800)
  	at io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl.onAddresses(ManagedChannelImpl.java:826)
  	at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:173)
  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1168)
  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:605)
  	at com.google.apphosting.runtime.ApiProxyImpl$CurrentRequestThreadFactory$1$1.run(ApiProxyImpl.java:1249)
  	at java.security.AccessController.doPrivileged(Native Method)
  	at com.google.apphosting.runtime.ApiProxyImpl$CurrentRequestThreadFactory$1.run(ApiProxyImpl.java:1243)
  	at java.lang.Thread.run(Thread.java:745)
  	at com.google.apphosting.runtime.ApiProxyImpl$CurrentRequestThread.run(ApiProxyImpl.java:1210)
  

java.net.Authenticator also has security restrictions and will likely have this problem. The solution is probably to check with the java.security.AccessController before performing the action, and falling back to no proxy if we fail. Since app engine is a highly restricted environment, do we even need to come up with an alternate way to configure a proxy here? @ejona86

@zpencer zpencer self-assigned this Nov 7, 2017

@zpencer zpencer closed this in #3677 Nov 7, 2017

@ejona86 ejona86 added this to the 1.8 milestone Nov 7, 2017

@lock lock bot locked as resolved and limited conversation to collaborators Sep 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.