db上的resin集群测试
2012-04-29
Connecting to 192.168.61.68:22...
Connection established.
Escape character is '^@]'.
Last login: Sun Apr 29 00:08:17 2012 from 192.168.34.66
[root@mp2 ~]# netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:45461 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1816 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:35355 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
[root@mp2 ~]# su - yangkai
[yangkai@mp2 ~]$ cd /home/yangkai/resin
[yangkai@mp2 resin]$ ls
admin bin conf ext-webapp-lib lib libexec64 log logs php plugins webapps
[yangkai@mp2 resin]$ cd conf/
[yangkai@mp2 conf]$ ls
app-default.xml resin1.conf resin.conf resin.conf.orig stopallre.sh webresin.conf
app-default.xml.orig resin2.conf resin.conf.bak startallre.sh webresin
[yangkai@mp2 conf]$ diff resin.conf resin1.conf
84c84
<
---
>
90c90
<
---
>
149c149
<
---
>
300c300
<
---
>
[yangkai@mp2 conf]$ diff resin1.conf resin2.conf
90c90
<
---
>
149c149
<
---
>
300c300
<
---
>
[yangkai@mp2 conf]$ ls
app-default.xml resin1.conf resin.conf resin.conf.orig stopallre.sh webresin.conf
app-default.xml.orig resin2.conf resin.conf.bak startallre.sh webresin
[yangkai@mp2 conf]$ cat startallre.sh
#!/bin/bash
/home/yangkai/resin/bin/httpd.sh -conf /home/yangkai/resin/conf/resin.conf -server yk start
/home/yangkai/resin/bin/httpd.sh -conf /home/yangkai/resin/conf/resin1.conf -server yk1 start
/home/yangkai/resin/bin/httpd.sh -conf /home/yangkai/resin/conf/resin2.conf -server yk2 start
[yangkai@mp2 conf]$ ./startallre.sh
Resin/3.1.10 started -server 'yk' for watchdog at 127.0.0.1:6600
Resin/3.1.10 started -server 'yk1' for watchdog at 127.0.0.1:6600
Resin/3.1.10 started -server 'yk2' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22337 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:62932 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23828 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 :::46659 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6600 :::* LISTEN
tcp 0 0 :::9453 :::* LISTEN
tcp 0 0 :::8080 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6800 :::* LISTEN
tcp 0 0 :::8081 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6801 :::* LISTEN
tcp 0 0 :::8082 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6802 :::* LISTEN
tcp 0 0 :::5013 :::* LISTEN
tcp 0 0 :::26549 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
[yangkai@mp2 conf]$
[yangkai@mp2 conf]$ echo "web is ok"
web is ok
[yangkai@mp2 conf]$ ./stopallre.sh
Resin/3.1.10 stopped -server 'yk' for watchdog at 127.0.0.1:6600
Resin/3.1.10 stopped -server 'yk1' for watchdog at 127.0.0.1:6600
Resin/3.1.10 stopped -server 'yk2' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ /home/yangkai/resin/bin/httpd.sh -conf /home/yangkai/resin/conf/resin.conf -server yk start
Resin/3.1.10 started -server 'yk' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ /home/yangkai/resin/bin/httpd.sh -conf /home/yangkai/resin/conf/resin.conf -server yk stop
Resin/3.1.10 stopped -server 'yk' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ echo "web 8080 is ok!"
-bash: !": event not found
[yangkai@mp2 conf]$ echo 'web 8080 is ok!'
web 8080 is ok!
[yangkai@mp2 conf]$ ./startallre.sh
Resin/3.1.10 started -server 'yk' for watchdog at 127.0.0.1:6600
Resin/3.1.10 started -server 'yk1' for watchdog at 127.0.0.1:6600
Resin/3.1.10 started -server 'yk2' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ /home/yangkai/resin/bin/httpd.sh -conf /home/yangkai/resin/conf/resin.conf -server yk stop
Resin/3.1.10 stopped -server 'yk' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ netstat -ntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:17696 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6600 :::* LISTEN
tcp 0 0 :::26830 :::* LISTEN
tcp 0 0 :::8081 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6801 :::* LISTEN
tcp 0 0 :::8082 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6802 :::* LISTEN
tcp 0 0 :::38901 :::* LISTEN
tcp 0 0 :::59829 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
[yangkai@mp2 conf]$ echo "8080 is close"
8080 is close
[yangkai@mp2 conf]$
[yangkai@mp2 conf]$ /home/yangkai/resin/bin/httpd.sh -conf /home/yangkai/resin/conf/resin1.conf -server yk1 stop
Resin/3.1.10 stopped -server 'yk1' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ echo "8081 is closed,and 8082 exist."
8081 is closed,and 8082 exist.
[yangkai@mp2 conf]$ /home/yangkai/resin/bin/httpd.sh -conf /home/yangkai/resin/conf/resin2.conf -server yk2 stop
Resin/3.1.10 stopped -server 'yk2' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23889 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
[yangkai@mp2 conf]$
-----------------------------------------------------------------------------------
当修改其中配置文件不对时,启动失败,然后启动单个服务就不行了,需要先重新启动全部的,或者重新关闭全部的,再进行启动。
操作为:cp resin1.conf resinduoxiangmu.conf;编辑resinduoxiangmu.conf,在define the servers in the cluter下,增加一行,为:
[yangkai@mp2 conf]$ ../bin/httpd.sh -conf ./resinduoxiangmu.conf -server yk1 start
Resin/3.1.10 started -server 'yk1' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:1603 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:11120 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
[yangkai@mp2 conf]$ ../bin/httpd.sh -conf ./resinduoxiangmu.conf -server yk11 start
Resin/3.1.10 started -server 'yk11' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ ../bin/httpd.sh -conf ./resinduoxiangmu.conf -server yk11 stop
Resin/3.1.10 can't stop -server 'yk11' for watchdog at 127.0.0.1:6600.
java.lang.IllegalStateException: Can't connect to ResinWatchdogManager.
java.net.ConnectException: Connection refused
[yangkai@mp2 conf]$ ../bin/httpd.sh -conf ./resinduoxiangmu.conf -server yk1 stop
Resin/3.1.10 can't stop -server 'yk1' for watchdog at 127.0.0.1:6600.
java.lang.IllegalStateException: Can't connect to ResinWatchdogManager.
java.net.ConnectException: Connection refused
[yangkai@mp2 conf]$ ../bin/httpd.sh -conf ./resin1.conf -server yk1 start
Resin/3.1.10 started -server 'yk1' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:20344 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:54525 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:52126 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
[yangkai@mp2 conf]$ ../bin/httpd.sh -conf ./resin.conf -server yk start
Resin/3.1.10 started -server 'yk' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ netstat -nt;
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.61.68:57692 192.168.61.69:1521 ESTABLISHED
tcp 0 0 192.168.61.68:57700 192.168.61.69:1521 ESTABLISHED
tcp 0 0 ::1:39917 ::1:64403 TIME_WAIT
tcp 0 0 ::1:3765 ::1:45343 TIME_WAIT
tcp 0 0 ::1:10565 ::1:6061 TIME_WAIT
tcp 0 0 ::1:56055 ::1:8731 TIME_WAIT
tcp 0 228 ::ffff:192.168.61.68:22 ::ffff:192.168.34.66:52761 ESTABLISHED
[yangkai@mp2 conf]$ netstat -ntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:20344 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:54525 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:52126 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
[yangkai@mp2 conf]$ ./startallre.sh
Resin/3.1.10 started -server 'yk' for watchdog at 127.0.0.1:6600
Resin/3.1.10 started -server 'yk1' for watchdog at 127.0.0.1:6600
Resin/3.1.10 started -server 'yk2' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:20344 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:54525 0.0.0.0:* LISTEN
tcp 0 0 :::50788 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6600 :::* LISTEN
tcp 0 0 :::8080 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6800 :::* LISTEN
tcp 0 0 :::8081 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6801 :::* LISTEN
tcp 0 0 :::8082 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:6802 :::* LISTEN
tcp 0 0 :::14388 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
tcp 0 0 :::33019 :::* LISTEN
tcp 0 0 :::18718 :::* LISTEN
[yangkai@mp2 conf]$ ./stopallre.sh
Resin/3.1.10 stopped -server 'yk' for watchdog at 127.0.0.1:6600
Resin/3.1.10 stopped -server 'yk1' for watchdog at 127.0.0.1:6600
Resin/3.1.10 stopped -server 'yk2' for watchdog at 127.0.0.1:6600
[yangkai@mp2 conf]$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:46373 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:14538 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:57903 0.0.0.0:* LISTEN
tcp 0 0 192.168.61.68:1521 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:60095 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
[yangkai@mp2 conf]$
----------------------------------------------------------------------------------