Migrated Jenkins keeps redirecting to original domain

7/19/2019

I migrated Jenkins with thinBackup plugins. When I restart my new Jenkins master, accessing it via http://new_jenkins_ip:8080 will redirect me to https://old_jenkins_domain.

My old Jenkins runs with services, it was setup long ago. My new Jenkins runs in k8s, I edited stable/jenkins chart and deployed it with Helm.

At first, I thought Jenkins URL is the cause, so I change configuration in jenkins.model.JenkinsLocationConfiguration.xml (according to this) and restart Jenkins by killing its pod (I deploy new Jenkins in k8s). But it's still redirecting to https://old_jenkins_domain.

I also try copying entire JENKINS_HOME (this) directory and yes, it's still redirecting to https://old_jenkins_domain.

Another problem is that I'm using github-oauth and matrix-auth plugins and if I don't install these before performing thinBackup migration, Jenkins will fail to start up and restart itself forever. I want to know why.

I actually can access http://new_jenkins_ip:8080/login but when I hit login, github-oauth just throw an NullPointerException. I might try this python to migrate plugins because I think thinBackup can't migrate all the github-oauth config.

-- Phootip
jenkins
kubernetes
migration

1 Answer

9/9/2019

In case someone find this useful, it's github-oauth plugins that keep directing me to my old site. I new oauth app in github and let it redirecting to my new IP

-- Phootip
Source: StackOverflow