CUPS jobs no longer showing on web UI - printing

I send multiple jobs daily to a remote CUPS server. These jobs print successfully and were showing on the webui as in progress and then completed/all jobs.
Recently, it stopped showing any new jobs status or completion - jobs print, but they are not showing. They do in exist in /var/spool/cups - just not the webui.
Test pages printed via the webui do show up in jobs on the webui.
I haven't been able to find any configuration item that handles this, any ideas?

There were 2 instances of the cups daemon running. Killed one and all jobs started showing back up...

Related

Sometimes not showing input parameter fields under "Promotion Status" on jenkins server

I have configured two jobs on jenkins server. One for creating package and second for deploying package to respective server. And promoted build from first job to second job. Facing issue on upgradtion of jenkins from 2.320 to 2.344. Sometimes promotion status not showing input field for deploy job. I'm attaching images for reference.
Sometime getting following UI on promotion status
Should show everytime:

Jenkins executor busy - job with loading bar but no link or id - ghost job

After Jenkins restart we found few nodes with busy executor. The job that occupies executor have striped white blue loading bar and does not link to any specific build (in fact no build is ongoing for that job). So we don't have id or ui way to abort it, you can see it here:
How the job looks on jenkins node
Now, I wanted to find a way to kill it without really looking into cause of the issue, maybe its related to Jenkins pipeline job wont finish in the UI - but in our case we don't have underlying finished job.
We tried to kill it by:
Restarting node
Killing any jenkins/agent threads on node - it just caused node to disconnect
Locating it somehow via ui
None of above worked, the ghost job was still there. Any clues how to kill such job or at least point to it without id ?
Edit: I found similar thread How to stop an unstoppable zombie job on Jenkins without restarting the server? with plenty answers though different solution that didn't work for me
Ok, so I've found a way to free these executors via groovy script executed on Jenkins Script Console.
The way I managed to kill it was to get node by label as Computer, iterate through executors (or rather, call the only one ;) ) and call Interrupt()
def busyExecutors = Jenkins.instance.getNode("myNode").toComputer()
println "Busy Executors list"
println busyExecutors;
println busyExecutors.getExecutors().get(0)
println busyExecutors.getExecutors().get(0).interrupt()
Here was my result of the script. Important part is of course the interrupt, other prints above are just for information.

What happens to running Jenkins builds when Jenkins is preparing for safe shutdown?

Does the current running build on Jenkins still completes when you click on "Prepare for Shutdown"?
I want to take admin control on Jenkins to make some config changes so I am clicking on "Prepare for Shutdown" but I want to ensure it completes the current builds before shutting down.
As cloudbees describes,
The Prepare for Shutdown feature prevents any more jobs from running. When all jobs are finished, you still need to restart/stop the instance manually.
It is the http://<jenkins.server>/quietDown command
They also describe various other options:
http://<jenkins.server>/restart
http://<jenkins.server>/safeRestart
http://<jenkins.server>/exit
http://<jenkins.server>/safeExit
http://<jenkins.server>/quietDown
http://<jenkins.server>/cancelQuietDown
Personally, I think they should have called it something different, like setToIdle or blockQueue
In your case, you will want to quietDown, then safeExit or safeRestart (to be safe). Normally you can just safeRestart.
There are some nuances regarding pipelines or jobs that trigger downstream jobs.
There are some plugins that add a button to achieve the same effect.
Saferestart just adds buttons.
Lenient shutdown talks about downstream jobs and also lets you manage nodes.
There's other to stop all jobs (bruteforce) and re queue them after (nice admin). Others also manage the queue.
IIRC, pipelines will complete the stage and can resume after the restart or cancel.

Monitoring external event job progress using Jenkins

How can I make an external job appear on a Jenkins dashboard more like a native Jenkins job, specifically including a progress 'bar'?
I've come across https://plugins.jenkins.io/external-monitor-job but this only appears to provide a way to say
My jobs has finished with this console output and this result code.
I would also like to see things such as current progress. Or to put it another way, I'd like my external job to be able to appear on something like https://kj187.github.io/dashing-jenkins_job/ in a similar manner to a native Jenkins job.
So is it possible to push more data than the external-monitor-job suggests?
Create a free style job and monitor the external process (print logs etc.) in the free style job - read the logs till logical conclusion in the freestyle job
What about pipeline view plugin?
Steps will be:
v1 (manual way)
create a job called monitoring_external_process inside pipeline view. This job performs a kind of ping looking the end of your process.
start your external process in a separate way.
go to jenkins monitoring_external_process job and press build.
a progress bar will be showed until the end of your external process.
v2 (automatic way)
create a job called monitoring_external_process inside pipeline view. This job performs a kind of ping looking the end of your process.
configure a webhook trigger or remote build for this job. This enable a public url to invoke the jenkins job. (See link reference #2)
configure your external process to perform an htttp request to the public url.
start your external process in a separate way.
Automatically your job will be started and progress bar will be showed until the end of your external process.
References:
(1) https://code-maven.com/jenkins-pipeline-hello-world
(2) https://jrichardsz.github.io/devops/devops-with-git-and-jenkins-using-webhooks

Timer Job not running

I created a custom timer job and deployed it into my development farm (MOSS 2007). The job runs fine. The thins is that after I deployed it to the QA farm. The status of the job says succeeded in central admin, but nothing happens. I added extra logging and nothing is being logged.
I thought it was something with that specific timer job, so I created another timer job that just has an assert and displays a pop up when it runs. Again, it just in the dev farm but not in the QA one. In this case though, the status of the job says Initialized and 0% completed, but no pop up.
I think it has something to do with permissions, but I cannot find what it is. Any toughts??
It worked again after clearing the cache of the SharePoint server.
I followed this steps

Resources