Disable Jenkins Log File Usage - jenkins

Jenkins has the cool perk of logging almost everything that happens during your build process. Right now everything is logged in /var/log/jenkins/jenkins.log.
After regular periods, this file grow to more than 400 GB in space.
Is there any way to disable this "feature"?
As the system the system is used company internally, I would'nt mind, disabling logging at all.
Thanks for your help!

Jenkins logging is highly configurable, so you can turn off logging for packages that you;re not interested in. The configuration is done at:
$JENKINS_URL/log/
documentation is at https://wiki.jenkins-ci.org/display/JENKINS/Logging

Related

Alfresco digitale workspace localization issue

I have installed Alfresco using docker images as explained in this Angel Borrow's github repos. All goes fine.
But some translation key are not processed. On this image you can see that the translation key "LOGIN.LABEL.USERNAME" is not replaced by it' value.
There are several other issues like that on some popups in ADW (Alfresco Digital Workspace) app.
What is the best way to fix that?
PS : The same localization issues also exist on alfresco cloud.
The first think to check is if you have an adBlock extension activated on your browser page, if it's the case, disable adblock for Alfresco digitale workspace and reload.
You can debug error by using developer tools on your browser (F12)
in network you can see errors related to labels blocked and have more details.
O.

Separate transaction logs in Neo4j Enterprise

I'am trying to change logical logs out of the *.db folder to put this in another disk volume. However I don't see any option in the neo4j config files that will allow you to do this. It's possible to do this configuration?
My neo4j version is 3.2.1.
Thanks
No, it is - at this time - not possible to move the transaction logs to some other place. Note that while the term logs is technically correct, these files are essential to the integrity of the database (unlike a regular log it would be very unwise to delete them) and it is therefore logical that they live together with the actual datafiles.
Hope this helps,
Tom
see file
conf/neo4j.conf
and line
#dbms.directories.logs=logs

Jenkins UI is not working but backend is fine

We are running into issues were the Jenkins UI stops working but backend is fine and is able to process all traffic.
Is there a way we can restart just the front end of jenkins ?
Thanks
I did some research about Jenkins UI freeze and found that in most of the times it happens due to the java garbage collector. Luckily it is something that you can configure, so this is what I suggest:
read about java garbage collector if you are not familiar with it.
enable GC logging for your Jenkins instance
analyze GC logs with tools such as http://gceasy.io/
add relevant GC flags to your Jenkins Java Opts
repeat 2-4 until satisfied
For further reading see:
my slides from a talk I did about this subject:
https://www.slideshare.net/TidharKleinOrbach/why-does-my-jenkins-freeze-sometimes-and-what-can-i-do-about-it
a post I made about the subject:
http://engineering.taboola.com/5-simple-tips-boosting-jenkins-performance/
more resources:
https://www.cloudbees.com/blog/joining-big-leagues-tuning-jenkins-gc-responsiveness-and-stability
https://jenkins.io/blog/2016/11/21/gc-tuning/
I ran into the same problem this week. These are the things I did:
Looked at the debugging steps given on Jenkins wiki, but it didn't work for me:https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+is+hanging
Later, I realised I might have memory issues on the server where I was running Jenkins, and the UI had crashed. Now, the UI won't load even after freeing up memory space.
Finally, I restarted my Jenkins server - something I was avoiding doing from the beginning - and it solved the issue and Jenkins UI came back up.
Thanks

Web deployment failing due to file in use

I'm using Microsoft's Web Deploy Remote Agent service to allow me to easily publish code to the server from within Visual Studio.
The web site I am deploying is using log4net to log messages to log files, and every time I try to deploy a new version of the code, I get this error in Visual Studio stating that the current log4net log file is in use:
An error occurred when the request was processed on the remote
computer. The file 'Web.log' is in use.
The process cannot access 'C:\inetpub\wwwroot\Logs\Web.log' because it
is being used by another process.
I can solve this by going onto the server and doing an iisreset before publishing... but that is kind of defeating the point of 'easy' publishing from Visual Studio :)
Is there some way I can get the publish task to issue an iisreset automatically, or some other way I can work round this?
I kept poking around and found some tidbits around the file being locked in a few other forums. Have you tried adding
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
To your <appender> element in the web.config file? From the Apache docs
Opens the file once for each AcquireLock/ReleaseLock cycle,
thus holding the lock for the minimal amount of time. This method of
locking is considerably slower than FileAppender.ExclusiveLock but
allows other processes to move/delete the log file whilst logging
continues.
As far as the performance considerations, I suppose you would need to test if this will affect you or not as I am assuming it really depends on how often you are writing to the log file as to how much this will impact performance. I can't believe that getting/releasing a lock could take all that much time though.
There is a MSDEPLOY provider called recycleApp which is used exactly for this. You can include this in your deployment manifest.
Another option is to use ignoreOnErrors flag which will skip the file in use and continue with the deployment.

Extract information from a log file using powershell

Hi I am new to the language of powershell s i though about playing around with it. I am trying to extract information out of a log file (the file belongs to a program called event viewer). I need to use the information under Boot Duration.
Could somebody guide me a little bit?
It will be greatly appreciated
Thanks.
Logs are always the same. Not sure if you are going to monitor boot log of windows or linux or what.. but will try to answer.
If you edit your question and add info on the operating system and an example of relevant lines of boot log file I can provide you with some powershell code.
In general you should do:
Identify how to manually see boot time in log file. For example
probably it will have a starting boot time and a finished boot time.
Something similar to this.
[2012-06-08 12:00:04] starting boot
lot of log entries
[2012-06-08 12:00:34] finished boot
Once you know how to do it manually, you have to convince powershell to do it for you. You can use regular expressions to look for the pattern of dates. In my example look for lines that contains "starting boot" and then parse it to load date.
Here you have an useful link on powershell and regular expressions: http://www.regular-expressions.info/powershell.html

Resources