Can't find rc.status during install of Jenkins - jenkins

I am trying to install Jenkins 1.504 on a CentOS 6.6 box. The script to set up the jenkins service attempts to run /etc/rc.status but that file does not exist. I installed from an RPM that was given to me (the box is a standalone machine.) I understand that rc.status is typically associated with the SUSE distro. Do I just have the wrong RPM, or is there a way I can get this set up on CentOS?

Related

How to install docker on teamcity build agent

On my windows server 2022, I recently installed Teamcity Professional 2022.10 (build 116751) using the windows installer, and once I got it up and running I an agent through 'Install Agent' in the GUI, again using the windows installer.
I then created my first project, which I managed to do a successful build for, also running my tests. The next step was creating a docker image from this build, and pushing it to my repository. Here however, I am facing issues: my installed agent is not compatible for that build, giving me the following incompatibility error:
Incompatible runner: Docker
Unmet requirements:
docker.version exists
docker.server.version exists
While it's clear to me that something is going wrong with the docker version, I'm not sure what exactly, or how/where to fix it. Since both the agent and the teamcity installation are running as windows services (Windows server 2022), I'm not sure if the docker version has to be installed in something running in the agent service, or simply on my windows server installation. The latter is the case: running docker info shows that it is installed.
I have tried to somehow connect to my agent, to try and install docker there, using its hostname through RDP, which does promt me for a username and password, but I have no idea which combination to use there. I have tried using the credentials of my account running the process, but none of the credentials seem to work. Nowhere in the installer did I have to pick any credentials, so I am not sure how to connect to the agent at all, or if I even can/must connect to it to install docker on it.
I found also some logging on the agent:
[2022-11-05 17:07:49,729] INFO - rains.buildServer.AGENT.DOCKER - Failed to parse version: Docker version master-dockerproject-2022-03-26, build dd7397342a
[2022-11-05 17:07:49,729] INFO - rains.buildServer.AGENT.DOCKER - Docker client is not available. Check whether it has been installed and PATH environment variable contains path to it.
[2022-11-05 17:07:49,777] INFO - Server.powershell.agent.DETECT - Found through registry: PowerShell Desktop Edition v5.1.20348.1 64-bit(C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)
[2022-11-05 17:07:49,778] INFO - Server.powershell.agent.DETECT - Detecting PowerShell using CommandLinePowerShellDetector
[2022-11-05 17:07:50,125] INFO - rains.buildServer.AGENT.DOCKER - Docker-compose is not available. Check whether it has been installed and PATH environment variable contains path to it.
In the parameters of my agent I can find the path parameter, which includes 'C:\Program Files\Docker;' which makes me think it is indeed the docker installation of my windows server that matters, but I then fail to see what is going wrong exactly.
Since the agent was installed as a service, it uses the docker version of my windows server installation. I wanted to do a reinstall of docker to see what was going wrong, and I noticed that I couldn't uninstall it through for example control panel, windows seemed to have no idea that it was installed, even though docker info would specify both a client and a server that were running.
After hunting down all the 'hidden' docker files of the installation and reinstalling it on the host machine, these warnings went away.
I'm still not sure if it's possible to connect to the build agent though, but since it seems to use the resources on the host machine, that seems to not be necessary anyhow.

Cannot uninstall Docker Desktop via Chocolatey

I've installed Docker 2.4 quite some time ago using Chocolatey (my OS is Win 10). Since updating Docker using choco upgrade all always failed, I did the updates manually via the Docker itself (right-click → Check for Updates → etc.). Now I'm on version 3.2.
Since I want to get rid of this manual update process, I wanted to uninstall Docker from Chocolatey. But executing choco uninstall docker-desktop fails with ERROR: Exception calling "GetFullPath" with "1" argument(s): "Illegal characters in path.".
Of course, I could uninstall Docker the usual Windows way. But how would I remove Docker from Chocolatey so that I can do a fresh install?
I was able to solve the issue by manually uninstalling Docker with default Windows tools.
Afterwards, I deleted the folder C:\ProgramData\chocolatey\lib\docker-desktop. This resulted in a clean environment when it comes to Docker, because Chocolatey seems to maintain all package-related things in the corresponding C:\ProgramData\chocolatey\lib\<<package>> folder.
Finally, I could install Docker again via choco install docker-desktop.

How to uninstall Jenkins installed from jenkins.war on Ubuntu 14.04

I have downloaded and installed Jenkins on an Ubuntu 14.04 operating system. Jenkins is currently running as a service.
Once Jenkins has been installed on Ubuntu 14.04 via the Jenkins.war file, how is it uninstalled?
I'm trying to do some backup testing and cannot seem to find the answer anywhere. The only directions I've been able to find are instructions to uninstall the Jenkins package. When I run any similar commands for uninstalling Jenkins packages, I receive the message:
Package 'jenkins' is not installed, so not removed
or
Package 'jenkins-executable-war' is not installed, so not removed
Thanks in advance for any help!
We need to stop jenkins first.
sudo service jenkins stop
Then try
sudo apt-get remove --purge jenkins
If problem still exists, Try removing it manually using these instructions.
https://stackoverflow.com/a/11621186/3086531
for RHEL/Linux guys please stop the jenkins and then remove below folder
$user.home/.jenkins
Like if user home directory is /root then remove /root/.jenkins

How to install docker-engine using docker binary without internet connection

I have downloaded docker binary version 1.8.2 and copied that to my backup server (centos server) which doesn't have internet connectivity. I have marked this as executable and started the docker daemon as mentioned in [https://docs.docker.com/engine/installation/binaries/][1]. But it doesn't seem to get installed as a docker service. For all the commands, I have to execute as sudo ./docker-1.8.2 {command}. Is there a way to install docker-engine as a service? Currently sudo docker version shows command not found. I'm a newbie to docker setup. Please advise.
Why not download the rpm package (there are also centos 6 packages), copy to USB stick and then to your server and simply install it with rpm command and that's it. That way you'd get the same installation as if you were to run yum.
Of course you may have some dependencies missing, but you could download all of these as well.
Firstly, if you're downloading bare binaries on an enterprise linux, you're probably doing things in a very bad way. Immediately, you're breaking updates and consistency, and leaving your system in a risky, messy state.
Try using yumdownloader --resolve to get the docker installable and anything it needs.
A better option may be to mirror the installation artifacts, and grab it from the local mirror, but that's beyond the scope if you don't do this already.

Jenkins won't start after plugin installation *and does not log anything*

I installed Jenkins' Gradle plugin and used the automatic restart option via the Jenkins web interface. Jenkins seemed to hang on the "restarting..." page, so I finally tried to manually restart the Jenkins service on the server (64-bit Debian 7) using service jenkins restart.
Now, Jenkins is no longer running at all (verified with ps -ef | grep -i [J]enkins and service jenkins status), and when I try service jenkins [re]start, I see an [ ok ] message but nothing else seems to happen. I've deleted /var/log/jenkins/jenkins.log, and each time I try a service start (or restart), the log file reappears, but it's blank (ls -lA shows that the file was recently made, but cat produces no output). I also tried rebooting the server, with no effect. I finally deleted the Gradle folders under /var/lib/jenkins/plugins, which also did not appear to make a difference.
How do I even begin to approach this problem? Should I just re-install Jenkins?
EDIT: System info:
> uname -a
Linux AUC-Workstation1 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64 GNU/Linux
According to dpkg -l, I'm using Debian's jenkins package, version 1.617.
EDIT 2: I'm actually using the jenkins package provided directly by Jenkins, as per the instructions here.
I just had a problem where multiple Jenkins plugins were breaking Jenkins startup (after an upgrade) and here is the procedure I followed to resolve the issue, which might work for other plugin startup issues.
I'm working on an Ubuntu server, but I expect that this would work for Debian if it's going to work at all - I encourage others to adjust the procedure:
logged into the server and switched to the jenkins user (sudo su jenkins in my case)
went to the main jenkins directory
renamed plugins to plugins.problems_YYYYMMDD
previously, I attempted to disable the plugins, but this did not work for me (system still would not start)
created an empty directory plugins
restarted jenkins (sudo service jenkins restart)
In my case, this started just fine
iteratively followed the following procedure to add plugins back in
copied 1 or more plugins from plugins.problems_YYYYMMDD/ to plugins/
restarted jenkins
went to the plugin center and installed updates as available
sometimes I needed to install updates in a particular order due to dependencies
evaluated results in 'Manage Old Data'
I think I'm facing some manual updates of the old data
Note: if you know which plugins are likely the problem, then it is easier to just disable or temporarily (re)move them rather than (re)moving all of the plugins!
I never did figure out the initial problem, but I did get Jenkins working again, sort of.
I uninstalled Jenkins (using apt-get purge) and then re-installed it. This time it failed to start because it needed Java 7, but I apparently only had Java 6 installed (this surprised me, because I thought I had previously configured Jenkins to use Java 7 on that machine). So I installed openjdk-7-jdk and openjdk-7-jre, set JAVA and JAVA_HOME appropriately in the Jenkins config file, and started the service again. This allowed Jenkins to start.

Resources