question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jenkins won't be able to start if JCasC sources is missing

See original GitHub issue

Your checklist for this issue

🚨 Please review the guidelines for contributing to this repository.

  • None

The Problem I’m facing

I’ve try to migrate an other configuration to new jenkins
after migration , if i delete the configration. Jenkins instance won’t be able to restart becasue of io.FileNotFound Exception .

What I can do is recover the configuration file , and restart jenkins again. then execute code below:

import io.jenkins.plugins.casc.CasCGlobalConfig
CasCGlobalConfig config = GlobalConfiguration.all().get(CasCGlobalConfig.class)
config.setConfigurationPath(null)
config.save()

I can not image what happend if I lost my configuration.

Feature Request

  1. able to delete & update Configuration Source
  2. Jenkins can start normally even if Configuration Source is missing .

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jetersencommented, Jan 11, 2021

The config file that you should be deleting is io.jenkins.plugins.casc.CasCGlobalConfig.xml and should be located at $JENKINS_HOME

0reactions
NagleZhangcommented, Jan 11, 2021

I got it, thanks a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Jenkins java.lang.IllegalStateException: An attempt ...
Jenkins docs says that this happens due to the Configuration as Code plugin and to set the jvm args as -Dio.jenkins.plugins.casc.
Read more >
Getting started with Jenkins Configuration as Code - Eficode
In this blog I'll cover how to convert an existing Jenkins instance to JCasC and also how to start from scratch. Let's get...
Read more >
class java.lang.Integer cannot be cast to class hudson.slaves ...
shampoonator i stumbled into a stable jenkins server when doing this for my live jenkins. I initially removed the int in the configuration,...
Read more >
Be able to set "Workspace Root Directory" and "Build Record ...
I would like to set the two advanced attributes (usually found under `/configure): I have tried the following: jenkins: rawBuildsDir: ...
Read more >
Using Jenkins Configuration as Code to setup AWS slave ...
Jenkins config locations – when the Jenkins Docker image starts, anything located ... otherwise the Jenkins slave job won't start correctly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found