question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. when trying to use PubSub

See original GitHub issue

Hi,

I am trying to use the google cloud libraries to connect to PubSub but I am getting the following exception when trying to execute the following code:

projectID = "XYZ";
subscriptionID = "ABC/XYZ";
subscriptionName = SubscriptionName.create(projectID, subscriptionID);
subscriber = Subscriber.defaultBuilder(subscriptionName, new MessageReceiverEx()).build();
subscriber.startAsync().awaitRunning();
Caused by: java.lang.IllegalStateException: Expected the service InnerService [FAILED] to be RUNNING, but the service has FAILED
        at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:328)
        at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:266)
        at com.google.api.core.AbstractApiService.awaitRunning(AbstractApiService.java:97)
at ...


Caused by: java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.
        at io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:174)
        at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:151)
        at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:139)
        at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:109)
        at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.<init>(NettyChannelBuilder.java:470)
        at io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:338)
        at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:305)
        at com.google.api.gax.grpc.InstantiatingChannelProvider.createChannel(InstantiatingChannelProvider.java:125)
        at com.google.api.gax.grpc.InstantiatingChannelProvider.getChannel(InstantiatingChannelProvider.java:110)
        at com.google.cloud.pubsub.v1.Subscriber.doStart(Subscriber.java:239)
        at com.google.api.core.AbstractApiService$InnerService.doStart(AbstractApiService.java:149)
        at com.google.common.util.concurrent.AbstractService.startAsync(AbstractService.java:211)
        at com.google.api.core.AbstractApiService.startAsync(AbstractApiService.java:121)
        at com.google.cloud.pubsub.v1.Subscriber.startAsync(Subscriber.java:228)

The last line in my code (subscriber.startAsync().awaitRunning();) is the position where the upper exception origines from.

Am I using something wrong or is this a bug? I am using compile group: 'com.google.cloud', name: 'google-cloud-pubsub', version:'0.22.0-beta' as gradle dependency.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:27 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
Mistic92commented, Sep 3, 2017

What system are you using? I had similar problem but because of alpine linux

2reactions
lesvcommented, Sep 24, 2017

Google libs bring in: netty-tcnative-boringssl-static 1.1.33.Fork26 which is incompatible with the 2.x.x of netty-tcnative

I’ll ask the client library team if they can shade or upgrade this stuff.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jetty ALPN/NPN has not been properly configured
Just started trying to use Google Cloud PubSub for the first time with my GAE (Standard) app. When trying to create a topic...
Read more >
Different Netty Versions in dependencies of flink-runtime make ...
Caused by: java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. at io.grpc.netty.GrpcSslContexts.
Read more >
Event Hub Service - General Electric
The Event Hub publish-subscribe service is built to be secure, highly scalable, ... java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly.
Read more >
Jetty ALPN/NPN has not been properly configured-Springboot
Coding example for the question java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured-Springboot.
Read more >
Authentication
Version Independence: does not require using a different library version depending ... is not configured properly” or “Jetty ALPN/NPN has not been properly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found