When I add credentials, I can not choose the scope (Global, System) of credentials in Jenkins and can not proceed the Jenkins job without add credentials please help. How should I solve this issue?
Credential scope not showing see the screenshot.
Error while serving http://xxx.xxx.xxx.xxxx:xxxx/credentials/store/system/domain/_/createCredentials
java.lang.IllegalArgumentException: No enum constant com.cloudbees.plugins.credentials.CredentialsScope.
at java.base/java.lang.Enum.valueOf(Enum.java:240)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:745)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:490)
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:799)
Caused: java.lang.IllegalArgumentException: Failed to convert the scope parameter of the constructor public com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl(com.cloudbees.plugins.credentials.CredentialsScope,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:801)
at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:85)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:690)
Caused: java.lang.IllegalArgumentException: Failed to instantiate interface com.cloudbees.plugins.credentials.Credentials
I ran into this one too.
I’m adding a comment here as I am running ad-guard on my mac
Turning this off, allowed Jenkins to work
Basically the reverse proxy in Ad-Guard was breaking it
one of the reasons could be this
If you are using Jenkins front-end through reverse proxy it may block some of Jenkins's XHRs. which may enough to break the UI.
Related
An instance of Jenkins started not saving changes made under 'Manage Jenkins > System Configuration'.
In an attempt to solve it, I have recently upgraded to Jenkins 2.346.3 (including all the plugins).
Unfortunately, this behavior still persists and the System Log only shows:
Error while serving http://<jenkins_url>/configSubmit
java.lang.ClassCastException: java.lang.Integer cannot be cast to hudson.model.Describable
at hudson.util.DescribableList.get(DescribableList.java:128)
at hudson.util.DescribableList.rebuild(DescribableList.java:170)
at jenkins.model.GlobalNodePropertiesConfiguration.configure(GlobalNodePropertiesConfiguration.java:24)
at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:4017)
at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3981)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
Caused: java.lang.reflect.InvocationTargetException
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:401)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207)
<snippet>
Any idea on the possible cause?
UPDATE
After 2 attempts on restarting Jenkins without the config.xml, I succeeded in having Jenkins 'Manage Jenkins > System Configuration' behaving as expected.
After the first attempt, I reverted to the old configuration file as all the security related configurations were missing and I ended up raising the ticket https://issues.jenkins.io/browse/JENKINS-69548
On the 2nd attempt, I did what I described in the ticket comment https://issues.jenkins.io/browse/JENKINS-69548?focusedCommentId=430091&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-430091 (i.e. re-introducing the security-related configurations)
You probably have a corrupted config.xml from your old installation. Try deleting the config.xml(Back it up) located at $JENKINS_HOME(if you have not changed the default JENKINS_HOME in most cases it will be at USER_HOME/.jenkins(~/.jenkins)) and restarting Jenkins. If it's successful you can start reconfiguring or moving the configs from there.
I am an encountered an issue while creating database backup using create_backup_from_onprem script in OCI CLI. i noticed that object storage namespace is not correct while executing backup script.
[oracle#oracledev oci-cli-scripts]$ ./create_backup_from_onprem --config-file /home/oracle/.oci/config --display-name testimport01 --availability-domain $AD --edition STANDARD_EDITION --opc-installer-dir /home/oracle/migrate --tmp-dir /home/oracle/migrate/onprem_upload --compartment-id $C --rman-password *****
oci._vendor.requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://swiftobjectstorage.ap-mumbai-1.oraclecloud.com/v1/dbbackupbom/iF0ydees7V0yWxyuAYtF/parameter.log
and parameter.log
Either the bucket named 'iF0ydees7V0yWxyuAYtF' does not exist in the namespace 'dbbackupbom' or you are not authorized to access it
My correct namespace is bmnoo8fd7ute
[oracle#oracledev oci-cli-scripts]$ oci os ns get
{
"data": "bmnoo8fd7ute"
}
Not sure how to correct object storage namespace in CLI. could you please any help me on this?
Adding cross reference to GitHub issue in OCI CLI in case the OCI database team can answer -- https://github.com/oracle/oci-cli/issues/201.
You have to change the tenant ocid in oci config file, for which the default location is ~/.oci/config. You might do it manually or using the oci setup config command. You can overwrite the current values, or you can create a new profile, which you can refer to in oci calls.
For more information please see the CLI config file doc.
In case the oci config file is already contains the correct value, you need to reinstall the oci_install specifying the right tenant ocid for -tOCID. (in this case OCID of bmnoo8fd7ute)
java -jar oci_install.jar -host swiftobjectstorage.ap-mumbai-1.oraclecloud.com -pvtKeyFile oci_private_key -pubFingerPrint oci_public_fingerprint -uOCID user_ocid -tOCID tenancy_ocid -walletDir /wallet_directory -libDir /library_directory
Update:
As the dbbackupbom is an internal resource ID, you can't change that with the reinstallation of oci_install. Rather this should be an authorization issue.
Please check if you have the right policies in place. If not, create a policy like this:
Name of the policy: ObjectStorageAccess
Add below statements:
Allow group ObjectAdmins to manage buckets in tenancy
Allow group ObjectAdmins to manage objects in tenancy
Finally add your user to ObjectAdmins, or use a different group which you are already part of.
Finally I got found correct answer and resolution for this issue.
Cause: Error occurred due to newly launched region having some internal bug. i used Mumbai region which was recently launched.
Resolution : Choose another stable region. Ashburn region works for me.
Bitbucket notify on start failed: Root URL isn't configured yet. Cannot compute absolute URL.
java.lang.IllegalStateException: Root URL isn't configured yet. Cannot compute absolute URL.
at hudson.model.AbstractItem.getAbsoluteUrl(AbstractItem.java:486)
at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusHelper.buildUrlFromBuild(BitbucketBuildStatusHelper.java:182)
at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusHelper.createBitbucketBuildStatusFromBuild(BitbucketBuildStatusHelper.java:197)
at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusHelper.notifyBuildStatus(BitbucketBuildStatusHelper.java:224)
at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.prebuild(BitbucketBuildStatusNotifier.java:109)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:789)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:784)
at hudson.model.Build$BuildExecution.doRun(Build.java:145)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
at hudson.model.Run.execute(Run.java:1735)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:405)
I got that error when I was trying to use the Bitbucket Build Status Notifier Plugin ( https://wiki.jenkins.io/display/JENKINS/Bitbucket+Cloud+Build+Status+Notifier+Plugin ) on Jenkins CI. I followed this tutorial: https://www.youtube.com/watch?v=uu5XcU4EPzQ but I don't know what the problem is.
The answer is simpler than I thought, but I couldn't find it anywhere. On BitBucket in the user profile settings and in OAuth, the consumer you create have to have the Callback URL ending with /. For example:
Before was: http://jenkinsUrl:8080 and it was throwing that error, now I just added the / and it worked: http://jenkinsUrl:8080/
Hi i had a similar issue with a newly installed jenkins 2.60.2. I tried to access the absolute URL from a RunWrapper object in Groovy, but got also this error, although the jenkins location was correctly configured.
The problem was, that the email address was not valid. I changed it to noname#nowhere.com
and my root URL issue was gone.
I think its a bug, or at least a missing documentation about that fact that "root url" also need a configured email address within the jenkins configuration.
You need to set your Jenkins URL.
Go to Manage Jenkins->Configure System
Under Jenkins Location specify your public Jenkins URL.
I am new to Grails 3.0.1 and wonder how and where to set the correct Proxy settings. I know what my proxy configuration is - IP and port, but don't know where to place.
I am getting errors like these when trying to run grails command within my helloworld project:
ivo#ivotrisquel:~/grails/projects/helloworld$ grails --stacktrace
| Error Problem updating profiles from origin git repository (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.eclipse.jgit.api.errors.TransportException: https://github.com/grails/grails-profile-repository: cannot open git-upload-pack
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at org.grails.cli.profile.git.GitProfileRepository.fetchAndRebaseIfExpired(GitProfileRepository.groovy:140)
at org.grails.cli.profile.git.GitProfileRepository.createOrUpdateRepository(GitProfileRepository.groovy:109)
at org.grails.cli.profile.git.GitProfileRepository.getProfile(GitProfileRepository.groovy:56)
at org.grails.cli.GrailsCli.initializeProfile(GrailsCli.groovy:347)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:192)
at org.grails.cli.GrailsCli.main(GrailsCli.groovy:99)
Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/grails/grails-profile-repository: cannot open git-upload-pack
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:524)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1115)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 6 more
Caused by: java.net.ConnectException: Connection timed out github.com
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:175)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:475)
... 11 more
| Error Problem updating profiles from origin git repository
I had the same problem and solved it adding the proxy configuration to the GRAILS_HOME/bin/grails.bat file in the following way:
>set GRAILS_OPTS=%GRAILS_OPTS% -Dhttp.proxyHost=myProxy -Dhttp.proxyPort=myPort -Dhttps.proxyHost=myProxy -Dhttps.proxyPort=myPort -Dhttp.proxyUser=bob -Dhttp.proxyPassword=theBuilder
I believe there must be another way to configure the proxy in Grails 3.0.x but I haven't found it so far.
Regards
In linux adding the configuration
export GRAILS_OPTS="-Dhttp.proxyHost=myProxy -Dhttp.proxyPort=myPort -Dhttps.proxyHost=myProxy -Dhttps.proxyPort=myPort"
in the GRAILS_HOME/bin/grails.sh file. Resolve my problem in Netbeans 8.1
I adedd the following to my ~/.grails/ProxySettings.groovy file.
client=['http.proxyHost':'myproxy', 'http.proxyPort':'myport', 'http.proxyUser':'myusername', 'http.proxyPassword':'mypass', 'http.nonProxyHosts':'localhost']
currentProxy='client'
For GRAILS3 there is now enough documentation on how to setup proxy.
As said by #campos, in Windows you must
set GRAILS_OPTS=-Dhttp.proxyHost=myProxy -Dhttp.proxyPort=myPort -Dhttps.proxyHost=myProxy -Dhttps.proxyPort=myPort
but that makes correction only for half the way, because you also have to correct gradle engine, inserting in its gradle.properties values as below
systemProp.http.proxyHost=proxy.yourdomain.com
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=yourpass
systemProp.http.nonProxyHosts=localhost
There is complete explanation here and here for gradle. With all that on my Windows10 I can correctly compile and build packages behind my corporate proxy.
After long struggle I found the solution for windows environment
The following worked for me
set GRAILS_OPTS=-Dhttp.proxyHost=myProxy -Dhttp.proxyPort=myPort -Dhttps.proxyHost=myProxy -Dhttps.proxyPort=myPort -Dhttp.proxyUser=bob -Dhttp.proxyPassword=theBuilder
I have jenkins v 1.580 installed on windows.
All my jobs were working fine until afternoon but all of a sudden all the jobs started failing with the following error,(The only error)
FATAL: (class: org/apache/commons/codec/binary/Base64OutputStream, method: signature: (Ljava/io/OutputStream;ZI[B)V) Incompatible argument to function
FATAL: (class: org/apache/commons/codec/binary/Base64OutputStream, method: signature: (Ljava/io/OutputStream;ZI[B)V) Incompatible argument to function
Finished: null
The only thing i found to happen in the afternoon was a windows security update but that also I was able to get uninstalled with the help of IT.
(I have close to 50 jobs running. Is there any limitation on number of jobs)
Can anyone tell me what could be wrong here?
Following the error snippet I can see from jenkins.error,
a user in error attempting to specify a java: URL name in a non-J2EE client or server environment. Throwing
Caused by: com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not \u0
(position: START_DOCUMENT seen \u0... #1:1)
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not \u0 (position:
START_DOCUMENT seen \u0... #1:1)
Should I go for reinstallation of jenkins?
Thanks in advance.
Sakthivel C
Are you using fingerprint plugin? It appears as if fingerprint files were corrupted.
Delete the directory "fingerprints" from JENKINS_HOME and restart your Jenkins to resolve the issue.
If that doesn't work, paste the exact error log here.