forked from gangireddydanam/saggiapps
-
Notifications
You must be signed in to change notification settings - Fork 1
/
saggi-tomcat
772 lines (451 loc) · 18.5 KB
/
saggi-tomcat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
JAVA----->Runtime environment---->Container---->
Servelet Container
Ejb Container
Portlet Container
WAR-- web archive
JAR- JAVA--- combo of java classes
EAR-- Enterprise archive
Apache Tomcat--- Servelet Container--No EJB--- Web server/JAVA based web server---- WAR files(JAR)--No EAR
Weblogic/Websphere/Jboss/Glashfish--- Application SErvers(100% containers)---WAR/EAR(JAR)
Installation-Pre-req(dependencies)
Configuration
stop/start
Log files
customze
deployment
upgradation
yum install httpd------>
What is diff b/w rpm and yum ?
what is bind exception ?
ApacheTomcat
Vendor: ASF
Version: 9.x (8/7/6)
Protocals: http/https/ajp
port: http=8080 , https=8443,ajp=8009
Instalaltion OS: All OS
Types: msi/exe installaer----Windows
unix-- yum ,zip,rpm-----------prefered one is zip
Pre-req- java(jdk/jre)---jre---->jdk---
installation - yum (apt-get), rpm, zip --unix--
exe - windows
Type: Webconainer/Servlet Container
imp-cfg - file ---server.xml
apache tomcat
htdocs---webapps
httpd.conf tomcathome/conf/server.xml(8080/8009/8443)
<tomcathome>/bin/startup.sh
<tomcathome>/bin/shutdown.sh
Log: logs/catalina.out
/opt and /usr
/tomcat
java -version---SUN java-- oracle
Sun java
oracle - oracle java ( weblogic- jrocket)
ibm - ibm java ( all ibm prod)
mac -- apple java
redhat - openjdk
WAR- Filel - Building/EAR- file/ JAR
======================================
github---->source code---->build the code----->WAR/EAR/JAR/tgz/tar/zip----->Deployment
sprint-->helloworld--->10 pages
continuisoly develop---save--->1 page---->code repo---->build war ----->first.war--->artifacts/delivery/target---->repo--->nexus/jfrog
continuisoly develop---save--->2 page---->code repo---->build war ----->second.war--->artifacts/delivery/target---->repo--->nexus/jfrog
http://<nexusurl/first.war
build--->ant/maven/graddle
code repo---->2 pages---->
git hub --->pull---->2 pages---->3----->build war---->
EAR=WAR+JAR(ejb)
WAR=web.xml----servlet container--web container
EAR=applicaion.xml
test.jar=ejb.xml--->ejb container
ANT---build tool--->WAR/EAR/JAR/other archive(zip/tar..etc)
targets/dependency target
project name
default target
ant init
ant war
ant -->default target
=================================================================================================
JDK/JRE-->rpm
Tomcat--zip
ec2-user --->sudo su -- root
sudo useraddd awsadmin
jdk download -->rpm
own ami--
[root@ip-172-31-13-17 ~]# yum remove^C
[root@ip-172-31-13-17 ~]# which java
/usr/bin/java
[root@ip-172-31-13-17 ~]# ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan 30 22:43 /usr/bin/java -> /etc/alternatives/java
[root@ip-172-31-13-17 ~]# ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Jan 30 22:43 /etc/alternatives/java -> /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
[root@ip-172-31-13-17 ~]# ls -l /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
-rwxr-xr-x 1 root root 5464 Dec 19 23:58 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
[root@ip-172-31-13-17 ~]#
rpm -ivh /tmp/jdk-7u80-linux-x64.rpm
root@ip-172-31-13-17 java]# pwd
/usr/java
[root@ip-172-31-13-17 java]#
1 useradd awsadmin
2 passwd awsadmin
3 ls -ltr
4 java
5 clear
6 java -version
7 which java
8 ls -l /usr/bin/java
9 ls -l /etc/alternatives/java
10 ls -l /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
11 yum remove jdk*
12 rpm -qa *
13 rpm -qa * | grep -i java
14 java -version
15 rpm -e
16 rpm -e java-1.7.0-openjdk-1.7.0.161-2.6.12.0.75.amzn1.x86_64
17 uanme
18 uname
19 java
20 exit
21 ls -ltr
22 ls -ltr /tmp/
23 rpm -ivh /tmp/jdk-7u80-linux-x64.rpm
24 cd /usr/java/
25 ls -ltr
26 date
27 java --version
28 java -version
29 pwd
30 ls -ltr
31 pwd
32 cd /tmp/
33 ls -ltr
34 man unzipi
35 man unzip
36 unzip apache-tomcat-7.0.84.zip -d /opt
37 ls -ltr
38 history
[root@ip-172-31-13-17 bin]# pwd
/usr/java/jdk1.7.0_80/bin
[root@ip-172-31-13-17 bin]# ./java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
[root@ip-172-31-13-17 bin]# pwd
/usr/java/jdk1.7.0_80/bin
[root@ip-172-31-13-17 bin]#
[root@ip-172-31-13-17 bin]# pwd
/opt/apache-tomcat-7.0.84/bin
[root@ip-172-31-13-17 bin]# cat setenv.sh
export JAVA_HOME=/usr/java/jdk1.7.0_80
[root@ip-172-31-13-17 bin]# cat setenv.sh
export JAVA_HOME=/usr/java/jdk1.7.0_80
[root@ip-172-31-13-17 bin]# ./startup.sh
Using CATALINA_BASE: /opt/apache-tomcat-7.0.84
Using CATALINA_HOME: /opt/apache-tomcat-7.0.84
Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.84/temp
Using JRE_HOME: /usr/java/jdk1.7.0_80
Using CLASSPATH: /opt/apache-tomcat-7.0.84/bin/bootstrap.jar:/opt/apache-tomcat-7.0.84/bin/tomcat-juli.jar
Tomcat started.
[root@ip-172-31-13-17 bin]#
#!/bin/bash
tomcathome=/opt/apache-tomcat-7.0.84
deployPath=$tomcathome/webapps
$tomcathome/bin/shutdown.sh
mkdir /opt/packages
cd /opt/packages
wget http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/10g/r3/cluster/session_state/files/shoppingcart.zip
unzip shoppingcart.zip
cp shoppingcart.war $deployPath
$tomcathome/bin/startup.sh
ps -ef | grep tomcat
echo "tomcat deployment done and started"
#!/bin/bash
tomcathome=/opt/apache-tomcat-7.0.84
deployPath=$tomcathome/webapps
$tomcathome/bin/shutdown.sh
rm -rf $tomcathome/webapps/*
rm -rf /opt/packages/*
$tomcathome/bin/startup.sh
ps -ef | grep tomcat
echo "tomcat deployment done and started"
=====================================================
#!/bin/bash
yum install bind-utils nc telent wget unzip -y
aws-cli.sh
#!/bin/bash
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
tomcat-setup
ec2
JAVA-- Installation ---->oracle ----cred->internet
apachetomcat--->Aapahe tomcat site-->internet
setenv.sh--->export JAVA_HOME
start--->
github-structure
#!/bin/bash
tempfile=tomcat-setup
mkdir /opt/softwares
cd /opt/softwares
aws s3 cp s3://petclinic-uat-deployment-files/jdk-7u80-linux-x64.rpm .
rpm -ivh jdk-7u80-linux-x64.rpm
sleep 5
aws s3 cp s3://petclinic-uat-deployment-files/apache-tomcat-7.0.84.zip .
unzip apache-tomcat-7.0.84.zip -c /opt/
chmod -R 700 /opt/apache-tomcat-7*
rm -rf /opt/apache-tomcat-7*/webapps/*
cd /opt/apache-tomcat-7*/bin/
./startup.sh
cd /opt/softwares
wget http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/10g/r3/cluster/session_state/files/shoppingcart.zip
unzip shoppingcart.zip
cp shoppingcart.war /opt/apache-tomcat-7*/webapps/
ps -ef | grep tomcat >>$tempfile
ls -ltr /opt/apache-tomcat-7*/webapps/ >>$tempfile
status(){
pid=$(tomcat_pid)
if [ -n "$pid" ]
then echo -e "\e[00;32mTomcat is running with pid: $pid\e[00m"
else
echo -e "\e[00;31mTomcat is not running\e[00m"
return 3
fi
}
tomcat_pid() {
echo `ps -fe | grep /opt/tomcat_latest | grep -v grep | tr -s " "|cut -d" " -f2`
}
#!/bin/bash
tempfile=tomcat-setup
spath=/opt/softwares
e=echo
check directory exist or not------------>condition---if
if [ -d $spath ]; then
echo "$spath exists"
else
mkdir $spath
fi
#Downloading s3 content- jdk
$e "i am downloading softwares from s3 bucket"
if
aws s3 cp s3://petclinic-uat-deployment-files/jdk-7u80-linux-x64.rpm $spath
rpm -ivh jdk-7u80-linux-x64.rpm
sleep 5
$e "i am downloading softwares from s3 bucket"
aws s3 cp s3://petclinic-uat-deployment-files/apache-tomcat-7.0.84.zip $spath
unzip apache-tomcat-7.0.84.zip -c /opt/
chmod -R 700 /opt/apache-tomcat-7*
rm -rf /opt/apache-tomcat-7*/webapps/*
cd /opt/apache-tomcat-7*/bin/
./startup.sh
cd /opt/softwares
wget http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/10g/r3/cluster/session_state/files/shoppingcart.zip
unzip shoppingcart.zip
cp shoppingcart.war /opt/apache-tomcat-7*/webapps/
ps -ef | grep tomcat >>$tempfile
ls -ltr /opt/apache-tomcat-7*/webapps/ >>$tempfile
echo $?
======================================================
#!/bin/sh
cp home/testing/present.txt home/testing/future.txt
echo "Copy Code: $? - Successful"
if [ $? != 0 ]; then
echo "Copy Code: $? - Unsuccessful"
else
echo "Copy Code: $? - successful"
fi
========================================================
if [ -d "$LINK_OR_DIR" ]; then
if [ -L "$LINK_OR_DIR" ]; then
# It is a symlink!
# Symbolic link specific commands go here.
rm "$LINK_OR_DIR"
else
# It's a directory!
# Directory command goes here.
rmdir "$LINK_OR_DIR"
fi
fi
===================================================
-e: any kind of archive
-f: file
-h: symbolic link
-r: readable file
-w: writable file
-x: executable file
-s: file size greater than zero
==================================================
QAL
===========
jenkins
tomcat-2-8080,8180
tomcat-2-8080,8180
S3 {env}-petclinic-app
iamrole=
awsadmin=sudoer,direct login
/opt/automation/scripts/tomcat_installtion.sh ,{env}_tomcat.sh--->tomcat_pid--->ps -ef | grep -w {$CATALINA_BASE}
Pre-Prod
============
tomcat-2-8080,8180
tomcat-2-8080,8180
S3
awsadmin=sudoer,direct login ,
/opt/tomcat_latest
/opt/tomcat_latest2
/opt/automation/scripts/tomcat_installtion.sh ,{env}_tomcat.sh
Prod
===============
tomcat-2-8080,8180
tomcat-2-8080,8180
s3 {env}-petclinic-app
awsadmin=sudoer,direct login
/opt/tomcat_latest
/opt/tomcat_latest2
/opt/automation/scripts/tomcat_installtion.sh ,{env}_tomcat.sh
tomcat_latest2
ps -ef | grep -w "tomcat_latest2" -->"tomcat_latest
ip:8080/yourapp
ip:8080/yourapp
client---->apache/nginix/webserver--------------->Tomcat/weblogic/jboss/websphere---->DB
client---->load balancer--->2(apache)(auto scaling)---------->multi(app server)
client---Route53/DNS->load balancer--->2(apache)(auto scaling)------load balancer---->multi(app server)(auto scaling)--->DB
client--->80/443------>lb--->80/443--->apache--->80/443--->lb--->8080(tomcat)
integration(Aapche and Tomcat)- Proxy
NameVirtualHost *:80
<VirtualHost *:80>
ServerName saggi.awsmiddleware.in
DocumentRoot "/opt/website"
DirectoryIndex index.html
ErrorLog "/opt/logs/apache/error_log"
CustomLog "/opt/logs/apache/access_log" common
<Directory "/opt/website">
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName saggi1.awsmiddleware.in
DocumentRoot "/opt/website1"
DirectoryIndex index.html
ErrorLog "/opt/logs/apache1/error_log"
CustomLog "/opt/logs/apache1/access_log" common
<Directory "/opt/website1">
Allow from all
</Directory>
</VirtualHost>
saggi.awsmiddleware.in/shoppingcart
<VirtualHost *:80>
ServerName saggi.awsmiddleware.in
ErrorLog "/opt/logs/apache/error_log"
CustomLog "/opt/logs/apache/access_log" common
ProxyPass /jenkins http://172.31.83.27:8080/jenkins
ProxyPassReverse /jenkins http://172.31.83.27:8080/jenkins
</VirtualHost>
protocal://<hostname>:<port>/contxt
<VirtualHost *:80>
ServerName saggi.awsmiddleware.in
ErrorLog "/opt/logs/apache/error_log"
CustomLog "/opt/logs/apache/access_log" common
ProxyPass /shoppingcart balancer://a
ProxyPassReverse /shoppingcart balancer://a
<balancer member=a>
Member1 http://tomcat1:8080/shoppingcart
Member2 http://tomcat2:8080/shoppingcart
</balancer>
</VirtualHost>
client---->apache---->tomcat--->DB
http://54.175.214.208:8080/jenkins/login?from=%2Fjenkins
http://54.175.214.208/jenkins/login?from=%2Fjenkins
<VirtualHost *:80>
ServerName saggi.awsmiddleware.in
ProxyPass /jenkins http://localhost:8080/jenkins
ProxyPassReverse /jenkins http://localhost:8080/jenkins
</VirtualHost>
========================================================
<VirtualHost *:80>
ServerName jenkins.awsmiddleware.in
ProxyPass /jenkins http://localhost:8080/jenkins
ProxyPassReverse /jenkins http://localhost:8080/jenkins
</VirtualHost>
<VirtualHost *:80>
ServerName shop.awsmiddleware.in
ProxyPass /shoppingcart http://tomcat1:8080/shoppingcart
ProxyPassReverse /shoppingcart http://tomcat1:8080/shoppingcart
</VirtualHost>
/etc/httpd/logs/error.log
[Wed Feb 07 02:04:39.696178 2018] [mpm_prefork:notice] [pid 29086] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) configured -- resuming normal operations
[Wed Feb 07 02:04:39.696200 2018] [core:notice] [pid 29086] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Feb 07 02:10:47.315926 2018] [mpm_prefork:notice] [pid 29086] AH00170: caught SIGWINCH, shutting down gracefully
(13)Permission denied: AH00091: httpd: could not open error log file /opt/logs/apache/error_log.
AH00015: Unable to open logs
(13)Permission denied: AH00091: httpd: could not open error log file /opt/logs/apache/error_log.
AH00015: Unable to open logs
[Wed Feb 07 02:18:08.991888 2018] [core:notice] [pid 30080] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Feb 07 02:18:08.992734 2018] [suexec:notice] [pid 30080] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Feb 07 02:18:09.003053 2018] [auth_digest:notice] [pid 30080] AH01757: generating secret for digest authentication ...
[Wed Feb 07 02:18:09.003625 2018] [lbmethod_heartbeat:notice] [pid 30080] AH02282: No slotmem from mod_heartmonitor
[Wed Feb 07 02:18:09.005820 2018] [mpm_prefork:notice] [pid 30080] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) configured -- resuming normal operations
[Wed Feb 07 02:18:09.005846 2018] [core:notice] [pid 30080] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Feb 07 02:18:47.805096 2018] [proxy:error] [pid 30083] (13)Permission denied: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[Wed Feb 07 02:18:47.805145 2018] [proxy:error] [pid 30083] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Wed Feb 07 02:18:47.805156 2018] [proxy_http:error] [pid 30083] [client 49.205.223.43:5807] AH01114: HTTP: failed to make connection to backend: localhost
^C
SELinux:-
=============
[root@ip-172-31-83-27 logs]# getenforce
Enforcing
[root@ip-172-31-83-27 logs]# setenforce 0
[root@ip-172-31-83-27 logs]# getenforce
Permissive
[root@ip-172-31-83-27 logs]#
/etc/selenux/
client--->aws.awsmiddleware.in---->ec2(apache)------------->ec2(shoppincart)
webservertest-1730914367.us-east-1.elb.amazonaws.com/shoppingcart--->80--->webserver---->tomcat1
<VirtualHost *:80>
ServerName shop.awsmiddleware.in
ProxyPass /shoppingcart balancer://mycluster/
ProxyPassReverse /shoppingcart balancer://mycluster/
<Proxy balancer://mycluster>
BalancerMember http://tomcat1:8080/shoppingcart
BalancerMember http://tomcat2:8080/shoppingcart
</Proxy>
</VirtualHost>
lbmethod_heartbeat:notice] [pid 1262] AH02282: No slotmem from mod_heartmonitor
[Wed Feb 07 03:01:35.891147 2018] [mpm_prefork:notice] [pid 1262] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) configured -- resuming normal operations
[Wed Feb 07 03:01:35.891169 2018] [core:notice] [pid 1262] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Feb 07 03:01:59.794586 2018] [proxy:error] [pid 1266] (13)Permission denied: AH00957: HTTP: attempt to connect to 172.31.80.255:8080 (tomcat1) failed
[Wed Feb 07 03:01:59.794635 2018] [proxy:error] [pid 1266] AH00959: ap_proxy_connect_backend disabling worker for (tomcat1) for 60s
[Wed Feb 07 03:01:59.794646 2018] [proxy_http:error] [pid 1266] [client 49.205.223.43:6791] AH01114: HTTP: failed to make connection to backend: tomcat1
[Wed Feb 07 03:01:59.794759 2018] [proxy:error] [pid 1266] (13)Permission denied: AH00957: HTTP: attempt to connect to 172.31.95.60:8080 (tomcat2) failed
[Wed Feb 07 03:01:59.794766 2018] [proxy:error] [pid 1266] AH00959: ap_proxy_connect_backend disabling worker for (tomcat2) for 60s
[Wed Feb 07 03:01:59.794769 2018] [proxy_http:error] [pid 1266] [client 49.205.223.43:6791] AH01114: HTTP: failed to make connection to backend: tomcat2
[Wed Feb 07 03:02:02.737638 2018] [proxy:error] [pid 1274] (13)Permission denied: AH00957: HTTP: attempt to connect to 172.31.95.60:8080 (tomcat2) failed
[Wed Feb 07 03:02:02.737697 2018] [proxy:error] [pid 1274] AH00959: ap_proxy_connect_backend disabling worker for (tomcat2) for 60s
[Wed Feb 07 03:02:02.737708 2018] [proxy_http:error] [pid 1274] [client 49.205.223.43:6793] AH01114: HTTP: failed to make connection to backend: tomcat2
[Wed Feb 07 03:02:02.737808 2018] [proxy:error] [pid 1274] (13)Permission denied: AH00957: HTTP: attempt to connect to 172.31.80.255:8080 (tomcat1) failed
[Wed Feb 07 03:02:02.737816 2018] [proxy:error] [pid 1274] AH00959: ap_proxy_connect_backend disabling worker for (tomcat1) for 60s
[Wed Feb 07 03:02:02.737818 2018] [proxy_http:error] [pid 1274] [client 49.205.223.43:6793] AH01114: HTTP: failed to make connection to backend: tomcat1
[Wed Feb 07 03:02:49.208619 2018] [proxy:error] [pid 1267] (13)Permission denied: AH00957: HTTP: attempt to connect to 172.31.80.255:8080 (tomcat1) failed
[Wed Feb 07 03:02:49.208660 2018] [proxy:error] [pid 1267] AH00959: ap_proxy_connect_backend disabling worker for (tomcat1) for 60s
[Wed Feb 07 03:02:49.208671 2018] [proxy_http:error] [pid 1267] [client 49.205.223.43:6813] AH01114: HTTP: failed to make connection to backend: tomcat1
[Wed Feb 07 03:02:49.208763 2018] [proxy:error] [pid 1267] (13)Permission denied: AH00957: HTTP: attempt to connect to 172.31.95.60:8080 (tomcat2) failed
[Wed Feb 07 03:02:49.208771 2018] [proxy:error] [pid 1267] AH00959: ap_proxy_connect_backend disabling worker for (tomcat2) for 60s
[Wed Feb 07 03:02:49.208773 2018] [proxy_http:error] [pid 1267] [client 49.205.223.43:6813] AH01114: HTTP: failed to make connection to backend: tomcat2
[root@ip-172-31-83-27 logs]#
elb--->ec2 machines
shop.awsmiddleware.in---->elb---->webserver(2)----------------->alb----targe group----->tomcat(2)
alb---->target group---->instances
apache2tomcat-901398274.us-east-1.elb.amazonaws.com
<VirtualHost *:80>
ServerName shop.awsmiddleware.in
ProxyPass /shoppingcart balancer://mycluster/
ProxyPassReverse /shoppingcart balancer://mycluster/
<Proxy balancer://mycluster>
BalancerMember http://apache2tomcat-901398274.us-east-1.elb.amazonaws.com:8080/shoppingcart
BalancerMember http://apache2tomcat-901398274.us-east-1.elb.amazonaws.com:8080/shoppingcart
</Proxy>
</VirtualHost>
1)single vh(localhost) ( jenkins)--->webserver-ip/jenkins--->http.conf.jenkins
2)shoppingcart vh(tomcat1)--->webserver/shoppingcart-->httpd.conf.tomcat1
3)shoppingcart vh--->balancer--->stopped tomcat1/tomcat2--->
elb/shoppingcart-->webserver-->access the page--->success
alb
devopsmachine(all my tools-- puppet/ansbile/jenkins/shell/package)