我正在尝试在新鲜的linux环境中安装opengrok。我已按照以下指示行事:https://github.com/oracle/opengrok/wiki/how-to-setup-opengrok.
一旦我安装了opengrok和tomcat,我就将source.war从opengrok复制到了tomcat/webapps。当我尝试连接时复制后http://localhost:8080/source 它总是给我这个404找不到的错误:
HTTP Status 404 – Not Found
Type Status Report
Message The requested resource [/source] is not available
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.48
我使用的是最新的opengrok版本和tomcat版本:ApacheTomcat/9.0.48
以下是opengrok日志中的详细错误:
11:49:08 SEVERE: Couldn't notify the webapp on http://localhost:8080/source.
jakarta.ws.rs.NotFoundException: HTTP 404 Not Found
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:916)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:723)
at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:643)
at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:665)
at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:659)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:205)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390)
at org.glassfish.jersey.client.JerseyInvocation.runInScope(JerseyInvocation.java:659)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:642)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:417)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:313)
at org.opengrok.indexer.index.IndexerUtil.enableProjects(IndexerUtil.java:79)
at org.opengrok.indexer.index.Indexer.main(Indexer.java:334)
Couldn't notify the webapp on http://localhost:8080/source: HTTP 404 Not Found.
11:49:09 SEVERE: Failed to send configuration to http://localhost:8080/source (is web application server running with opengrok deployed?)
java.io.IOException: InboundJaxrsResponse{context=ClientResponse{method=PUT, uri=http://localhost:8080/source/api/v1/configuration?reindex=true, status=405, reason=Method Not Allowed}}
at org.opengrok.indexer.configuration.RuntimeEnvironment.writeConfiguration(RuntimeEnvironment.java:1427)
at org.opengrok.indexer.index.Indexer.sendToConfigHost(Indexer.java:1149)
at org.opengrok.indexer.index.Indexer.main(Indexer.java:378)
需要帮助解决404 tomcat错误并设置opengrok。
提前谢谢
1条答案
按热度按时间8wtpewkr1#
在您引用的安装页面上,您可以在“要求”下找到:
类似glassfish或tomcat10.0或更高版本的servlet容器
(我的重点)。
source.war
是一个jakarta ee 9应用程序,它不能在tomcat 9.0上工作。由于版本1.6.0,opengrok需要一个servlet 5.0容器。