SyncY V2版更新(v2.1.0)

更新内容:

2015-01-16
v2.1.0
1、解决了线程数开多了后导致软件segmenation fault错误的bug。(在此感谢曾少同学的帮助才找出问题原因。
2、降低了内存占用,现在每多开一个线程内存占用只增加32K,v2.0.0版每线程增加2M左右。

采用CIFS共享文件系统的用户请注意:

如果你的设备挂载的是CIFS文件系统(不是对外提供samba服务的),如果安装的是luci版本,请下载SyncY-Python-v2.0.0.rar压缩包,并用syncy-cifs.py替换/usr/bin目录下的syncy.py文件;非luci的,只需要安装syncy-cifs.py程序文件,并重命名为syncy.py。

程序文件syncy.py和syncy-cifs.py只需要安装一个,如果不是使用的cifs共享文件系统的,推荐安装syncy.py,这个版本相比cifs版能减少对cpu的占用在10%左右(AR71XX CPU上8线程测试结果),如果syncy.py程序在你的设备上运行报错,错误代码为“IOError[Errno:5] input/output error”可用syncy-cifs.py替换/usr/bin目录下的syncy.py文件,并重命名为syncy.py。

下载地址:http://www.syncy.cn/index.php/download/

配置文件说明:http://www.syncy.cn/index.php/syncyconfighelp/

SyncY V2版更新(v2.1.0)》上有9条评论

  1. Metre

    2015-01-17 07:06:44 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 07:11:50 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 07:14:35 ERROR: Get pcs quota failed(error code:28),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 07:22:04 ERROR: Get pcs quota failed(error code:28),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 15:25:11 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 15:27:12 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 15:34:15 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 15:53:12 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 15:56:44 ERROR(6): Slice download file(/apps/SyncY/media/DEEPXTZJ_GHOST_XP_SP3_201311.iso) failed.
    2015-01-17 15:56:46 ERROR(6): Slice download file(/apps/SyncY/media/DEEPXTZJ_GHOST_XP_SP3_201311.iso) failed.
    2015-01-17 15:56:46 ERROR(6): Slice download file(/apps/SyncY/media/DEEPXTZJ_GHOST_XP_SP3_201311.iso) failed.
    2015-01-17 15:56:46 ERROR(28): Slice download file(/apps/SyncY/media/DEEPXTZJ_GHOST_XP_SP3_201311.iso) failed.
    2015-01-17 15:56:46 ERROR(6): Slice download file(/apps/SyncY/media/DEEPXTZJ_GHOST_XP_SP3_201311.iso) failed.
    2015-01-17 15:56:47 ERROR: Download file(/apps/SyncY/media/DEEPXTZJ_GHOST_XP_SP3_201311.iso) failed.
    2015-01-17 15:56:47 ERROR: Sync path: “/data/syncy/media:media:download” failed, 0 files success, 1 files failed, 0 errors occurred.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 15:57:27 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 17:16:15 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 17:22:00 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 17:34:08 ERROR: Get pcs quota failed(error code:6),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 17:50:22 ERROR: Get pcs quota failed(error code:28),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded
    2015-01-17 18:07:29 ERROR: Get pcs quota failed(error code:28),.
    Traceback (most recent call last):
    File “/usr/bin/syncy.py”, line 1701, in
    sy.start()
    File “/usr/bin/syncy.py”, line 1193, in start
    self.__start_sync()
    File “/usr/bin/syncy.py”, line 1063, in __start_sync
    self.__syncy_download(localpath, remotepath)
    File “/usr/bin/syncy.py”, line 745, in __syncy_download
    retcode, rfnlist = self.__get_pcs_filelist(rdir, startidx, SyncY.config[‘listnumber’])
    File “/usr/bin/syncy.py”, line 419, in __get_pcs_filelist
    rfnlist = json.loads(response_str)
    File “/usr/lib/python2.7/json/__init__.py”, line 326, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
    raise ValueError(“No JSON object could be decoded”)
    ValueError: No JSON object could be decoded

    /apps/SyncY/media/DEEPXTZJ_GHOST_XP_SP3_201311.iso 在云端 已经被我删除了

    回复
    1. WishInLife 文章作者

      看了下,错误代码基本是6和28,6表示无法解析服务器地址,28是操作超时,错误号6的最多,应该是你那dns有问题,检查下吧。
      其它的json错误是因为没有正确获取到信息,传入给json的对象有问题才报出来的。

      回复
      1. Metre

        嗯 我自己找到原因了 是因为 MWAN的原因 我的是并发多拨 有些网口不能拨号上去
        mwan的 默认规则 有一条 加密端口 443 走 单独wan口 但是这个wan口没有拨上
        就造成这样了

        另外感谢博主的积极维护 小捐20 不成敬意
        博主的更新和回复都很积极哦

        回复
      2. Metre

        另外 博主 自启动无法启动 报的也是这个错
        因为我的路由器是多拨脚本 路由器启动的时候并没有联网
        syncy 刚启动的时候需要联网下载这个json 由于没网 没有下载到就退出了吧

        为什么不等待有网的时候继续下载呢,,,,,

        回复
        1. WishInLife 文章作者

          谢谢支持!网络无法访问导致程序退出是有个小bug,这几天出差了,过两天我会发个更新的。

          回复
  2. zengge99

    感谢博主在qq上的耐心解答,并专门为我解决了cifs多线程问题。小捐50不成敬意。

    回复
  3. Tsai

    x86 Luci界面点击”启动”按钮后会产生一个 UNSAVED CHANGE
    内容为

    syncy.cfg023d1b
    syncy.cfg023d1b.helptext=同步目录设置:

    这个 option helptext 会写入到/etc/syncy

    使用SyncY-Python-luci_2.1.0-1_all.ipk安装。

    回复
    1. WishInLife 文章作者

      这个是在openwrt 14版有这个问题,出现这个点保存就可,多出来的选项不会对程序运行有什么影响的。

      回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注