Php Artifactory部署错误:HTTP状态500-多个筛选器接受此请求

Php Artifactory部署错误:HTTP状态500-多个筛选器接受此请求,php,artifactory,Php,Artifactory,注:这是添加到共享信息中的问答 当您尝试推送到artifactory上的本地php存储库时,会出现此错误 The server encountered an internal error that prevented it from fulfilling this request. java.lang.RuntimeException: more than one filter accepted this request org.artifactory.webapp.servlet.a

注:这是添加到共享信息中的问答

当您尝试推送到artifactory上的本地php存储库时,会出现此错误

The server encountered an internal error that prevented it from fulfilling this request.

java.lang.RuntimeException: more than one filter accepted this request
    org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.acceptFilter(ArtifactoryAuthenticationFilterChain.java:115)
    org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:187)
    org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:165)
    org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:67)
    org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164)
    org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
    org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62)
    org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:116)

在我的例子中,问题是我使用了生成的令牌和在请求中指定令牌的头

例如:

curl -H "X-JFrog-Art-Api: <token>" http://<user_id>:<token>@docker.for.mac.localhost/artifactory/php-local/
curl-H”X-JFrog-Art-Api:“http://:@docker.for.mac.localhost/artifactory/php-local/
修复方法是删除自定义标题。i、 e仅限使用

curl http://<user_id>:<token>@docker.for.mac.localhost/artifactory/php-local/
curl http://:@docker.for.mac.localhost/artifactory/php-local/

在使用Firefox浏览webapp时,我刚刚遇到了另一个运行中的Artifactory OSS 5.2.1的相同错误,它具有非常相同的stacktrace

类似这样的日志条目也出现在artifactory.log中:

2021-02-24 23:11:18,340 [http-nio-8080-exec-4] [ERROR] (o.a.w.s.a.ArtifactoryAuthenticationFilterChain:107) - 2nd matching filter ArtifactoryBasicAuthenticationFilter
但它看起来像是一个客户端/浏览器的东西:当在私有模式或其他浏览器中打开相同的URL时,一切正常。重新启动浏览器修复了该故障


(顺便说一句,这个错误是使用Firefox 74.0.1出现的)

如果可能的话,请添加一条注释,建议在投票否决时如何改进答案。