{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2398","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2398/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2398/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2398/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/2398","id":254442149,"number":2398,"title":"java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. when trying to use PubSub","user":{"login":"sceee","id":11340487,"avatar_url":"https://avatars2.githubusercontent.com/u/11340487?v=4","gravatar_id":"","url":"https://api.github.com/users/sceee","html_url":"https://github.com/sceee","followers_url":"https://api.github.com/users/sceee/followers","following_url":"https://api.github.com/users/sceee/following{/other_user}","gists_url":"https://api.github.com/users/sceee/gists{/gist_id}","starred_url":"https://api.github.com/users/sceee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sceee/subscriptions","organizations_url":"https://api.github.com/users/sceee/orgs","repos_url":"https://api.github.com/users/sceee/repos","events_url":"https://api.github.com/users/sceee/events{/privacy}","received_events_url":"https://api.github.com/users/sceee/received_events","type":"User","site_admin":false},"labels":[{"id":175662347,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/API:%20pubsub","name":"API: pubsub","color":"cd7f32","default":false},{"id":144595203,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/Type:%20Bug","name":"Type: Bug","color":"db4437","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-08-31T19:25:54Z","updated_at":"2017-09-15T21:13:05Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI 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:\r\n\r\n\r\n```\r\nprojectID = \"XYZ\";\r\nsubscriptionID = \"ABC/XYZ\";\r\nsubscriptionName = SubscriptionName.create(projectID, subscriptionID);\r\nsubscriber = Subscriber.defaultBuilder(subscriptionName, new MessageReceiverEx()).build();\r\nsubscriber.startAsync().awaitRunning();\r\n```\r\n\r\n```\r\nCaused by: java.lang.IllegalStateException: Expected the service InnerService [FAILED] to be RUNNING, but the service has FAILED\r\n        at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:328)\r\n        at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:266)\r\n        at com.google.api.core.AbstractApiService.awaitRunning(AbstractApiService.java:97)\r\nat ...\r\n\r\n\r\nCaused by: java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.\r\n        at io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:174)\r\n        at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:151)\r\n        at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:139)\r\n        at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:109)\r\n        at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.<init>(NettyChannelBuilder.java:470)\r\n        at io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:338)\r\n        at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:305)\r\n        at com.google.api.gax.grpc.InstantiatingChannelProvider.createChannel(InstantiatingChannelProvider.java:125)\r\n        at com.google.api.gax.grpc.InstantiatingChannelProvider.getChannel(InstantiatingChannelProvider.java:110)\r\n        at com.google.cloud.pubsub.v1.Subscriber.doStart(Subscriber.java:239)\r\n        at com.google.api.core.AbstractApiService$InnerService.doStart(AbstractApiService.java:149)\r\n        at com.google.common.util.concurrent.AbstractService.startAsync(AbstractService.java:211)\r\n        at com.google.api.core.AbstractApiService.startAsync(AbstractApiService.java:121)\r\n        at com.google.cloud.pubsub.v1.Subscriber.startAsync(Subscriber.java:228)\r\n```\r\n\r\nThe last line in my code (`subscriber.startAsync().awaitRunning();`) is the position where the upper exception origines from.\r\n\r\n\r\nAm I using something wrong or is this a bug?\r\nI am using `compile group: 'com.google.cloud', name: 'google-cloud-pubsub', version:'0.22.0-beta'` as gradle dependency."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/comments/329904424","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/2398#issuecomment-329904424","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2398","id":329904424,"user":{"login":"Mistic92","id":2607098,"avatar_url":"https://avatars1.githubusercontent.com/u/2607098?v=4","gravatar_id":"","url":"https://api.github.com/users/Mistic92","html_url":"https://github.com/Mistic92","followers_url":"https://api.github.com/users/Mistic92/followers","following_url":"https://api.github.com/users/Mistic92/following{/other_user}","gists_url":"https://api.github.com/users/Mistic92/gists{/gist_id}","starred_url":"https://api.github.com/users/Mistic92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mistic92/subscriptions","organizations_url":"https://api.github.com/users/Mistic92/orgs","repos_url":"https://api.github.com/users/Mistic92/repos","events_url":"https://api.github.com/users/Mistic92/events{/privacy}","received_events_url":"https://api.github.com/users/Mistic92/received_events","type":"User","site_admin":false},"created_at":"2017-09-15T21:13:05Z","updated_at":"2017-09-15T21:13:05Z","author_association":"NONE","body":"I just get similar error with Spring Boot 2.0.0.M4. On 1.5.6.RELEASE its ok\r\n\r\n```\r\n2017-09-15 23:10:17.353 [pool-2-thread-1]       ERROR -c.b.b.f.p.PubSubWorker$1- Jetty ALPN/NPN has not been properly configured.\r\njava.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.\r\n\tat io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:159) ~[grpc-netty-1.6.1.jar:1.6.1]\r\n\tat io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:136) ~[grpc-netty-1.6.1.jar:1.6.1]\r\n\tat io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:124) ~[grpc-netty-1.6.1.jar:1.6.1]\r\n\tat io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:94) ~[grpc-netty-1.6.1.jar:1.6.1]\r\n\tat io.grpc.netty.NettyChannelBuilder$NettyTransportFactory$DefaultNettyTransportCreationParamsFilterFactory.<init>(NettyChannelBuilder.java:525) ~[grpc-netty-1.6.1.jar:1.6.1]\r\n\tat io.grpc.netty.NettyChannelBuilder$NettyTransportFactory$DefaultNettyTransportCreationParamsFilterFactory.<init>(NettyChannelBuilder.java:518) ~[grpc-netty-1.6.1.jar:1.6.1]\r\n\tat io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.<init>(NettyChannelBuilder.java:457) ~[grpc-netty-1.6.1.jar:1.6.1]\r\n\tat io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:326) ~[grpc-netty-1.6.1.jar:1.6.1]\r\n\tat io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:315) ~[grpc-core-1.6.1.jar:1.6.1]\r\n\tat com.google.api.gax.grpc.InstantiatingChannelProvider.createChannel(InstantiatingChannelProvider.java:131) ~[gax-grpc-0.25.1.jar:?]\r\n\tat com.google.api.gax.grpc.InstantiatingChannelProvider.getChannel(InstantiatingChannelProvider.java:116) ~[gax-grpc-0.25.1.jar:?]\r\n\tat com.google.cloud.pubsub.v1.Subscriber.doStart(Subscriber.java:239) ~[google-cloud-pubsub-0.23.1-beta.jar:0.23.1-beta]\r\n\tat com.google.api.core.AbstractApiService$InnerService.doStart(AbstractApiService.java:149) ~[api-common-1.1.0.jar:?]\r\n\tat com.google.common.util.concurrent.AbstractService.startAsync(AbstractService.java:211) [guava-20.0.jar:?]\r\n\tat com.google.api.core.AbstractApiService.startAsync(AbstractApiService.java:121) [api-common-1.1.0.jar:?]\r\n\tat com.google.cloud.pubsub.v1.Subscriber.startAsync(Subscriber.java:228) [google-cloud-pubsub-0.23.1-beta.jar:0.23.1-beta]\r\n```"}}
{"actor":{"display_login":"Mistic92"}}