Jenkins && DEBUG logging

2023-07-25 Thread Matthias Apitz


Hello,

This is with jenkins-2.401.2-1.1.noarch.rpm on a RH8. I'm in the need to
debug the start of Jenkins, but get only INFO messages. I'm using as
config:

# grep -- -D /usr/lib/systemd/system/jenkins.service
Environment="JAVA_OPTS=-Dlog4j.debug 
-Djava.util.logging.config.file=/var/lib/jenkins/logging.properties 
-Djava.awt.headless=true"

# cat /var/lib/jenkins/logging.properties
.level=TRACE
handlers=java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level=FINEST
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter

The started Jenkins runs with the correct -D... flags:

# ps ax | grep java
2666762 ?Ssl0:27 /usr/bin/java -Dlog4j.debug 
-Djava.util.logging.config.file=/var/lib/jenkins/logging.properties 
-Djava.awt.headless=true -jar /usr/share/java/jenkins.war 
--webroot=/var/cache/jenkins/war --logfile=/var/log/jenkins/jenkins.log 
--httpPort=8080

But the file /var/log/jenkins/jenkins.log does not contain any DEBUG log
lines, only the lines shown below.

What I do wrong?

matthias

Jul 25, 2023 2:53:35 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jul 25, 2023 2:53:35 PM org.eclipse.jetty.server.handler.ContextHandler 
setContextPath
WARNING: Empty contextPath
Jul 25, 2023 2:53:35 PM org.eclipse.jetty.server.Server doStart
INFO: jetty-10.0.13; built: 2022-12-07T20:13:20.134Z; git: 
1c2636ea05c0ca8de1ffd6ca7f3a98ac084c766d; jvm 17.0.7+7-LTS
Jul 25, 2023 2:53:36 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor 
visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Jul 25, 2023 2:53:36 PM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: Session workerName=node0
Jul 25, 2023 2:53:36 PM hudson.WebAppMain contextInitialized
INFO: Jenkins home directory: /var/lib/jenkins found at: 
EnvVars.masterEnvVars.get("JENKINS_HOME")
Jul 25, 2023 2:53:36 PM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.@5ca17ab0{Jenkins 
v2.401.2,/,file:///var/cache/jenkins/war/,AVAILABLE}{/var/cache/jenkins/war}
Jul 25, 2023 2:53:36 PM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector@33b37288{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
Jul 25, 2023 2:53:36 PM org.eclipse.jetty.server.Server doStart
INFO: Started Server@6b1274d2{STARTING}[10.0.13,sto=0] @1686ms
Jul 25, 2023 2:53:36 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine running: controlPort=disabled
Jul 25, 2023 2:53:37 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Jul 25, 2023 2:53:37 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Jul 25, 2023 2:53:38 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Jul 25, 2023 2:53:38 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Jul 25, 2023 2:53:38 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Jul 25, 2023 2:53:38 PM jenkins.InitReactorRunner$1 onAttained
INFO: System config loaded
Jul 25, 2023 2:53:38 PM jenkins.InitReactorRunner$1 onAttained
INFO: System config adapted
Jul 25, 2023 2:53:38 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Jul 25, 2023 2:53:38 PM jenkins.InitReactorRunner$1 onAttained
INFO: Configuration for all jobs updated
Jul 25, 2023 2:53:38 PM jenkins.install.SetupWizard init
INFO: 

*
*
*

Jenkins initial setup is required. An admin user has been created and a 
password generated.
Please use the following password to proceed to installation:

74565d94443f4ed08790bf86da7953fd

This may also be found at: /var/lib/jenkins/secrets/initialAdminPassword

*
*
*

Jul 25, 2023 2:53:51 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Jul 25, 2023 2:53:51 PM hudson.lifecycle.Lifecycle onReady
INFO: Jenkins is fully up and running



-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ZL/J6kYrC2/z0lLE%40pureos.


Re: ‘Discard Old Items’ not removing all directories for multi-branch pipeline

2023-07-25 Thread James Robson
Looking at the timestamps and the logs, most but not all of these
'workflow-fallback' directories get created after reapplying Configuration
as Code not after a restart and it doesn't look like the builds are being
interrupted. Though for some reason there's a large delay between the
original build and the attempt at restarting it. For example one build I
looked at had succeeded at 2023-07-06 13:50 GMT, but the attempt to restart
came on 2023-07-14 despite the configuration as code being applied every
day. I also don't see any log messages that refer to one of the affected
builds between it's completion and the attempt to restart it so I can't see
what changed to trigger the restart attempt.

We are also using 'Max survivability' as the default and don't override
this anywhere.



On Tue, 18 Jul 2023 at 10:59, 'jn...@cloudbees.com' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Looking at the code it appears as though the pipeline was running but when
> Jenkins was restarted it could not find its data. (
> https://github.com/jenkinsci/workflow-cps-plugin/blob/a6ac2775ac1767f68ddabcff14364235a61e8bdf/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java#L659
> )
>
> Perhaps you had some dirty shutdown of Jenkins and are using a non
> survivable performace strategy rather than  MAX_SURVIVABILITY   ?
> https://www.jenkins.io/doc/book/pipeline/scaling-pipeline/
>
> /James
>
>
>
> On Monday, July 10, 2023 at 3:04:21 PM UTC+1 james@secondmind.ai
> wrote:
>
>> I have a multi-branch pipeline with ‘Discard old Items’ set up to get rid
>> of old PRs, but I’ve noticed that the directories aren’t all being removed
>> completely from the controller’s filesystem. These directories have no
>> confg.xml and they disappear from the UI but it leads to warning messages
>> in the log saying the config.xml couldn’t be found for the PR job. They all
>> seem to have the remnants of a single build that wasn’t removed correctly,
>> which includes a directory named ‘workflow-fallback’. What remains looks
>> like:
>>
>>
>> $JENKINS_HOME/jobs//branches//builds//
>>
>> build.xml
>>
>> workflow-fallback/
>>
>>  .xml
>>
>>
>> This workflow-fallback directory doesn’t currently exist for any build of
>> a PR that hasn’t been removed, so I’m unsure where it come from. Given the
>> time stamps of these directories this was happening over a wide span of
>> versions up to and including 2.401.2.
>>
>>
>> Can anyone explain what’s happening and is there anything I can do to
>> prevent this?
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/Kf5_PUHFBBM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/91073651-8d0d-4260-9de2-fac469cbd963n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAD10zuuU6Z5bAM2fEWykMJGpcd6-NLP0yRYRUMTH4nLhCqiEhg%40mail.gmail.com.