【发布时间】:2017-09-29 21:03:52
【问题描述】:
在将 Artifactory 升级到 >5.4.0 版本后,我无法在反向代理后面运行它,因为 Artifactory 从该版本开始使用额外的 web 应用程序 (access.war) 来获取访问令牌。
Apache 配置为反向代理,并使用 AJP 作为协议连接到 Artifactory 的 Tomcat。 8081端口的http连接器被注释掉了,因为我只想使用AJP。
启动 Artifactory 时,它会尝试通过 http 连接到 Access 服务:
Using Access Server URL: http://localhost:8081/access (bundled) source: detected
禁用 http 连接器时出现以下错误消息:
Application could not be initialized: Could not detect listening port.
Caused by: java.lang.IllegalStateException: Could not detect listening port.
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.detectBundledAccessServerUrl(ArtifactoryAccessClientConfigStore.java:501) ~[artifactory-core-5.5.1.jar:na]
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.lambda$4(ArtifactoryAccessClientConfigStore.java:476) ~[artifactory-core-5.5.1.jar:na]
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4742) ~[guava-18.0.jar:na]
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527) ~[guava-18.0.jar:na]
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319) ~[guava-18.0.jar:na]
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282) ~[guava-18.0.jar:na]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197) ~[guava-18.0.jar:na]
... 30 common frames omitted
server.xml
<Service name="Catalina">
<!--Connector port="8081"/-->
<!-- This is the optional AJP connector -->
<Connector port="8019" protocol="AJP/1.3" maxThreads="500" minSpareThreads="20" enableLookups="false" backlog="100"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" startStopThreads="2"/>
</Engine>
</Service>
如何更改客户端的访问服务器 URL?
【问题讨论】:
-
您使用的是哪个版本的 Artifactory? (OSS/PRO) 如果您使用的是PRO版本,您是否尝试过使用Admin页面上的“反向代理生成器”?
-
抱歉,使用的是OSS版本。听起来是个不错的功能。
标签: apache tomcat reverse-proxy artifactory