Re: Jenkins && DEBUG logging

2023-07-27 Thread James Nord
`.level=TRACE` is not valid level for java until logging so will probably
be ignored or use the default (info).

Use `FINEST` (this will likely severely hamper Jenkins startup,  you should
target specific classes or packages instead)

https://docs.oracle.com/javase/8/docs/api/java/util/logging/class-use/Level.html
has the defined levels



On Tue, 25 Jul 2023, 14:11 Matthias Apitz,  wrote:

>
> 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 

Re: fresh Jenkins installation does not present the dashboard

2023-07-27 Thread Thomas Markus

Hi,

Am 27.07.23 um 11:21 schrieb Matthias Apitz:



DEBUG isn't a legal level. There should be a corresponding error logged.

What would be a legal level?

matthias



see java.util.logging.Level

 * SEVERE (highest value)
 * WARNING
 * INFO
 * CONFIG
 * FINE
 * FINER
 * FINEST (lowest value)


best regards
Thomas

--
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/4a63d2ba-9c3a-e587-fca4-6175a51aeddb%40proventis.net.


OpenPGP_0x9794716335E9B5AF.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: fresh Jenkins installation does not present the dashboard

2023-07-27 Thread Matthias Apitz
El día jueves, julio 27, 2023 a las 11:00:12 +0200, 'Daniel Beck' via Jenkins 
Users escribió:

> On Thu, Jul 27, 2023 at 10:15 AM Matthias Apitz  wrote:
> 
> > I don't get why I'm not able to get all logs into the configured file
> > /var/log/jenkins/jenkins.log; my used log configuration is:
> >
> > cat logging.properties
> > .level=DEBUG
> >
> 
> DEBUG isn't a legal level. There should be a corresponding error logged.

What would be a legal level?

matthias

-- 
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/ZMI3JGXlf2JW3oUU%40pureos.


Re: fresh Jenkins installation does not present the dashboard

2023-07-27 Thread 'Daniel Beck' via Jenkins Users
On Thu, Jul 27, 2023 at 10:15 AM Matthias Apitz  wrote:

> I don't get why I'm not able to get all logs into the configured file
> /var/log/jenkins/jenkins.log; my used log configuration is:
>
> cat logging.properties
> .level=DEBUG
>

DEBUG isn't a legal level. There should be a corresponding error logged.

-- 
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/CAMo7Pt%2BRuoSM54jBDVXzsSfZ18tRTm-3nJJx17ewAuZn_s4UHg%40mail.gmail.com.


Re: fresh Jenkins installation does not present the dashboard

2023-07-27 Thread Matthias Apitz
El día miércoles, julio 26, 2023 a las 11:49:51 +0200, 'Daniel Beck' via 
Jenkins Users escribió:

> On Wed, Jul 26, 2023 at 11:21 AM Matthias Apitz  wrote:
> 
> > The jenkins server itself is requesting data from two servers in
> > Internet:
> >
> > …
> >
> > The first I have no idea, where is this configured.
> >
> 
> That's google.com, something set up long ago as an attempt to determine
> whether there's any internet connectivity. See
> https://github.com/jenkinsci/jenkins/blob/7fb5f24efd92eda2461e9bf2f1fdc50295e12573/core/src/main/java/hudson/model/UpdateCenter.java#L1414
> or
> https://github.com/jenkinsci/jenkins/blob/7fb5f24efd92eda2461e9bf2f1fdc50295e12573/core/src/main/java/hudson/model/UpdateSite.java#L437
> (the amount of unused/legacy code in this area makes it difficult to tell
> at a glance which is called) or an equivalent field in the JSON data
> retrieved from updates.jenkins.io.

If I look into the above Java files, they have a lot of log statements,
like

LOGGER.log(Level.FINE, "Failed to parse releaseTimestamp for "

I don't get why I'm not able to get all logs into the configured file
/var/log/jenkins/jenkins.log; my used log configuration is:

cat logging.properties
.level=DEBUG
handlers=java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level=ALL
# java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.SimpleFormatter.format = [%1$tF %1$tT][%4$-6s][%2$s] %5$s 
%6$s %n

hudson.security.csrf.CrumbFilter.level = DEBUG
hudson.plugins.git.GitStatus.level = DEBUG

and for 'FINE' I only see:

grep FINE /var/log/jenkins/jenkins.log
[2023-07-27 08:39:06][FINER ][winstone.Logger logInternal] Using 
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-17.0.7.0.7-1.el8_7.x86_64
[2023-07-27 08:39:06][FINER ][winstone.Logger logInternal] No common lib folder 
found
[2023-07-27 08:39:06][FINER ][winstone.Logger logInternal] Deploying host found 
at default
[2023-07-27 08:39:06][FINER ][winstone.Logger logInternal] ArgumentsRealm 
initialised: users: 0
[2023-07-27 08:39:06][FINER ][winstone.Logger logInternal] The webroot supplied 
already exists - overwriting where newer (/var/cache/jenkins/war)
[2023-07-27 08:39:06][FINER ][winstone.Logger logInternal] Access logging 
disabled - no logger class defined
[2023-07-27 08:39:06][FINER ][winstone.Logger logInternal] Initialized 1 
webapps: prefixes - [/]
[2023-07-27 08:39:06][FINER ][winstone.Logger logInternal] Initialized in 
non-virtual-host mode

Something must be missing in the log config.

matthias
-- 
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/ZMInkXRNj1EgGxYE%40pureos.