GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a README section on supported runtime environments & workarounds · Issue #2039 · googleapis/google-cloud-java

Add a README section on supported runtime environments & workarounds #2039

New issue
Copy link
New issue
Copy link
Closed
Closed
Add a README section on supported runtime environments & workarounds#2039
Copy link
Assignees
garrettjonesgoogle
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@saturnism
saturnism
opened on May 8, 2017
Issue body actions

gRPC currently don't work well in embedded Tomcat or embedded Netty envs. Document what we know works and don't work and work arounds.

Specifically, if someone uses the client lib in Spring Boot, they need to exclude tomcat starter and use jetty starter instead.

Corollary to this, in each module's README, refer to this section for supported envs.

Activity

  1. shinfan
    added
    docs
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on May 8, 2017
  2. shinfan commented on May 8, 2017

    @shinfan
    shinfan
    on May 8, 2017
    Contributor
    More actions

    @saturnism Can you be more specific what did not work well in Tomcat or Netty?

  3. tswast commented on May 10, 2017

    @tswast
    tswast
    on May 10, 2017
    Contributor
    More actions

    I encountered this issue today with the Cloud Pub/Sub client library.

    With Spring Boot, I got the error "Jetty ALPN/NPN has not been properly configured" at runtime. These were my dependencies:

        <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-web</artifactId>
          <version>1.5.3.RELEASE</version>
        </dependency>
        <dependency>
          <groupId>org.springframework.security</groupId>
          <artifactId>spring-security-core</artifactId>
          <version>4.2.2.RELEASE</version>
        </dependency>
        <dependency>
          <groupId>com.google.cloud</groupId>
          <artifactId>google-cloud-pubsub</artifactId>
          <version>0.17.2-alpha</version>
        </dependency>
    

    The code worked without modification after I made Spring Boot use Jetty instead of Tomcat.

        <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-web</artifactId>
          <version>1.5.3.RELEASE</version>
          <exclusions>
            <exclusion>
              <!-- Use Jetty instead of Tomcat
                   https://www.mkyong.com/spring-boot/spring-boot-jetty-as-embedded-server/ -->
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-jetty</artifactId>
          <version>1.5.3.RELEASE</version>
        </dependency>
        <dependency>
          <groupId>org.springframework.security</groupId>
          <artifactId>spring-security-core</artifactId>
          <version>4.2.2.RELEASE</version>
        </dependency>
        <dependency>
          <groupId>com.google.cloud</groupId>
          <artifactId>google-cloud-pubsub</artifactId>
          <version>0.17.2-alpha</version>
        </dependency>
    
  4. jabubake commented on May 10, 2017

    @jabubake
    jabubake
    on May 10, 2017
    Contributor
    More actions

    Note has been added in the main README. We still need to add links to Supported environments on each module.

  5. joaoandremartins commented on May 11, 2017

    @joaoandremartins
    joaoandremartins
    on May 11, 2017
    More actions

    Yes, I just started using the PubSub API within a Spring Boot app and I'm getting this too.

    After reading a bit on this, I tried importing the netty-tcnative-boringssl-static dependency, as well as org.eclipse.jetty.npn.npn-api (since the code throwing this error is checking for org.eclipse.jetty.npn.NextProtoNego in the classpath) to no avail.

  6. shinfan commented on May 11, 2017

    @shinfan
    shinfan
    on May 11, 2017
    Contributor
    More actions

    @jabubake Can we close the issue now since the notes has been added?

  7. joaoandremartins commented on May 11, 2017

    @joaoandremartins
    joaoandremartins
    on May 11, 2017
    More actions

    Ideally, we would want gRPC to work with Tomcat seamlessly too.

  8. joaoandremartins commented on May 12, 2017

    @joaoandremartins
    joaoandremartins
    on May 12, 2017
    More actions

    Seems like a fix for this is coming out on a next release of the grpc-java library.
    grpc/grpc-java#2996

  9. Mistic92 commented on Jun 7, 2017

    @Mistic92
    Mistic92
    on Jun 7, 2017
    More actions

    Yesterday I have encountered the same problem with spring boot and pubsub lib. Even when I'm using Jetty I'm still getting "Jetty ALPN/NPN has not been properly configured."
    When can we expect fix?
    I see there is new version of grpc (1.3.0) so now we are waiting for pubsub?

  10. garrettjonesgoogle commented on Jul 17, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Jul 17, 2017
    Contributor
    More actions

    We have upgraded to grpc 1.4 which removes the conflict with Tomcat. Since the underlying issue should be fixed, I'm going to close this out.

  11. garrettjonesgoogle
    closed this as completedon Jul 17, 2017
  12. JustinBeckwith
    assigned
    garrettjonesgoogle
    on Feb 1, 2021
  13. suztomo
    added a commit that references this issue on Mar 23, 2026

    deps: update dependency com.google.cloud:sdk-platform-java-config to …

    053a868
  14. meltsufin
    added 3 commits that reference this issue on Apr 29, 2026

    docs: Update emulator sample to create a topic and publish to it (#2039)

    21d5cfc

    docs: Update emulator sample to create a topic and publish to it (#2039)

    50111d2

    deps: update googleapis/sdk-platform-java action to v2.55.0 (#2039)

    fa7c8d6
  15. benjaminp
    added a commit that references this issue on Jul 13, 2026

    test(deps): update dependency io.grpc:protoc-gen-grpc-java to v1.60.1 (…

    f8502ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @garrettjonesgoogle
    garrettjonesgoogle

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.