0

This problem has already been posted, I just have one question.

The suggestion from Stackoverflow was to:

Make sure the Jenkins URL configured in the System Configuration matches the URL you're using to access Jenkins.

To reach the System Configuration:

Go to your Jenkins page
Click Manage Jenkins
Click Configure System
Scroll to Jenkins Location and find Jenkins URL.

Ensure that port value matches with the port value set in the section of the jenkins.xml file located in the Jenkins folder on your machine.

I looked at the URL from the Configuration System, and I opened my jenkins.xml. But I don´t see any URL in my jenkins.xml file, where I should add it? in any place like <argument>http://jenkins.subdomain.com/</argument> ?

My Jenkins File is:

<?xml version='1.1' encoding='UTF-8'?>
<hudson>
  <disabledAdministrativeMonitors/>
  <version>2.107.2</version>
  <installState>
    <isSetupComplete>true</isSetupComplete>
    <name>RUNNING</name>
  </installState>
  <numExecutors>2</numExecutors>
  <mode>NORMAL</mode>
  <useSecurity>true</useSecurity>
  <authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">
    <denyAnonymousReadAccess>true</denyAnonymousReadAccess>
  </authorizationStrategy>
  <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
    <disableSignup>true</disableSignup>
    <enableCaptcha>false</enableCaptcha>
  </securityRealm>
  <disableRememberMe>false</disableRememberMe>
  <projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
  <workspaceDir>${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}</workspaceDir>
  <buildsDir>${ITEM_ROOTDIR}/builds</buildsDir>
  <jdks/>
  <viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
  <myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
  <clouds/>
  <quietPeriod>5</quietPeriod>
  <scmCheckoutRetryCount>0</scmCheckoutRetryCount>
  <views>
 <hudson.model.AllView>
      <owner class="hudson" reference="../../.."/>
      <name>all</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
    </hudson.model.AllView>
  </views>
  <primaryView>all</primaryView>
  <slaveAgentPort>-1</slaveAgentPort>
  <disabledAgentProtocols>
    <string>JNLP-connect</string>
    <string>JNLP2-connect</string>
  </disabledAgentProtocols>
  <label></label>
<crumbIssuer class="hudson.security.csrf.DefaultCrumbIssuer">
    <excludeClientIPFromCrumb>false</excludeClientIPFromCrumb>
  </crumbIssuer>
  <nodeProperties/>
  <globalNodeProperties>
    <hudson.slaves.EnvironmentVariablesNodeProperty>
      <envVars serialization="custom">
        <unserializable-parents/>
        <tree-map>
          <default>
            <comparator class="hudson.util.CaseInsensitiveComparator"/>
          </default>
          <int>1</int>
          <string>ACR_LOGINSERVER</string>
          <string>containerregistryah.azurecr.io</string>
           </tree-map>
      </envVars>
    </hudson.slaves.EnvironmentVariablesNodeProperty>
  </globalNodeProperties>
</hudson>
marhg
  • 659
  • 1
  • 17
  • 30
  • 1
    Possible duplicate of [Why does Jenkins complain that my reverse proxy setup is broken?](https://stackoverflow.com/questions/27161854/why-does-jenkins-complain-that-my-reverse-proxy-setup-is-broken) – Parker Sep 12 '18 at 12:24

1 Answers1

1

Apache Configuration should have nocanon for ProxyPass. If SSL is enabled X-Forwarded-Proto and X-Forwarded-Port must be set.

ProxyPass               / http://localhost:8080/ nocanon
AllowEncodedSlashes     NoDecode
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"

You need to add below to catalina.properties file in Tomcat. Updating Apache configuration itself is not sufficient.

org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
marayaa
  • 11
  • 2