Closed scoopex closed 2 years ago
I am having the same issue, did you ever manage to resolve this?
Me2
Same issue.
+1
Related to #761?
Has this issue ever been resolved? If not what is a good workaround? I run into the following error message:
Error: '/bin/cat /usr/lib/jenkins/puppet_helper.groovy | /usr/bin/java -jar /usr/lib/jenkins/jenkins-cli.jar -s http://127.0.0.1:8080 groovy = create_or_update_user admin example@me.com 'changeme' 'Managed by Puppet' ''' returned 255 instead of one of [0]
Error: /Stage[main]/Jenkins::Users/Jenkins::User[admin]/Jenkins::Cli::Exec[create-jenkins-user-admin]/Exec[create-jenkins-user-admin]/returns: change from 'notrun' to ['0']
This is my puppet script looks like this
class jenkins_master {
class {
'jenkins':
executors => 2,
install_java => false,
require => [Class['java']],
lts => true,
cli => true,
cli_remoting_free => true,
user_hash => {
'admin' => {
'password' => 'changeme',
'email' => 'example@me.com',
}
}
}
class { 'jenkins::security':
security_model => 'full_control',
}
I'm seeing the same problem as @ayk33 reported above in 2019, with Jenkins 2.176.1 . @esalberg is there any quick tip on what we can try to get around this problem?
The root of the error 255
on @ayk33's comment is:
/Stage[main]/Jenkins::Users/Jenkins::User[admin]/Jenkins::Cli::Exec[create-jenkins-user-admin]/Exec[create-jenkins-user-admin]/returns: java.io.FileNotFoundException: http://127.0.0.1:8080/securityRealm/cli?remoting=false
I have tried setting cli_remoting_free
to true, to false, they both resulted in the same error.
From my understanding from reading the code and from the error, I think jenkins::security
ends up setting the authorization strategy but it doesn't set the security realm. Security realm is a puppet type in puppet-jenkins, but it's not obvious how it's meant to be used, or even if user meant to touch on it directly at all without using jenkins::security
.
@cliffano, what if we just templatize some of the main configurations files as a workaround to a hopeful idea that this module would have parameters we could easily set?
Closing for its age. Please open a new issue if this still persists.
I setup jenkins using the following code
If i execute the mentioned code, i get this: (Installs jenkins release 2.60.3)