Jenkins keep cleaning up my workspace unexpectedly - docker

I have Jenkins in my Docker container to run the testing.
I noticed a weird thing that my workspace was removed every day.
Check the docker logs:
2021-11-26 08:26:57.511+0000 [id=450812] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 7,676 ms
2021-11-27 08:26:49.834+0000 [id=461439] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Workspace clean-up
2021-11-27 08:26:49.835+0000 [id=461439] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 0 ms
2021-11-28 08:26:49.834+0000 [id=479487] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Workspace clean-up
2021-11-28 08:26:49.835+0000 [id=479487] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 0 ms
2021-11-29 08:26:49.834+0000 [id=497481] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Workspace clean-up
2021-11-29 08:26:49.835+0000 [id=497481] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 0 ms
2021-11-30 08:26:49.834+0000 [id=515511] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Workspace clean-up
2021-11-30 08:26:52.726+0000 [id=515511] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 2,891 ms
2021-12-01 08:26:49.834+0000 [id=516550] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Workspace clean-up
2021-12-01 08:27:00.562+0000 [id=516550] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 10,727 ms
2021-12-02 08:26:49.834+0000 [id=520493] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Workspace clean-up
2021-12-02 08:26:59.681+0000 [id=520493] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 9,847 ms
Looks like Jenkins removes the workspace every 24 hours.
The weird thing is I do have a workspace cleanup plugin in my Jenkins but I have disabled it in the Plugin Manger and I don't have any workspace cleanup plugin syntax in my pipeline script.
Is there any other default feature/function/plug-in that will remove my workspace periodically?
I am very new to Jenkins, any help is appreciated!
######################## Updated on 12/4 ########################
I found this discussion is very similar to my question:
Jenkins is deleting workspaces on slaves
I changed this parameter to true in the Script Console.
hudson.model.WorkspaceCleanupThread.disabled = true
The weird thing is that the workspace clean up still happen, but at least this time it didn't remove the folder:
2021-12-03 21:15:02.446+0000 [id=19935] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Workspace clean-up
2021-12-03 21:15:05.225+0000 [id=19935] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 2,778 ms
2021-12-04 21:15:02.447+0000 [id=38002] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Workspace clean-up
2021-12-04 21:15:02.447+0000 [id=38002] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Workspace clean-up. 0 ms

Related

Jenkins getting stopped automatically in linux server

My jenkins server is getting stopped while the jenkins pipeline is running.
I don't know why its happening
Can anyone help me on this
Thanks in advance.
Jenkins logs
2022-02-28 11:36:16.019+0000 [id=78] INFO o.j.p.workflow.job.WorkflowRun#finish: pipeline #82 completed: SUCCESS
2022-02-28 12:33:52.148+0000 [id=230] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 12:33:52.171+0000 [id=230] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 14 ms
2022-02-28 13:04:29.255+0000 [id=278] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started telemetry collection
2022-02-28 13:04:30.277+0000 [id=278] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished telemetry collection. 1,015 ms
2022-02-28 13:33:52.148+0000 [id=332] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 13:33:52.158+0000 [id=332] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 5 ms
2022-02-28 14:33:52.148+0000 [id=425] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 14:33:52.158+0000 [id=425] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 5 ms
2022-02-28 15:33:52.148+0000 [id=526] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 15:33:52.156+0000 [id=526] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 4 ms
2022-02-28 16:33:52.149+0000 [id=631] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 16:33:52.161+0000 [id=631] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 7 ms
2022-02-28 16:36:45.550+0000 [id=646] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Fingerprint cleanup
2022-02-28 16:36:45.660+0000 [id=646] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Fingerprint cleanup. 106 ms
2022-02-28 17:17:51.445+0000 [id=704] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Workspace clean-up
2022-02-28 17:17:51.570+0000 [id=704] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Workspace clean-up. 121 ms
2022-02-28 17:33:52.149+0000 [id=732] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 17:33:52.157+0000 [id=732] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 4 ms
2022-02-28 18:33:52.149+0000 [id=827] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 18:33:52.157+0000 [id=827] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 5 ms
2022-02-28 19:33:52.148+0000 [id=914] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 19:33:52.162+0000 [id=914] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 5 ms
2022-02-28 20:33:52.149+0000 [id=1013] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 20:33:52.156+0000 [id=1013] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 4 ms
2022-02-28 21:33:52.149+0000 [id=1102] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 21:33:52.180+0000 [id=1102] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 28 ms
2022-02-28 22:33:52.149+0000 [id=1188] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 22:33:52.161+0000 [id=1188] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 9 ms
2022-02-28 23:33:52.148+0000 [id=1289] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-02-28 23:33:52.156+0000 [id=1289] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 5 ms
2022-03-01 00:33:52.148+0000 [id=1376] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-03-01 00:33:52.157+0000 [id=1376] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 5 ms
2022-03-01 01:33:52.148+0000 [id=1469] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder
2022-03-01 01:33:52.156+0000 [id=1469] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Periodic background build discarder. 6 ms
2022-03-01 02:33:52.148+0000 [id=1554] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Periodic background build discarder

Jenkins instance appears offline on Centos

I Installed Docker, Docker Compose and then Jenkins on CentOS 8. Seems Jenkins is installed correctly. However I could see the message Jenkins appears to be offline and get an exception as mentioned below. I changed the URL https://updates.jenkins.io/update-center.json in hudson.model.UpdateCenter.xml from https to http. Still the exception reappears. Plugins are not getting upgraded.
Any help on this is appreciated. Thanks.
Exception:
$: docker logs -f jenkins
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
2020-05-16 07:08:57.939+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized #4453ms to org.eclipse.jetty.util.log.JavaUtilLog
2020-05-16 07:09:02.052+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file
2020-05-16 07:09:04.197+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2020-05-16 07:09:04.990+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.27.v20200227; built: 2020-02-27T18:37:21.340Z; git: a304fd9f351f337e7c0e2a7c28878dd536149c6c; jvm 1.8.0_242-b08
2020-05-16 07:09:12.128+0000 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2020-05-16 07:09:12.439+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2020-05-16 07:09:12.439+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2020-05-16 07:09:12.476+0000 [id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms
2020-05-16 07:09:14.143+0000 [id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2020-05-16 07:09:14.794+0000 [id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.#2235eaab{Jenkins v2.237,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
2020-05-16 07:09:14.871+0000 [id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector#5315b42e{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2020-05-16 07:09:14.872+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: Started #21390ms
2020-05-16 07:09:14.881+0000 [id=20] INFO winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2020-05-16 07:09:18.067+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization
2020-05-16 07:09:18.316+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2020-05-16 07:09:22.668+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2020-05-16 07:09:22.694+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins
2020-05-16 07:09:22.881+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2020-05-16 07:09:24.037+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: System config loaded
2020-05-16 07:09:24.037+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: System config adapted
2020-05-16 07:09:24.037+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2020-05-16 07:09:24.038+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2020-05-16 07:09:24.194+0000 [id=39] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata
2020-05-16 07:09:24.255+0000 [id=39] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2020-05-16 07:09:27.052+0000 [id=25] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext#6069d6b7: display name [Root WebApplicationContext]; startup date [Sat May 16 07:09:27 UTC 2020]; root of context hierarchy
2020-05-16 07:09:27.053+0000 [id=25] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext#6069d6b7]: org.springframework.beans.factory.support.DefaultListableBeanFactory#6481ce76
2020-05-16 07:09:27.084+0000 [id=25] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#6481ce76: defining beans [authenticationManager]; root of factory hierarchy
2020-05-16 07:09:27.739+0000 [id=25] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext#3b4860bb: display name [Root WebApplicationContext]; startup date [Sat May 16 07:09:27 UTC 2020]; root of context hierarchy
2020-05-16 07:09:27.739+0000 [id=25] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext#3b4860bb]: org.springframework.beans.factory.support.DefaultListableBeanFactory#5c405df3
2020-05-16 07:09:27.747+0000 [id=25] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#5c405df3: defining beans [filter,legacy]; root of factory hierarchy
2020-05-16 07:09:27.955+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
2020-05-16 07:09:28.492+0000 [id=19] INFO hudson.WebAppMain$3#run: Jenkins is fully up and running
***2020-05-16 07:09:44.531+0000 [id=39] INFO hudson.util.Retrier#start: The attempt #1 to do the action check updates server failed with an allowed exception:
java.net.UnknownHostException: updates.jenkins.io***
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:357)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at hudson.model.DownloadService.loadJSON(DownloadService.java:114)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:212)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:207)
at hudson.PluginManager.checkUpdatesServer(PluginManager.java:1767)
at hudson.util.Retrier.start(Retrier.java:63)
at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1738)
at jenkins.DailyCheck.execute(DailyCheck.java:93)
at hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:100)
at java.lang.Thread.run(Thread.java:748)
2020-05-16 07:09:44.536+0000 [id=39] INFO hudson.util.Retrier#start: Calling the listener of the allowed exception 'updates.jenkins.io' at the attempt #1 to do the action check updates server
2020-05-16 07:09:44.544+0000 [id=39] INFO hudson.util.Retrier#start: Attempted the action check updates server for 1 time(s) with no success
2020-05-16 07:09:44.547+0000 [id=39] SEVERE hudson.PluginManager#doCheckUpdatesServer: Error checking update sites for 1 attempt(s). Last exception was: UnknownHostException: updates.jenkins.io
2020-05-16 07:09:44.566+0000 [id=39] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 20,358 ms
2020-05-16 07:10:31.488+0000 [id=56] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Periodic background build discarder
2020-05-16 07:10:31.492+0000 [id=56] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Periodic background build discarder. 2 ms
I got the same exception with Kubernetes environment.
My Setup:
-Docker CE
-Kubernetes
Deployment of Jenkins:
deployment.apps/jenkins created
persistentvolume/jenkins created
persistentvolumeclaim/jenkins-claim created
serviceaccount/jenkins created
role.rbac.authorization.k8s.io/jenkins created
rolebinding.rbac.authorization.k8s.io/jenkins created
service/jenkins created
In the pod's log, I could saw this
2020-06-19 05:04:12.590+0000 [id=39] INFO hudson.util.Retrier#start: The attempt #1 to do the action check updates server failed with an allowed exception:
java.net.UnknownHostException: updates.jenkins.io
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at hudson.model.DownloadService.loadJSON(DownloadService.java:114)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:212)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:207)
at hudson.PluginManager.checkUpdatesServer(PluginManager.java:1767)
at hudson.util.Retrier.start(Retrier.java:63)
at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1738)
at jenkins.DailyCheck.execute(DailyCheck.java:93)
at hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:100)
at java.lang.Thread.run(Thread.java:748)
<b>2020-06-19 05:04:12.591+0000 [id=39] INFO hudson.util.Retrier#start: Calling the listener of the allowed exception 'updates.jenkins.io' at the attempt #1 to do the action check updates server</b>
2020-06-19 05:04:12.593+0000 [id=39] INFO hudson.util.Retrier#start: Attempted the action check updates server for 1 time(s) with no success
2020-06-19 05:04:12.594+0000 [id=39] SEVERE hudson.PluginManager#doCheckUpdatesServer: Error checking update sites for 1 attempt(s). Last exception was: UnknownHostException: updates.jenkins.io
2020-06-19 05:04:12.597+0000 [id=39] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 20,180 ms
After some time if logs are fetched, you'd see the token for first time Jenkins setup.
get the token and in my case, I had to do a port-forward to 8080.
Once you access Jenkins on the browser, fill in the token and see if Jenkins is offline.
if it is, goto manage Jenkins then advanced tab, scroll down and locate the update.jenkins.io URL at last.
Here you just need to click on submit without tempering anything and apply.
Now check for the updates in the plugins
If this does not work then you can choose HTTP over HTTPS for updates.jenkins.io URL in the same advanced section and submit, apply the changes. Again check for updates in plugins.
If above 2 don't work then it is very much possible you'd have to configure the proxy settings of Jenkins so that Jenkins instance can reach to internet.
The exception is simply saying that Jenkins instance could not fetch the available plugins/updates from updates.jenkins.io site since it can not resolve the URL.
The main idea here is to resolve the URL.
There are a couple of issues related to this URL exception on git issue trackers as well.
Guess you've just hit the common issue.
In my case I had to consider https://kubernetes.io/docs/tasks/debug-application-cluster/dns-debugging-resolution/ for proper debugging of dns.
I guess you can check if you have the network interface with nameserver 8.8.8.8 or the /etc/resolve.conf has the same.
After trying different things, these commands worked for me:
Disable and stop the firewall on my Centos Host
sudo systemctl disable firewalld
sudo systemctl stop firewalld
Then, restart docker
sudo service docker restart

Running AngularDart in docker container - memory use

I am running an AngularDart project in a Docker Container google/dart and install webdev.
It is running very slow, so I have tried to add more cpu - do you know how to optimise and make it faster and is it good practice to run AngularDart in google/dart?
docker container run --name webdev -it --rm -p 8080:8080 -v $(pwd):/usr/src/app --cpu-shares=2 google/dart
The first time, it builds ok, but after making changes - the second build is very slow.
You can see the build log here:
webdev serve --hostname 0.0.0.0
Creating build script, took 22350ms
[INFO] Setting up file watchers completed, took 135ms
[INFO] Waiting for all file watchers to be ready completed, took 5.6s
[INFO] Reading cached asset graph completed, took 2.9s
[INFO] Checking for updates since last build completed, took 4.3s
[INFO] Running build completed, took 1.9s
[INFO] Caching finalized dependency graph completed, took 1.5s
[INFO] Succeeded after 3.5s with 0 outputs (0 actions)
Serving `web` on http://0.0.0.0:8080
Serving `test` on http://0.0.0.0:8081
[INFO] ------------------------------------------------------------------------
[INFO] Starting Build
[INFO] Updating asset graph completed, took 57ms
[WARNING] No actions completed for 32.6s, waiting on:
- angular on lib/app_component.dart
[WARNING] No actions completed for 15.0s, waiting on:
- build_web_compilers|ddc on lib/app_component.template.dartdevc.module
[WARNING] No actions completed for 15.1s, waiting on:
- build_web_compilers|ddc on lib/app_component.template.dartdevc.module
[WARNING] No actions completed for 20.6s, waiting on:
- build_modules|dartdevc on lib/app_component.template.dartdevc.module
[WARNING] No actions completed for 31.2s, waiting on:
- build_modules|dartdevc on lib/app_component.template.dartdevc.module
[INFO] Running build completed, took 2m 28s
[INFO] Caching finalized dependency graph completed, took 3.1s
[INFO] Succeeded after 2m 31s with 12 outputs (10 actions)

Sonarqube background analysis fails, reports smells plugin does not exist

I have a brand new sonarqube installation (6.7.1.35068) which is being invoked from a brand-new jenkins server (2.102) using the maven goal. Both are running as services on ec2-linux which is fully patched.
At first it worked.
Then, it sonar began reporting:
java.lang.IllegalArgumentException: Plugin [smells] does not exist
and refusing to run the background analysis, although the jenkins build reports success.
I can run the jenkins job twice in a row and get a success and a failure without changing anything in the servers or the code. And then three failures in a row, then four successes in a row.
The plugin does indeed exist, and the sonar server show it is loaded in its configuration reporting.
I have looked at file permissions on the machine, and everything seems to be owned by the right user with the right permissions.
Has anyone seen this behavior? Any ideas about what other troubleshooting I could do?
Many thanks for any help.
EDIT: Here is the content of sonar.log at startup.
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2018.01.22 13:48:02 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonar/temp
2018.01.22 13:48:02 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.01.22 13:48:02 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonar/elasticsearch]: /opt/sonar/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonar/temp/conf/es
2018.01.22 13:48:03 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.01.22 13:48:03 INFO app[][o.e.p.PluginsService] no modules loaded
2018.01.22 13:48:03 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.01.22 13:48:12 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2018.01.22 13:48:12 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonar]: /usr/java/jdk1.8.0_121/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonar/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:./lib/server/*:/opt/sonar/lib/jdbc/postgresql/postgresql-42.1.4.jar org.sonar.server.app.WebServer /opt/sonar/temp/sq-process7588018711976818336properties
2018.01.22 13:48:28 INFO app[][o.s.a.SchedulerImpl] Process[web] is up
2018.01.22 13:48:28 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [/opt/sonar]: /usr/java/jdk1.8.0_121/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonar/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:./lib/server/*:./lib/ce/*:/opt/sonar/lib/jdbc/postgresql/postgresql-42.1.4.jar org.sonar.ce.app.CeServer /opt/sonar/temp/sq-process7608302589622094268properties
2018.01.22 13:48:37 INFO app[][o.s.a.SchedulerImpl] Process[ce] is up
2018.01.22 13:48:37 INFO app[][o.s.a.SchedulerImpl] SonarQube is up
And that "no modules loaded" from the plugins service doesn't look so good. In my defense, I was looking at the sonarqube_system_info.json and it reports:
"Plugins": {
"groovy": "1.5 [Groovy]",
"java": "5.0.1.12818 [SonarJava]",
"smells": "4.0.0 [Code Smells]",
"web": "2.5.0.476 [Web]",
"xml": "1.4.3.1027 [SonarXML]",
"clover": "3.1 [Clover]",
"scmmercurial": "1.1.1 [Mercurial]",
"Sonargraph": "3.5 [Sonargraph]",
"aemrules": "0.9 [AEM Rules for SonarQube]",
"checkstyle": "3.7 [Checkstyle]",
"javascript": "4.0.0.5862 [SonarJS]",
"status": "3.0.1 [SVG Badges]"
},
This issue is probably coming from a wrong usage of SonarQube, most probably by using multiple server on the same database.
See more details about how to detect this in thread : https://groups.google.com/forum/#!msg/sonarqube/IPjmDeGDUFc/dHMfJooXAQAJ

Why does Jenkins hang when I try to build with the gradle-release plugin?

I set up the release plugin on my Grails project and successfully ran it on my localhost.
When I try to set up the same build in Jenkins, the build hangs indefinitely. The last thing in the output before it hangs is the checkCommitNeeded step.
Anything I can do to figure out what's going wrong?
I have set -Prelease.useAutomaticVersion=true and the two version params in switches, as mentioned in the plugin docs.
Update
On the researchgate Gitter, Christian Gonzalez mentioned that Jenkins is detecting another commit caused by the release plugin, and getting itself stuck in a loop. For Git, an additional behavior can be added to ignore changes committed by the plugin. However, my project is using SVN.
Update
Below is a snippet of the output from adding -d
11:12:48.907 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':checkCommitNeeded'.
11:12:48.908 [INFO] [org.gradle.api.Project] Running [svn, status] in [/var/lib/jenkins/jobs/MyTeam/jobs/MyProject/jobs/MyProject-release/workspace]
11:12:48.924 [INFO] [org.gradle.api.Project] Running [svn, status] produced output: []
11:12:48.926 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':checkCommitNeeded'
11:12:48.926 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :checkCommitNeeded (Thread[Daemon worker,5,main]) completed. Took 0.02 secs.
11:12:48.926 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry] Worker root.3 completed (0 in use)
11:12:48.926 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry] Worker root.4 started (1 in use).
11:12:48.926 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :checkUpdateNeeded (Thread[Daemon worker,5,main]) started.
11:12:48.927 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :myproject:checkUpdateNeeded
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':checkUpdateNeeded'
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':checkUpdateNeeded' is up-to-date
11:12:48.927 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing task ':checkUpdateNeeded' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':checkUpdateNeeded'.
11:12:48.928 [INFO] [org.gradle.api.Project] Running [svn, status, -q, -u] in [/var/lib/jenkins/jobs/MyTeam/jobs/MyProject/jobs/MyProject-release/workspace]
11:12:51.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:12:51.479 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:12:51.480 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:12:51.481 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
11:13:01.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:13:01.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:13:01.478 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:13:01.480 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
11:13:11.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:13:11.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:13:11.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:13:11.479 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
...
The last 4 lines are repeated over and over.
I faced the same issue. For me, the reason was that I did the wrong setup configuration for the project. Example: wrong GitHub URL (without .git extension) added, incorrect Poll SCM config, etc.
Fix for me was to restart the Jenkins server & correct the changes under 'Manage' for your project & again build.

Resources