Shibboleth IdP 无法从 Jetty 9.3 启动

Shibboleth IdP 无法从 Jetty 9.3 启动

我一直在关注本指南在 Jetty 9.3.22(带有 Oracle JDK 8u151 的 Ubuntu Server 16.04)上安装 Shibboleth Identity Provider 3.3.2。

https://my.server.ip/idp我收到 503 错误 ( Service Unavailable)。

  • Jetty Home:(/opt/jetty/jetty-distribution符号链接到 jetty-distribution-9.3.22.v20171030同一目录)
  • 码头基地:/opt/jetty/jetty-base
  • Shibboleth 安装:/opt/shibboleth-idp

我已经创建了一个jetty用户并且正在使用设置用户标识绑定到端口 80 和 443。jetty:jetty拥有/opt/jetty/和下的所有内容/opt/shibboleth-idp

下面是日志和配置,不过配置大部分都是从说明中复制/粘贴的。我还按照说明配置了 logback,但似乎可以正常工作,所以除非必要,否则我不会包含配置。

我还应该指出,我还没有开始配置 Shibboleth。据我所知,我至少应该能够运行此命令并获得一些结果:

root@shib:/opt/shibboleth-idp/bin# ./status.sh 
(http://localhost/idp/status) Server returned HTTP response code: 503 for URL: http://localhost/idp/status

在导航到任何 URL 之前,我/opt/jetty/jetty-base/log/jetty.log在启动 jetty 服务时得到了这个信息:

    19:55:27.983 - WARN [org.eclipse.jetty.webapp.WebAppContext:531] - Failed startup of context o.e.j.w.WebAppContext@23a5fd2{/idp,[file:///opt/jetty/jetty-base/tmp/jetty-0.0.0.0-80-idp.war-_idp-any-1528794646328615543.dir/webinf/, jar:file:///opt/shibboleth-idp/war/idp.war!/],UNAVAILABLE}{/opt/shibboleth-idp/war/idp.war}
    org.eclipse.jetty.util.MultiException: Multiple exceptions
            at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:539)
            at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:448)
            at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:496)
            at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1363)
            at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
            at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
            at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
            at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
            at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
            at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
            at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
            at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
            at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:458)
            at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
            at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
            at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
            at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
            at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
            at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
            at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
            at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
            at org.eclipse.jetty.server.Server.start(Server.java:422)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
            at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
            at org.eclipse.jetty.server.Server.doStart(Server.java:389)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
            at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1540)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1462)
            Suppressed: java.lang.NullPointerException: null
                    at org.eclipse.jetty.util.MultiReleaseJarFile.<init>(MultiReleaseJarFile.java:92)
                    at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:926)
                    at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:890)
                    at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:164)
                    at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:551)
                    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
                    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
                    at java.lang.Thread.run(Thread.java:748)
            Suppressed: java.lang.NullPointerException: null
                    at org.eclipse.jetty.util.MultiReleaseJarFile.<init>(MultiReleaseJarFile.java:92)
                    at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:926)
                    at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:890)
                    at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:164)
                    at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:551)
                    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
                    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
                    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.NullPointerException: null
            at org.eclipse.jetty.util.MultiReleaseJarFile.<init>(MultiReleaseJarFile.java:92)
            at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:926)
            at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:890)
            at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:164)
            at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:551)
            at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
            at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
            at java.lang.Thread.run(Thread.java:748)
    19:55:27.989 - INFO [org.eclipse.jetty.server.AbstractConnector:278] - Started ServerConnector@16f7c8c1{HTTP/1.1,[http/1.1]}{0.0.0.0:80}
    19:55:28.273 - INFO [org.eclipse.jetty.util.ssl.SslContextFactory:290] - x509=X509@1e683a3e(1,h=[example.com],w=[example.com]) for SslContextFactory@2053d869(file:///opt/shibboleth-idp/credentials/idp-browser.p12,null)
    19:55:28.335 - INFO [org.eclipse.jetty.server.AbstractConnector:278] - Started ServerConnector@2f0a87b3{SSL,[ssl, http/1.1]}{0.0.0.0:443}
    19:55:28.335 - INFO [org.eclipse.jetty.server.Server:414] - Started @4819ms

/etc/default/jetty

JETTY_HOME=/opt/jetty/jetty-distribution
JETTY_BASE=/opt/jetty/jetty-base
JETTY_LOGS=/var/log/jetty

/opt/jetty/jetty-base/start.ini

# To disable the warning message, comment the following line
--module=home-base-warning

# ---------------------------------------
# Module: ext
--module=ext

# ---------------------------------------
# Module: resources
--module=resources

# ---------------------------------------
# Module: server
--module=server

# ---------------------------------------
# Module: http
--module=http

# ---------------------------------------
# Module: deploy
--module=deploy

# ---------------------------------------
# Module: jsp
--module=jsp

# ---------------------------------------
# Module: websocket
--module=websocket

# ---------------------------------------
# Module: jstl
--module=jstl

# ---------------------------------------
# Module: annotations
--module=annotations

# ---------------------------------------
# Module: logging
--module=logging

# ---------------------------------------
# Module: requestlog
--module=requestlog

# ---------------------------------------
# Module: servlets
--module=servlets

# ---------------------------------------
# Module: plus
--module=plus

# ---------------------------------------
# Mwdule: http-forwarded
--module=http-forwarded

--exec
--skip-file-validation=ssl
-XX:+UseG1GC
-Xmx1500m
-Djava.io.tmpdir=tmp
-Djava.library.path=libsetuid-linux
-Didp.home=/opt/shibboleth-idp
-Djava.security.egd=file:/dev/urandom

/opt/jetty/jetty-base/webapps/idp.xml

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="war"><SystemProperty name="idp.home"/>/war/idp.war</Set>
  <Set name="contextPath">/idp</Set>
  <Set name="extractWAR">false</Set>
  <Set name="copyWebDir">false</Set>
  <Set name="copyWebInf">true</Set>
</Configure>

答案1

我今天终于解决了这个问题。经过进一步的研究,这个 Jetty 错误似乎与我的问题有关。该补丁未包含在 Jetty 9.3.22 版本中,因此我从源代码构建了最新的 9.3.x 分支,现在正在使用它。

因此,这就是:

git clone https://github.com/eclipse/jetty.project.git
cd jetty.project
git checkout --track origin/jetty-9.3.x
mvn clean install

构建后,复制并提取./jetty-distribution/target/jetty-distribution-9.3.23-SNAPSHOT.tar.gz到您想要的位置。

相关内容