seanlook / sersync

Automatically exported from code.google.com/p/sersync
0 stars 0 forks source link

start fail #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
[root@centos5 sersync]# ll /Data/
total 24
drwxr-xr-x 5 root root 4096 Apr  9 11:23 apps
drwxr-xr-x 4 root root 4096 Apr  4 10:11 tgz
drwxr-xr-x 2 root root 4096 Apr  7 06:40 tmp
drwxr-xr-x 3 root root 4096 Apr  9 12:08 webapps
[root@centos5 sersync]# cat confxml.xml 
<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.2">
    <host hostip="192.168.1.45" port="8008"></host>
    <filter start="false">
        <exclude expression="(.*)\.gz"></exclude>
        <exclude expression="^info/*"></exclude>
    </filter>
    <sersync>
        <localpath watch="/Data/webapps" debug="false">
            <remote ip="192.168.1.44" name="webapps"/>
            <remote ip="192.168.1.24" name="webapps"/>
        </localpath>
        <rsyncauth start="false" users="www" 
passwordfile="/etc/rsync.pas"/>
        <crontab start="false" schedule="600">
            <crontabfilter start="false">
                <exclude expression="*.php"></exclude>
                <exclude expression="info/*"></exclude>
            </crontabfilter>
        </crontab>
    </sersync>
</head>
[root@centos5 sersync]# ./sersync2.4 
对系统参数进行配置
执行命令:echo 50000000 > /proc/sys/fs/inotify/max_user_watches
执行命令:echo 327679 > /proc/sys/fs/inotify/max_queued_events
解析命令行参数
同步守护线程数: 10
解析配置文件
当前主机ip为: 192.168.1.45      当前主机端口为8008
Segmentation fault
[root@centos5 sersync]# 

以下情况良好,是否必须存在plugin的字段?

[root@centos5 GNU-Linux-x86]# cat confxml.xml 
<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.2">
    <host hostip="192.168.1.45" port="8008"></host>
    <filter start="false">
        <exclude expression="(.*)\.gz"></exclude>
        <exclude expression="^info/*"></exclude>
    </filter>
    <sersync>
        <localpath watch="/Data/webapps" debug="false">
            <remote ip="192.168.1.44" name="webapps"/>
        </localpath>
        <rsyncauth start="false" users="www" 
passwordfile="/etc/rsync.pas"/>
        <crontab start="false" schedule="600">
            <crontabfilter start="false">
                <exclude expression="*.php"></exclude>
                <exclude expression="info/*"></exclude>
            </crontabfilter>
        </crontab>
        <plugin start="false" name="refreshCDN"/>
    </sersync>
</head>
[root@centos5 GNU-Linux-x86]# ./sersync2.4 
对系统参数进行配置
执行命令:echo 50000000 > /proc/sys/fs/inotify/max_user_watches
执行命令:echo 327679 > /proc/sys/fs/inotify/max_queued_events
解析命令行参数
同步守护线程数: 10
解析配置文件
当前主机ip为: 192.168.1.45      当前主机端口为8008
同步配置文件解析成功
建议手动修改/etc/rsyncd.conf中的max 
connections为0,取消最大连接限制
程序等待时线程数: 12  = 1(主线程) + 1(出错重传线程) + 
10(开启的同步守护线
程) 
请根据同步极限情况的CPU使用率,使用-n参数 进行调整
执行同步程序:
监控路径为:/Data/webapps

Original issue reported on code.google.com by hqlulu on 16 Apr 2010 at 2:38

GoogleCodeExporter commented 9 years ago
[root@centos5 GNU-Linux-x86]# diff confxml.xml ../../confxml.xml 
10a11
>           <remote ip="192.168.1.24" name="webapps"/>
19d19
<       <plugin start="false" name="refreshCDN"/>

Original comment by hqlulu on 16 Apr 2010 at 2:39

GoogleCodeExporter commented 9 years ago
配置文件加上 <plugin start="false" name="refreshCDN"/> 
可以正常启动,请问plugin是必须的?

Original comment by hqlulu on 16 Apr 2010 at 2:41

GoogleCodeExporter commented 9 years ago
plugin 不是必须的,如果把start设为false就不起作用

Original comment by zhouyang...@gmail.com on 16 Apr 2010 at 2:44

GoogleCodeExporter commented 9 years ago
遇上类似问题(Segmentation fault),无论是2.5最新的bin 
file,还是自己2.5 source编译的,又或者是2.4的bin 
file,在我的服务器上都是同样的错误。参考楼上同学将全部�
��掉的plugin加回来的方法也没用。

[root@local install]#  GNU-Linux-x86/sersync2.4 -r -o /etc/sersync.xml 
对系统参数进行配置
执行命令:echo 50000000 > /proc/sys/fs/inotify/max_user_watches
执行命令:echo 327679 > /proc/sys/fs/inotify/max_queued_events
解析命令行参数
选项: -r        在运行程序前对目标服务器统一推送一次
选项: -o        配置文件名为:  /etc/sersync.xml
同步守护线程数: 10
解析配置文件
当前主机ip为: localhost 当前主机端口为8008
开启crontab功能 每隔2880分钟整体同步一次
Segmentation fault

配置如下:
<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.5">
    <host hostip="localhost" port="8008"></host>
    <debug start="true"/>
    <fileSystem xfs="false"/>
    <filter start="false">
        <exclude expression="(.*)\.svn"></exclude>
        <exclude expression="(.*)\.gz"></exclude>
        <exclude expression="^info/*"></exclude>
        <exclude expression="^static/*"></exclude>
    </filter>
    <inotify>
        <delete start="true"/>
        <createFolder start="true"/>
        <createFile start="false"/>
        <closeWrite start="true"/>
        <moveFrom start="true"/>
        <moveTo start="true"/>
        <attrib start="false"/>
        <modify start="false"/>
    </inotify>

    <sersync>
        <localpath watch="/data/web/xxx.com">
            <remote ip="x.x.x.x" name="xxx"/>
        </localpath>
        <rsync>
            <commonParams params="-artuz"/>
            <auth start="false" users="root" passwordfile="/etc/rsync.pas"/>
            <userDefinedPort start="false" port="874"/><!-- port=874 -->
            <timeout start="false" time="100"/><!-- timeout=100 -->
            <ssh start="false"/>
        </rsync>
        <failLog path="/tmp/rsync_fail_log.sh" timeToExecute="60"/><!--default every 60mins execute once-->
        <crontab start="true" schedule="2880"><!--600mins-->
            <crontabfilter start="false">
                <exclude expression="*.php"></exclude>
                <exclude expression="info/*"></exclude>
            </crontabfilter>
        </crontab>
    </sersync>
    <plugin start="false" name="refreshCDN"/>
</head>

Original comment by mr.code...@gmail.com on 3 Sep 2011 at 10:40