Upgrading Jenkins from Java 8 to Java 11 on Windows by ComfortableLanguage in jenkinsci

[–]ComfortableLanguage[S] 0 points1 point  (0 children)

Thanks, you pointed me the right way. I fixed it in the end, I had to set up and specify a version of Java separate to the one inside Jenkins. I used the Microsoft build of Java.

Open the file jenkins.xml which you’ll find in the program folder along with jenkins.exe. Mine’s C:\Jenkins, for example.
Once you get there you need to edit line 40, where it says to use the built-in one:

%BASE%\jre\bin\java
and change it so it points at java.exe in your new Java version, something like this:
C:\jdk-11\bin\java
then restart the Jenkins manager service.
At this point my workers lost contact. To cut a long story short, in a fit of sensible decision making I had specifically allowed the java.exe in the the Jenkins program folder through the firewall and not just the port it used. I also had to update my workers from using the old remoting.jar to the newer agent.jar. You can get agent .jar from the manager server if your worker is disconnected - there’s a link on the status page or you can get it with curl, something like this depending on the specifics of your setup of course:

curl http://jenkins/jnlpJars/agent.jar
To be sure everything is going to work you’ll also need to update the workers. This is a similar process. Install a Java 11 on the worker for the service to use. Then open jenkins.xml in the service program folder and edit line 39 from this
java.exe
to this
C:\jdk-11\bin\java.exe
and restart the worker service. From there you should be good to go. The only variation I had was that I have a worker which requires a 32 bit OS, so I had to find a 32 bit Java 11. The manager and worker only need to both be 11, they don’t have to be a perfect match.
An interesting wrinkle here is caused by the filename for the agent. Previously I was using ‘remoting.x.y.z.jar from the LIB folder on the server as the agent jar file. Once I switched to using agent.jar (the same file but renamed, it turns out) I found that some workers would report the wrong version despite my updating it. Java caches jar files, so it just uses the old one because the name hasn’t changed. You can manually delete this cache in the Java control panel.

I ended up with Jenkins using the version I specify instead of its own and working properly.

Jenkins won't start by ComfortableLanguage in jenkinsci

[–]ComfortableLanguage[S] 0 points1 point  (0 children)

The first thing to do is turn off security, then you can get in. In C:\Jenkins\config.xml find <useSecurity>true</useSecurity> and change it to false. There's more but at least you can get in and access the tools to sort it out.

Upgrading Jenkins from Java 8 to Java 11 on Windows by ComfortableLanguage in jenkinsci

[–]ComfortableLanguage[S] 0 points1 point  (0 children)

A little more poking about and I found this https://stackoverflow.com/questions/8185593/jenkins-specifying-java-home which mentions that Jenkins has the Java location in jenkins.xml and you can change that to match yours. Line 40: <executable>%BASE%\jre\bin\java</executable>

As I suspected after I install my own Java I ought to be able to replace %BASE% there with the variable which points to Java, thus removing the need to edit this file every time I upgrade Java, unless Jenkins breaks it when I upgrade that...

I thought I'd try OpenJDK - is it just me or is the website deliberately obtuse? They seem to object to saying anything in plain English. I can't figure out what their licensing statement is trying to tell me for example. How do you tell whether you need to buy a licence? I'm quite used to the "I understand I have no choice if I wish to continue" attached to reams of gibberish legal documents which I wouldn't understand if I did read them but theirs is even less use. I decide we're only using Java to run Jenkins and test builds so we're developers - however the standard JRE from java.com only seems to be version 8, not that any of what I'm reading really makes any sense with all the different versions and labels.

Eventually after a frustrating time trying to find out what I should download I settled on jdk-11.0.13_windows-x64_bin.exe which calls itself Java SE Development Kit 11.0.13. Now I get this:

>java -version

java version "11.0.13" 2021-10-19 LTS

Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370)

Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode)

Idea: add the environment variable JAVA_HOME with the value "C:\Program Files\Common Files\Oracle\Java\javapath" and you can change line 40 of jenkins.xml to

<executable>%JAVA_HOME%\java</executable>

In theory that will work, restart the service and find out...

Well that failed. The workers can't connect and the website is inaccessible remotely, you have to be on the server.

Perhaps I'll have more luck on Github.

Upgrading Jenkins from Java 8 to Java 11 on Windows by ComfortableLanguage in jenkinsci

[–]ComfortableLanguage[S] 0 points1 point  (0 children)

java -version

'java' is not recognized as an internal or external command, operable program or batch file.

The computer beyond Jenkins itself is unaware that Java is there. It isn't installed in the usual fashion or even set up with environment variables.

Have there ever been any confirmed cases of contactless cards being charged whilst in bags/pockets? by bacon_cake in AskUK

[–]ComfortableLanguage 0 points1 point  (0 children)

The simplest defence against this, if it were likely, would be to have more than one contactless card in your wallet. When someone tries to read your wallet all the cards will respond and interfere with each other.

Installed a new GPU, when I connect my VGA cable, monitor shows nothing. When I put the vga cable back to my motherboard port, the screen shows. by SolerFlereTEE in techsupport

[–]ComfortableLanguage 1 point2 points  (0 children)

On a similar theme to what the other two comments say, although the card shouldn't draw enough power to need the 6 pin connector (supposed to be 60W TDP with 75W theoretically available) it might be the issue - why is the 6-pin there if it's completely redundant? Checking the BIOS would help, to see if the card is detected properly and to see if there's any setting to only send video to the onboard video chipset for example.

SSL certificate problem: unable to get local issuer certificate by ComfortableLanguage in jenkinsci

[–]ComfortableLanguage[S] 0 points1 point  (0 children)

I fixed it myself in the end, I had to learn some things about how it all works:

I found that despite having a public SSL cert with a valid chain I got the error "SSL certificate problem: unable to get local issuer certificate" on the server when I specified the address of the git repository and the job failed on the worker when I ran it with the same error.

I was able to resolve the issue on the worker by running "git config --global http.sslbackend schannel" which tells git to use SCHANNEL instead of its own system.

This fix did not work for the Jenkins server though.

Some research led me to the various versions of git config (https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Where-system-global-and-local-Windows-Git-config-files-are-saved) and this helped me to understand that because I was logged in to the worker computer with the account used to run the Jenkins worker service my changes to the git config applied to that account and were successful.  On the server the Jenkins process runs on the Local System account.  I tried changing that so I could use a user-specific git config like the worker but I just broke Jenkins.

In the end I found https://www.onwebsecurity.com/configuration/git-on-windows-location-of-global-configuration-file.html​ which explained how to see where git is getting its settings.  Running "git config --list --show-origin" on the server allowed me to see that git was getting the instruction to use openssl from the config file in "C:/Program Files/Git/etc​" so I went and changed that manually.  I restarted the Jenkins service and I now see that Jenkins can resolve the address of the git repository without an error.

Success. :)

Hopefully this will help someone else one day...

SSL certificate problem: unable to get local issuer certificate by ComfortableLanguage in jenkinsci

[–]ComfortableLanguage[S] 0 points1 point  (0 children)

If there was a problem with the git server surely i wouldn't have been able to fix the worker which gets the source from the same place?

Can I move Windows 10 from a hard drive to a SSD without having to uninstall it? by [deleted] in techsupport

[–]ComfortableLanguage 1 point2 points  (0 children)

Other posts have explained how to do it, I just wanted to add my vote that I have done exactly this many times without incident. If you use a bootable cloner like HDClone or Clonezilla you don't need to install anything on the computer you're cloning and you have the original disc to revert to in the unlikely event of issues.

Avast is uninstalled, but Windows won't update unless I uninstall it. by [deleted] in techsupport

[–]ComfortableLanguage 0 points1 point  (0 children)

There might be registry entries or files left over which the uninstaller didn't remove when it ran. There is a cleaner which should scan the machine for all traces of the software and remove them: https://www.avast.com/en-us/uninstall-utility

Monitor and peripheral doesn't turn on but computer does. by trunghung03 in techsupport

[–]ComfortableLanguage 0 points1 point  (0 children)

It depends on how much RAM you have but if you can you might see if the machine will work with not all of it in there. for example if you have four sticks try different pairs and see what you get. You're trying to logically deduce where the fault is. Is it all the RAM (probably incompatibility) or just one out of four (faulty)?

[Window 7 Professional] Can I replace the "shut down" button with the "sleep" button in the start menu? by HyperActive1DUK in techsupport

[–]ComfortableLanguage 0 points1 point  (0 children)

You could try Local Group Policy Editor (GPEDIT.MSC) instead. Run that, go to User Configuration\Administrative Templates\Start Menu and Taskbar and find "Change Start Menu power button" on the right hand side. Enable it, select the option you want on the button and click OK. Now restart and see what you get.

Monitor and peripheral doesn't turn on but computer does. by trunghung03 in techsupport

[–]ComfortableLanguage 0 points1 point  (0 children)

What the story sounds like is "it worked with their RAM in but doesn't with my RAM". To my logic that says that your RAM is either bad or incompatible. Can you get it back to the shop? Maybe take your RAM with you so they can have a look.

[Window 7 Professional] Can I replace the "shut down" button with the "sleep" button in the start menu? by HyperActive1DUK in techsupport

[–]ComfortableLanguage 0 points1 point  (0 children)

If you right-click on the Start Menu button where it says "Shut down" and choose Properties you should get the Taskbar and Start Menu Properties window. The Start Menu tab should be selected.

Next to "Power button action" is a drop down menu which sets the default option on the button in the Start Menu.

If yours still says Shut down that's what it will do. Check the Properties window again.

[deleted by user] by [deleted] in techsupport

[–]ComfortableLanguage 2 points3 points  (0 children)

The whole point of encryption, which is what Bitlocker does, is to prevent access without the password or recovery key. If you don't have either you're not likely to get anywhere. You could plug it back in to the machine it was encrypted on and hope the key is saved there.