通过 https 运行与 Geoserver 平台无关的二进制文件?
Posted
技术标签:
【中文标题】通过 https 运行与 Geoserver 平台无关的二进制文件?【英文标题】:Run Geoserver platform independent binary over https? 【发布时间】:2020-06-26 18:29:02 【问题描述】:我是 Geoserver 的新手,现在我需要通过 https 运行 geoserver。我已经按照一些步骤为 https 配置了码头,但它不起作用,我可能在某个地方出错了。
java.lang.IllegalStateException: No constructor class org.eclipse.jetty.server.ServerConnector([],) in file:/C:/Users/sanja/Downloads/geoserver-2.17.1-bin/etc/jetty-https.xml
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:406)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:311)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1558)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1512)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
at org.eclipse.jetty.start.Main.start(Main.java:490)
at org.eclipse.jetty.start.Main.main(Main.java:77)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
at org.eclipse.jetty.start.Main.start(Main.java:490)
at org.eclipse.jetty.start.Main.main(Main.java:77)
Caused by: java.lang.IllegalStateException: No constructor class org.eclipse.jetty.server.ServerConnector([],) in file:/C:/Users/sanja/Downloads/geoserver-2.17.1-bin/etc/jetty-https.xml
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:406)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:311)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1558)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1512)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
... 7 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
at org.eclipse.jetty.start.Main.start(Main.java:490)
at org.eclipse.jetty.start.Main.main(Main.java:77)
Caused by: java.lang.IllegalStateException: No constructor class org.eclipse.jetty.server.ServerConnector([],) in file:/C:/Users/sanja/Downloads/geoserver-2.17.1-bin/etc/jetty-https.xml
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:406)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:311)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1558)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1512)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
... 7 more
这些是错误(参考图片)。
我也不太会java。
【问题讨论】:
请将错误注释添加为文本,而不是图像。那些有辅助需要的人能够更容易地提供帮助。 【参考方案1】:不要在生产环境中运行独立于平台的二进制文件!
如果您仍需要添加 HTTPS 支持,则需要关注Eclipse instructions to add HTTPS to Jetty。
在不知道你在这条道路上走了多远的情况下,不可能提供任何进一步的建议。
【讨论】:
YES....终于它现在在 https 上工作了,但仍然显示“不安全”,这可能是由于自签名证书。谢谢@Ian Turton 先生。 如果它解决了您的问题,请接受答案 - 或添加您自己的答案,描述您设置 HTTPS 所采取的确切步骤。当您使用它时,请拨打tour 了解该网站如何在未来为您提供帮助 @IanTurton 为什么不建议在生产环境中将 geoserver 作为独立于平台的二进制文件运行?以上是关于通过 https 运行与 Geoserver 平台无关的二进制文件?的主要内容,如果未能解决你的问题,请参考以下文章