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

[BUG] java.lang.NullPointerException: proxySelector == null while getting azure virtual networks #3939

Closed
3 tasks
giridharkn opened this issue Jun 17, 2019 · 7 comments · Fixed by Azure/autorest-clientruntime-for-java#628 or Azure/azure-libraries-for-java#790
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Network - Virtual Network Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@giridharkn
Copy link

Describe the bug
A clear and concCaused by: java.lang.NullPointerException: proxySelector == null
at okhttp3.Address.(Address.java:77)
at okhttp3.internal.http.HttpEngine.createAddress(HttpEngine.java:1036)
at okhttp3.internal.http.HttpEngine.(HttpEngine.java:180)
at okhttp3.RealCall.getResponse(RealCall.java:232)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
at com.microsoft.rest.retry.RetryHandler.intercept(RetryHandler.java:75)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at com.microsoft.rest.interceptors.CustomHeadersInterceptor.intercept(CustomHeadersInterceptor.java:140)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at com.microsoft.rest.interceptors.UserAgentInterceptor.intercept(UserAgentInterceptor.java:83)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at com.microsoft.azure.credentials.AzureTokenCredentialsInterceptor.intercept(AzureTokenCredentialsInterceptor.java:40)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor.intercept(ResourceManagerThrottlingInterceptor.java:43)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor.intercept(ProviderRegistrationInterceptor.java:43)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at com.microsoft.rest.interceptors.BaseUrlHandler.intercept(BaseUrlHandler.java:43)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at com.microsoft.rest.interceptors.RequestIdHeaderInterceptor.intercept(RequestIdHeaderInterceptor.java:29)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
at okhttp3.RealCall.execute(RealCall.java:57)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:174)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:171)
at rx.Subscriber.setProducer(Subscriber.java:211)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer(OnSubscribeMap.java:102)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.subscribe(Observable.java:10238)
at rx.Observable.subscribe(Observable.java:10205)
at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:444)
at rx.observables.BlockingObservable.single(BlockingObservable.java:341)
at com.microsoft.azure.management.network.implementation.VirtualNetworksInner.list(VirtualNetworksInner.java:611)ise description of what the bug is.

Exception or Stack Trace
Add the exception log and stack trace if available

To Reproduce
Steps to reproduce the behavior:

Code Snippet
Add the code snippet that causes the issue.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [e.g. iOS]
  • IDE : [e.g. IntelliJ]
  • Version of the Library used

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@giridharkn
Copy link
Author

Exception is thrown at,
VirtualNetworksInner.list() call.

NetworkManagementClientImpl is configured with Proxy

@praries880 praries880 added common common module used by all azure SDKs (e.g. client, Mgmt) customer-reported Issues that are reported by GitHub users external to the Azure organization. Network Service Attention Workflow: This issue is responsible by Azure service team. labels Jun 17, 2019
@praries880 praries880 added Mgmt This issue is related to a management-plane library. and removed common common module used by all azure SDKs (e.g. client, Mgmt) labels Jun 17, 2019
@praries880
Copy link
Contributor

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

@giridharkn
Copy link
Author

I have found similar issue here this square/okhttp#4232 which was seems to be fixed in okhttp library.
Can i know, which azure SDK utilizes this latest okhttp library ??
Or using this library in current SDK will work ??

@jianghaolu
Copy link
Contributor

jianghaolu commented Jul 24, 2019

@giridharkn We are using 3.11 version of OkHttp (https://github.com/Azure/autorest-clientruntime-for-java/blob/master/pom.xml#L67). I'll update it to the latest and test it.

@jianghaolu jianghaolu self-assigned this Jul 24, 2019
@jianghaolu
Copy link
Contributor

Just to give a follow up response, I'm looking into this now and should be able to verify the 3.14 release resolves this issue (or not) early next week.

In the mean time you could work around this issue by forcing the okhttp version in your pom to 3.14. Let me know if you need anything else.

@joshfree
Copy link
Member

Also to note that the upgrade to 3.14 will ship in the next release of the SDK package.

@jianghaolu
Copy link
Contributor

@giridharkn We just released the 1.24.1 version of the SDK containing the 3.12.2 version of the OkHttp dependency. I verified it locally that the proxy selector issue is fixed. You can find the SDK at https://search.maven.org/artifact/com.microsoft.azure/azure/1.24.1/jar.

Please let us know and feel free to reopen the issue if you have any questions! We are excited to help you get unblocked!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Network - Virtual Network Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
5 participants