Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1606672
  • 博文数量: 409
  • 博客积分: 6240
  • 博客等级: 准将
  • 技术积分: 4908
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-01 00:04
文章分类

全部博文(409)

文章存档

2021年(1)

2019年(1)

2017年(1)

2016年(13)

2015年(22)

2013年(4)

2012年(240)

2011年(127)

分类: LINUX

2012-04-29 15:06:02

db上的resin集群测试
                                                  2012-04-29

根据http://blog.chinaunix.net/space.php?uid=25892360&do=blog&id=3192597的配置方法,配置好了resin集群,再次进行测试一下。

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下,增加一行,为:

参照http://blog.chinaunix.net/uid-25892360-id-3192324.html,一个项目启动多个服务的配置方法,结果如下:

[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]$ 
----------------------------------------------------------------------------------
阅读(3742) | 评论(0) | 转发(0) |
0

上一篇:awk for与if

下一篇:xmanager 启动gnome

给主人留下些什么吧!~~