獲取java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured
,同時使用gRPC(google pub/sub)
發佈/使用來自的消息Kafka。java.lang.IllegalArgumentException:Jetty ALPN/NPN尚未正確配置
回答
嘗試在netty-tcnative-boringssl-static上添加運行時依賴項。請參閱gRPC的SECURITY.md。請注意,網絡版本必須隨時間變化;您應該查看特定版本的文檔版本(例如,this is for 1.2.0)。
嘗試了這個選項。 – Gowda
試過以下方法。
1. As suggested by google, use jetty container instead of tomcat, this solution works, but in our production, applications deployed on tomcat container. – No from team
2. On debugging the gRPC code, found that guava version causing the issue, updated the guava version 18.0, (where in some classes missed in previous versions) , solved the problem , but failed while deploying in CF
3. Customized emebed-tomcat-core, and it works fine consistently – but team say no to custom tomcat container.
4. Java –jar apm-asset-xxxx.jar – works fine locally, but need to provide a custom command to CF start, didn’t have luxury to change the CF start process.
5. Finally, trick, the class loader to use tcnative-boring-ssl, library instead of tomcat-core library at runtime, by providing the following dependency in pom.xml. From past 3 days, this solution is working CF.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<scope>provided</scope>
</dependency>
6. Maven manifest plugin to promote the tc-native library to the top in the classloader.
夥計,加入這個問題。這不是一個論壇 –
在POM中,嘗試在spring引導依賴關係(依賴關係的順序)之前放置gRPC依賴關係。我這樣做了,問題解決了。例如:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-language</artifactId>
<version>0.13.0-beta</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
依賴關係的順序並不重要,它在本地工作,在啓動之前使用gRPC/tc-native。在Cloud Foundry中部署時,依賴jar將按照字母數字順序提取到app文件夾。 – Gowda
我看到了,那麼問題可能與我的不同。我正在嘗試Google Cloud ... –
最後,回到引導類的類路徑的方法。將jetty-alpn.jar作爲前綴引導類路徑,現在它開始在雲代工廠正常工作。
添加與我的JDK版本匹配的ALPN客戶端JAR爲我解決了這個問題。在eclipse中,您需要將jar設置爲tomcat服務器的引導條目。
您可以在這裏找到更多的信息:https://medium.com/@Parithi/jetty-alpn-npn-has-not-been-properly-configured-solution-418417ee6502
- 1. Google-Cloud:Jetty ALPN/NPN尚未正確配置
- 2. Data Span with Cloud Spanner:java.lang.IllegalArgumentException:Jetty ALPN/NPN尚未正確配置
- 3. Gerrit googleplay發佈者插件憑據尚未正確配置
- 4. Mercurial未正確配置
- 5. CommandText屬性尚未正確初始化
- 6. Angular JS視圖尚未正確更新
- 7. Xamarin.UITests ApkFile或InstalledApp尚未配置在VS
- 8. 包mariadb-server-5.5尚未配置
- 9. WiX未正確配置IIS站點
- 10. 未配置SSL證書正確
- 11. 服務器未正確配置(-12939)
- 12. Karma配置未能正確加載
- 13. 正確配置
- 14. QMAKE:QMAKESPEC尚未設置
- 15. 環回:無法調用Notification.create()。創建方法尚未設置。 PersistedModel尚未正確連接到DataSource
- 16. 正確配置.htaccess
- 17. 正確配置signal.setitimer()
- 18. 正確配置Opserver
- 19. 正確配置Pocketsphinx
- 20. 正確配置SimpleRabbitListenerContainerFactory
- 21. 未正確分配數組
- 22. 記錄「老」未分配尚未
- 23. 尚未設置JSF 2.0 @ManagedProperty
- 24. 尚未設置proprities的類
- 25. 設置:System.Exception的:ApkFile或InstalledApp尚未配置
- 26. htacess配置不正確配置
- 27. Django教程 - 未正確配置的異常(未安裝pytz)
- 28. 亞行未能啓動確保該插件已正確配置
- 29. VB.NET確定哪些屬性尚未分配值
- 30. JOD Converter未正確設置
請提供[mcve]。 – zett42
格式化和新標籤 – HRgiger
你使用的是spring boot w/embedded tomcat嗎? – saturnism