Following is what I tried .
Kindly visit git page :
In “Step 7: Create Upstream Build Job” shall i add the down stream job to Post-build Actions >Build other projects. So that once the upsteam project is build it will trigger the downstream project.
Many thanks for your help Sir. As advised by you i followed the instructions in the link provided by you.
But when I manually triggered the ‘nautilus-app-deployment’ job, it successfully triggered the ‘manage-services’ job, which in turn restarted the Apache service. However, the console output indicates that the restart and running status of Apache were only confirmed on stapp01 and not other servers
Following is the console output:
Started by upstream project "nautilus-app-deployment
" build number 1
originally caused by:
Started by user admin
Started by upstream project "nautilus-app-deployment
" build number 1
originally caused by:
Started by user admin
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/manage-services
[SSH] script:
sudo systemctl restart httpd
sudo systemctl status httpd
[SSH] executing...
e[?1he=
e[0;1;32m●e[0m httpd.service - The Apache HTTP Servere[m
Loaded: loaded (e]8;;file://stapp01.stratos.xfusioncorp.com/usr/lib/systemd/system/httpd.service /usr/lib/systemd/system/httpd.servicee]8;; ; e[0;1;38;5;185mdisablede[0m; preset: e[0;1;38;5;185mde[me[7m>e[m
Active: e[0;1;32mactive (running)e[0m since Sat 2025-10-11 06:08:23 UTC; 84ms agoe[m
Docs: e]8;;man:httpd.service(8) man:httpd.service(8)e]8;; e[m
Main PID: 3683 (httpd)e[m
Status: "Started, listening on: port 8080"e[m
Tasks: 177 (limit: 411140)e[m
Memory: 21.0Me[m
CGroup: /docker/03d29edea115b7f15f773935ff1fa5b96ed2927384ab06ce3648c4dacce[me[7m>e[m
├─e[0;38;5;245m3683 /usr/sbin/httpd -DFOREGROUNDe[0me[m
├─e[0;38;5;245m3690 /usr/sbin/httpd -DFOREGROUNDe[0me[m
├─e[0;38;5;245m3691 /usr/sbin/httpd -DFOREGROUNDe[0me[m
├─e[0;38;5;245m3692 /usr/sbin/httpd -DFOREGROUNDe[0me[m
└─e[0;38;5;245m3693 /usr/sbin/httpd -DFOREGROUNDe[0me[m
e[m
Oct 11 06:08:23 stapp01.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Got e[me[7m>e[m
Oct 11 06:08:23 stapp01.stratos.xfusioncorp.com httpd[3683]: AH00558: httpd: Coe[me[7m>e[m
Oct 11 06:08:23 stapp01.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Got e[me[7m>e[m
Oct 11 06:08:23 stapp01.stratos.xfusioncorp.com httpd[3683]: Server configured,e[me[7m>e[m
Oct 11 06:08:23 stapp01.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Got e[me[7m>e[m
Oct 11 06:08:23 stapp01.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Chane[me[7m>e[m
Oct 11 06:08:23 stapp01.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Job e[me[7m>e[m
Oct 11 06:08:23 stapp01.stratos.xfusioncorp.com systemd[1]: Started The Apache e[me[7m>e[m
Additionally, in the ‘manage-services’ job, under the ‘Execute shell script on remote host using SSH’ build step, if I configure the script to run on individual servers (stapp01, stapp02, or stapp03), the console output confirms the restart and running status of Apache on each respective server. However, when configured to run on all three servers, the output only reflects the status for the first server.
Started by user admin
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/manage-services
[SSH] script:
echo BigGr33n | sudo -S sudo systemctl restart httpd && sudo systemctl status httpd
[SSH] executing...
e[?1he=
e[0;1;32m●e[0m httpd.service - The Apache HTTP Servere[m
Loaded: loaded (e]8;;file://stapp03.stratos.xfusioncorp.com/usr/lib/systemd/system/httpd.service /usr/lib/systemd/system/httpd.servicee]8;; ; e[0;1;38;5;185mdisablede[0m; preset: e[0;1;38;5;185mde[me[7m>e[m
Active: e[0;1;32mactive (running)e[0m since Sat 2025-10-11 06:26:51 UTC; 129ms agoe[m
Docs: e]8;;man:httpd.service(8) man:httpd.service(8)e]8;; e[m
Main PID: 4264 (httpd)e[m
Status: "Started, listening on: port 8080"e[m
Tasks: 177 (limit: 411140)e[m
Memory: 15.6Me[m
CGroup: /docker/a186890c44f565ea1e94677a5d617a9899e0c81f3c6a056bbb4da17745e[me[7m>e[m
├─e[0;38;5;245m4264 /usr/sbin/httpd -DFOREGROUNDe[0me[m
├─e[0;38;5;245m4271 /usr/sbin/httpd -DFOREGROUNDe[0me[m
├─e[0;38;5;245m4272 /usr/sbin/httpd -DFOREGROUNDe[0me[m
├─e[0;38;5;245m4273 /usr/sbin/httpd -DFOREGROUNDe[0me[m
└─e[0;38;5;245m4274 /usr/sbin/httpd -DFOREGROUNDe[0me[m
e[m
Oct 11 06:26:51 stapp03.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Got e[me[7m>e[m
Oct 11 06:26:51 stapp03.stratos.xfusioncorp.com httpd[4264]: AH00558: httpd: Coe[me[7m>e[m
Oct 11 06:26:51 stapp03.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Got e[me[7m>e[m
Oct 11 06:26:51 stapp03.stratos.xfusioncorp.com httpd[4264]: Server configured,e[me[7m>e[m
Oct 11 06:26:51 stapp03.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Got e[me[7m>e[m
Oct 11 06:26:51 stapp03.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Chane[me[7m>e[m
Oct 11 06:26:51 stapp03.stratos.xfusioncorp.com systemd[1]: e[0;38;5;245me[0;1;31me[0;38;5;245mhttpd.service: Job e[me[7m>e[m
Oct 11 06:26:51 stapp03.stratos.xfusioncorp.com systemd[1]: Started The Apache e[me[7m>e[m
Yes I have successfully build with the sudo command and also the echo command. Configuring the three servers and configuring one server at a time. It worked.
But the issue is the output shows only start and status for the first server .
Have you completed this task ?
@dpakmishra.1983 That is exactly what i document, the repo he send to you i am he one who manages it this one Day80 and i will also advice you to us ansible Enable passwordless sudo in all app servers
@rob_kodekloud@bansikah
I am still facing the same issue, although the manage-services job could start the apache services on stapp01 it is not able to start the same on the other servers.
When i configured stapp02 first and then stapp01 server in the manage-services job , it satrted the apache services on stapp02 but not on the other two.
@dpakmishra.1983 please delete your creds from here I won’t i advice thst instead we can have a call teams or zoom here is my email: [email protected] you can schedule a call please let’s do it