Re: mvn not found on $JENKINS_HOME/workspace/@tmp
Hi :) >From the previous email, I asked for help about my Jenkins Slave unable to run mvn I'd like to share what I've founded and the solution for the problem. I basically set the PATH for M2_HOME and MAVEN_HOME at /etc/profile which is somehow not work with the system's permission So, I changed to set M2_HOME and MAVEN_HOME at /etc/environment instead and then the problem was gone :D It's not Jenkins issue not even relate LOL but it's Linux 101 Anyway, amy thanks for Mallarapu Ananth and John for the suggestion. It was helpful Cheers ในวันที่ พฤ. 25 มี.ค. 2021 เวลา 00:51 John Patrick เขียนว่า: > Personally I would switch to using maven wrapper as it have saved me > from a lot of issues like this. > > But to your errors; > > From your first error, check if mvn is on the path, so I would expect > to see "/opt/maven/bin" within the PATH assuming "/opt/maven" is where > maven is installed. Doesn't matter what M2_HOME or JAVA_HOME are until > mvn is on the path. > > The second error implies you've not told maven what to do, as that > looks like a maven output. So it has managed to do "mvn" without any > arguments, so you need to do "mvn clean install" or "mvn verify". > > For the existing Wrapper see https://github.com/takari/maven-wrapper > From the next Maven release see this wrapper > https://maven.apache.org/plugins/maven-wrapper-plugin/index.html > > John > > On Wed, 24 Mar 2021 at 12:00, Mallarapu Ananth > wrote: > > > > Hi , > > > > Have tried to print the M2_HOME and JAVA_HOME in the pipeline you are > trying to build . if they are empty it might be getting overwritten . try > to put then as environment variables in jenkins config . > > > > On Wednesday, March 24, 2021 at 4:53:13 PM UTC+5:30 banthit...@gmail.com > wrote: > >> > >> I've locally installed maven on both Master and Slave > >> and correctly set path for both JAVA_HOME and M2 > >> > >> jenkins@jenkins-slave-02:~$ echo $M2_HOME > >> /opt/maven > >> jenkins@jenkins-slave-02:~$ echo $JAVA_HOME > >> /usr/lib/jvm/java-1.8.0-openjdk-amd64 > >> > >> Once reach the stage involved mvn command, the error occurs > >> > >> /jenkins/workspace/simple_any_tests_master@tmp/durable-c32a56b1/script.sh: > 1: mvn: not found > >> > >> > >> I notice that this @tmp dir was empty which means no pom.xml and when > looking closely by reproduce the mvn compile in @tmp dir > >> > >> [INFO] Scanning for projects... > >> [INFO] > > >> [INFO] BUILD FAILURE > >> [INFO] > > >> [INFO] Total time: 0.117 s > >> [INFO] Finished at: 2021-03-24T12:09:50+01:00 > >> [INFO] > > >> [ERROR] No goals have been specified for this build. You must specify a > valid lifecycle phase or a goal in the format : or > :[:]:. Available > lifecycle phases are: validate, initialize, generate-sources, > process-sources, generate-resources, process-resources, compile, > process-classes, generate-test-sources, process-test-sources, > generate-test-resources, process-test-resources, test-compile, > process-test-classes, test, prepare-package, package, pre-integration-test, > integration-test, post-integration-test, verify, install, deploy, > pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> > [Help 1] > >> [ERROR] > >> [ERROR] To see the full stack trace of the errors, re-run Maven with > the -e switch. > >> [ERROR] Re-run Maven using the -X switch to enable full debug logging. > >> [ERROR] > >> [ERROR] For more information about the errors and possible solutions, > please read the following articles: > >> [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException > >> > >> I'm not sure what is the root cause of this error whereas incorrect > maven path or slave setting (permission, etc.) > >> > >> Any helps would be appreciated > >> Cheers > > > > -- > > 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/efd1fb38-db5e-45dc-8ea6-437f9668c417n%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/CAH9u10%3D8oFGxqJ9-0HKHVrEi9PmZ6X9UotQ7LiF9VH21Y%2BtMqA%40mail.gmail.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
mvn not found on $JENKINS_HOME/workspace/@tmp
I've locally installed maven on both Master and Slave and correctly set path for both JAVA_HOME and M2 jenkins@jenkins-slave-02:~$ echo $M2_HOME /opt/maven jenkins@jenkins-slave-02:~$ echo $JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-amd64 Once reach the stage involved mvn command, the error occurs /jenkins/workspace/simple_any_tests_master@tmp/durable-c32a56b1/script.sh: 1: mvn: not found I notice that this @tmp dir was empty which means no pom.xml and when looking closely by reproduce the mvn compile in @tmp dir [INFO] Scanning for projects... [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 0.117 s [INFO] Finished at: 2021-03-24T12:09:50+01:00 [INFO] [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException I'm not sure what is the root cause of this error whereas incorrect maven path or slave setting (permission, etc.) Any helps would be appreciated Cheers -- 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/CAEaEQi%2BT7ggJQPR438rjgDG1BoWtWfhH_awu3mWZcXe82BTeGA%40mail.gmail.com.
Blue Ocean page unable to completely download its page
Hi guys, This is fresh Jenkins server, recently created with no job. I've been setting up plugins. Everytime I'm trying to open the Blue Ocean page, it ends up with hanging. The way I'm enter to the Blue Ocean page is this Blue Ocean button [image: image.png] *Jenkins version 2.263.3, Java Open JDK 8* Related log from /var/log/jenkins/jenkins.log 2021-02-05 07:25:42.730+ [id=14] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://x.x.x.x8080/adjuncts/0ac646c3/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js java.util.concurrent.TimeoutException: Idle timeout expired: 5000/5000 ms Seems like this is not a popular issue. I can't find any related topic, solution. has anyone run into the same problem? Appreciate your help Cheers -- 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/CAEaEQiL9U8qniA7-MNBVtPhps9uUVZ_saENC4ih5gBHwNjnYDA%40mail.gmail.com.
Jenkins installation freeze at install plugin page and unable to continue
I've installed native *Jenkins 2.263.3* (latest stable Debian package ) and Java openJDK 8. The installation was successful. However, once the installation came to the step "Customize Jenkins" and there were options to either choose *Install suggested plugins* or *Select plugins to install*. Both give the same result. Jenkins UI will freeze for about a couple of seconds and then the error page shows as pictured below. [image: image.png] I tried restarting, re-install (same version) unfortunately, it doesn't change. The error messages in /var/log/jenkins/jenkins.log Running from: /usr/share/jenkins/jenkins.war 2021-02-04 09:28:14.105+ [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath 2021-02-04 09:33:05.096+ [id=16]WARNING h.i.i.InstallUncaughtExceptionHandler#handleException java.util.concurrent.TimeoutException: Idle timeout expired: 5000/5000 ms Caused: java.io.IOException at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:234) And here is an information of my system Ubuntu 20.04.2 LTS 5.4.0-65-generic $ free -mh totalusedfree shared buff/cache available Mem: 6.6Gi 1.0Gi 3.8Gi 1.0Mi 1.9Gi 5.3Gi Swap:0B 0B 0B Java openjdk version "1.8.0_275" OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~20.04-b01) OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode) Jenkins ● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; generated) Active: active (exited) since Thu 2021-02-04 12:18:28 CET; 10min ago Docs: man:systemd-sysv-generator(8) Process: 15678 ExecStart=/etc/init.d/jenkins start (code=exited, status=0/SUCCESS) Feb 04 12:18:27 jenkins-master.com systemd[1]: Starting LSB: Start Jenkins at boot time... Feb 04 12:18:27 jenkins-master.com jenkins[15678]: Correct java version found Feb 04 12:18:27 jenkins-master.com jenkins[15678]: * Starting Jenkins Automation Server jenkins Feb 04 12:18:27 jenkins-master.com su[15713]: (to jenkins) root on none Feb 04 12:18:27 jenkins-master.com su[15713]: pam_unix(su-l:session): session opened for user jenkins by (uid=0) Feb 04 12:18:27 jenkins-master.com su[15713]: pam_unix(su-l:session): session closed for user jenkins Feb 04 12:18:28 jenkins-master.com jenkins[15678]:...done. Feb 04 12:18:28 jenkins-master.com systemd[1]: Started LSB: Start Jenkins at boot time. Jenkins User $ groups jenkins jenkins : jenkins root Has anyone faced the same issue ? -- 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/CAEaEQiKqcrYx_gkaDOUc0YXYGEavB2i6K%3DqgGCV3YWjVsqMmWw%40mail.gmail.com.
Re: Needed suggestions for Jenkins Master/Slave architecture
Hello Jérôme, Many thanks for your email and very detailed answers! It really helpful ในวันที่ อ. 2 ก.พ. 2021 เวลา 21:24 Jérôme Godbout เขียนว่า: > Hi, there isn’T much constraint except the setup when moving from master > only to master/slave. Only SSH to be setup and here you go. As for the disk > space, the workspace is not automatically clean, you might want to clean > the working directory before you end your pipeline (after gathering all the > wanted information). This will save space on the slave hard disk. To test > your setup, you can use the same machine for you Jenkins slave as the > master one, it will work and after you only need to setup additional slave > on other machines. > > > > Jenkins keep the build information and the project folder will grow over > time. You can setup the project to only keep X items or items from a > specific length of time. That will reduce the master size. > > > > But keep in mind the slave Harddrive will be stressed a lot, they will > have a short life time. I backup the master project and have a reliable > setup with raid there. Slave are burnable, you don’t really care, fast > enough to do the job, died, just put back a new image that kickstart a > slave with a new harddrive and up you go. > > > > *Jérôme Godbout* > Software / Firmware Lead > > *C:* (581) 777-0050 > *O:* (418) 800-1073 ext.: 109 > godbo...@amotus.ca > > *dimonoff.com* <https://www.dimonoff.com/> |*amotus.ca* > <https://www.amotus-solutions.com/> > > > > *From:* jenkinsci-users@googlegroups.com > *On Behalf Of *banthita limwilai > *Sent:* February 2, 2021 3:44 AM > *To:* jenkinsci-users@googlegroups.com > *Subject:* Needed suggestions for Jenkins Master/Slave architecture > > > > Hello Folks! > > > > I'm about to set up New Jenkins cluster with Master/Slave model. Actually, > we already have Jenkins master-only running but it's usually faces run out > of memory issue. > > > > I've read all the recommended on the official, however there are some > details missing there. > > > > *1. Please suggest for storage for both Master and Slave. Currently our > Master-only Jenkins uses huge disk spaces (~200GB) and it tends to increase > along with the number of new jobs.* > > > > My question is where does ./workspace, ./jobs and ./caches (most biggest > directories) under $JENKINS_HOME will store? in Master or Slave? > > > > *2. If I mark Master as drain node (not executing job), so my master can > possibly has a minimal resources e.g. CPU 1vCPU and 4GB or less number of > memory ?* > > > > **for my current Master-only Jenkins, we have 30GB memory/200GB > > > > *3. If there any issue or concerns from migrating Master-only to > Master/Slave ? * > > > > Any suggestion would be appreciated :) > > > > Cheers, > > -- > 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/CAEaEQi%2BxfiHndc7%3Dnr3dtjaPEF_A__tc3-dkyRvsY5%2B0%3D1Pdmw%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-users/CAEaEQi%2BxfiHndc7%3Dnr3dtjaPEF_A__tc3-dkyRvsY5%2B0%3D1Pdmw%40mail.gmail.com?utm_medium=email_source=footer> > . > > -- > 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/QB1PR01MB384412A69A943AD1E1AC404ACDB59%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM > <https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB384412A69A943AD1E1AC404ACDB59%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM?utm_medium=email_source=footer> > . > -- 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/CAEaEQiKx%2BmHTXGhR2y30ExFmMg2qBrdREtFFhvduEhH-BxbOsw%40mail.gmail.com.
Needed suggestions for Jenkins Master/Slave architecture
Hello Folks! I'm about to set up New Jenkins cluster with Master/Slave model. Actually, we already have Jenkins master-only running but it's usually faces run out of memory issue. I've read all the recommended on the official, however there are some details missing there. *1. Please suggest for storage for both Master and Slave. Currently our Master-only Jenkins uses huge disk spaces (~200GB) and it tends to increase along with the number of new jobs.* My question is where does ./workspace, ./jobs and ./caches (most biggest directories) under $JENKINS_HOME will store? in Master or Slave? *2. If I mark Master as drain node (not executing job), so my master can possibly has a minimal resources e.g. CPU 1vCPU and 4GB or less number of memory ?* **for my current Master-only Jenkins, we have 30GB memory/200GB *3. If there any issue or concerns from migrating Master-only to Master/Slave ? * Any suggestion would be appreciated :) Cheers, -- 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/CAEaEQi%2BxfiHndc7%3Dnr3dtjaPEF_A__tc3-dkyRvsY5%2B0%3D1Pdmw%40mail.gmail.com.
Is it possible for provisioning Jenkins agents with Docker plugin as a Swarm cluster ?
Dear folks, I have one huge production Jenkins master which is contains projects over 50. This Jenkins master act as a build and scheduler machine. Then I've been facing the issue about the Jenkins performance and its run out of resources. So I'm trying to do the optimization by change its architecture to Master/agents. The concerns are, I have limited number of agent and limited resources per agent. Hence, I would like to find the best approach that can provide us for acceptable costs and the difficulty of the management. So, I came up with the solution using Jenkins plugin *'docker plugin' *with can operate with the minimum resources perfectly. I've tested with my test cluster but the scenario was Master/Agents in the same machine using docker plugin. It works well. Then I'd like to implement in my production Jenkins with this docker plugin but I don't want to spawn agents node in the same machine. I want to join agent nodes to the swarm cluster. Does it possible ? -- 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/cfb1d124-7c72-4aad-b194-28c0546f43dcn%40googlegroups.com.