莫名其妙的文件删除

  今天晚上,用eclipse2.1更新白天在单位上做的文件时,突然发现少了很有几个文件,一看是分散的几个目录就有文件被自己删除了。时间大概是上午。

  我上午明明只是更新了几个文件没有删除任何文件,这是怎么一回事呢?搞不懂了。还不会用cvs的文件恢复,只得手工在learndiary.tigris.org上把在attic里的文件下载下来,拷入本地目录中。

3 thoughts on “莫名其妙的文件删除”

  1. 下面是cvs命令行提交代码的一个完整过程:

    F:\learndiary\old\web\disall>cvs -d :pserver:dashing_meng@cvs.tigris.org:/cvs commit -m "issue number:10" diary.jsp

    Checking in diary.jsp;

    /cvs/learndiary/old/web/disall/diary.jsp,v  <--  diary.jsp

    new revision: 1.4; previous revision: 1.3

    done

    cvs commit: reading from cvs.tigris.org: Connection reset by peer

    F:\learndiary\old\web\disall>

    查看我的命令行cvs版本信息如下:

    F:\learndiary\old\web\disall>cvs version

    Client: Concurrent Versions System (CVS) 1.11.17 (client)

    Server: Concurrent Versions System (scast-vc-1.5.6) (CVS) 1.11.1p1 (client/serve

    r)

    cvs version: reading from cvs.tigris.org: Connection reset by peer

    F:\learndiary\old\web\disall>

    我不知道这是不是跟我昨天的cvs文件被莫名其妙的删除有关?

    我上网查了一下,得到下列信息,它提示可能www.tigris.org的服务端有问题,这个问题必须反映一下:

    转自:http://lists.debian.org/debian-boot/2000/06/msg00133.html

    CVS update fails: Connection reset by peer

    --------------------------------------------------------------------------------

    To: debian-boot@lists.debian.org

    Subject: CVS update fails: Connection reset by peer

    From: Eric Hanchrow <offby1@blarg.net>

    Date: 10 Jun 2000 13:19:00 -0700

    Message-id: <87em65xpaj.fsf@potato.hanchrow.org>

    Sender: offby1@potato.hanchrow.org

    User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6

    --------------------------------------------------------------------------------

    For a few days now, I haven't been able to update my copy of the

    boot-floppies tree.  Here's what happens when I try:

        13:13:07 [boot-floppies]$ strace -e network cvs update

        socket(PF_UNIX, SOCK_STREAM, 0)         = 3

        connect(3, {sin_family=AF_UNIX, path="                                                                                       /var/run/.nscd_socket"}, 110) = -1 ECONNREFUSED (Connection refused)

        socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3

        socket(PF_UNIX, SOCK_STREAM, 0)         = 4

        connect(4, {sin_family=AF_UNIX, path="                                                                                       /var/run/.nscd_socket"}, 110) = -1 ECONNREFUSED (Connection refused)

        socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4

        connect(4, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("206.124.128.1")}}, 16) = 0

        send(4, "\254\334\1\0\0\1\0\0\0\0\0\0\3cvs\6debian\3org\0\0\1\0"..., 32, 0) = 32

        recvfrom(4, "\254\334\201\200\0\1\0\1\0\10\0\7\3cvs\6debian\3org\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("206.124.128.1")}}, [16]) = 351

        connect(3, {sin_family=AF_INET, sin_port=htons(2401), sin_addr=inet_addr("198.186.203.20")}}, 16) = 0

        send(3, "BEGIN AUTH REQUEST\n", 19, 0)  = 19

        send(3, "/cvs/debian-boot", 16, 0)      = 16

        send(3, "\n", 1, 0)                     = 1

        send(3, "anonymous", 9, 0)              = 9

        send(3, "\n", 1, 0)                     = 1

        send(3, "A", 1, 0)                      = 1

        send(3, "\n", 1, 0)                     = 1

        send(3, "END AUTH REQUEST\n", 17, 0)    = 17

        recv(3, 0xbffffadb, 1, 0)               = -1 ECONNRESET (Connection reset by peer)

        cvs [update aborted]: recv() from server cvs.debian.org: Connection reset by peer

    I don't know if this means that I'm not getting properly logged in, in

    which case perhaps I need to do `cvs login' again (although I've

    forgotten the password for anonymous access).  Or perhaps there's a

    problem with the CVS server.

    Any ideas?

    Thanks

    --

    PGP Fingerprint: 3E7B A3F3 96CA 8958 ACC5  C8BD 6337 0041 C01C 5276

    别人的回复:

    Re: CVS update fails: Connection reset by peer

    --------------------------------------------------------------------------------

    To: Eric Hanchrow <offby1@blarg.net>

    Subject: Re: CVS update fails: Connection reset by peer

    From: Adam Di Carlo <adam@onshore.com>

    Date: 25 Jun 2000 16:12:54 -0400

    Cc: debian-boot@lists.debian.org

    In-reply-to: Eric Hanchrow's message of "10 Jun 2000 13:19:00 -0700"

    Message-id: <oag0q14j09.fsf@arroz.fake>

    References: <87em65xpaj.fsf@potato.hanchrow.org>

    Sender: apharris@arroz.fake

    User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6

    --------------------------------------------------------------------------------

    Eric Hanchrow <offby1@blarg.net> writes:

    > For a few days now, I haven't been able to update my copy of the

    > boot-floppies tree.  Here's what happens when I try:

    Is this problem still happening?  It sounded like a cvs/pserver/nscd

    bad interaction, probably caused by the LDAP stuff being introduced?

    If we're still having this, we need to notify the sysadmin of

    va.debian.org; I don't have any sysadmin roles on that machine.

    --

    .....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/&gt;

  2. 不是服务器端的问题,我在家里的机器同样是cvs1.11.17命令行,今天晚上试验执行commit没有问题,如下:

    D:\learndiary\old\web\disall\disgoal>cvs -d :pserver:dashing_meng@cvs.tigris.org

    :/cvs commit -m "issue number:10" disGoalContent.jsp

    Checking in disGoalContent.jsp;

    /cvs/learndiary/old/web/disall/disgoal/disGoalContent.jsp,v  <--  disGoalContent

    .jsp

    new revision: 1.5; previous revision: 1.4

    done

    D:\learndiary\old\web\disall\disgoal>

    查看版本信息:

    D:\learndiary\old\web\disall\disgoal>cvs version

    Client: Concurrent Versions System (CVS) 1.11.17 (client)

    Server: Concurrent Versions System (scast-vc-1.5.6) (CVS) 1.11.1p1 (client/serve

    r)

    D:\learndiary\old\web\disall\disgoal>

    我想,可能是单位上的机器是通过局域网接入的,可能是电信在路由器上设了防火墙之类的东西吧。

    因为在网上查到这么一段:...而像 "connection reset by peer","received broken pipe signal", "recv() from server: EOF" 或 "end of file from server" 这种典型的问题,是因为 inetd 监听了连接但无法启动 cvs (常常因为 inetd.conf 使用了不正确的路径或防火墙阻止了连接)。"...

    全文如下:(转自:http://man.chinaunix.net/develop/cvsdoc_zh/Connection.html)

    F.2 连接 CVS 服务器的问题

    本节关注的是连接 cvs 服务器问题的解决方法。如果你在 Windows 上运行 cvs 命令行客户端,首先要更新客户端到 cvs 1.9.12 或之后的版本。较早版本的错误报告只能对问题提供很少的信息。如果客户端是在非 Windows 上,cvs 1.9 就可以。

    如果错误信息不足以追踪错误,下一步取决于你使用的访问方式。

    :ext:

    在命令行上运行 rsh 程序。例如: "rsh servername cvs -v" 会打印 cvs 的版本。 如果不能正常输出,在担忧 cvs 问题之前应先解决它。

    :server:

    使用这种访问方式不需要使用命令行的 rsh 程序,但如果你有 rsh 程序,它可以用作测试工具。见 :ext: 相关指引。

    :pserver:

    一般对于 "connection refused" 错误,是因为 inetd 没有监听 2401 端口。而像 "connection reset by peer","received broken pipe signal", "recv() from server: EOF" 或 "end of file from server" 这种典型的问题,是因为 inetd 监听了连接但无法启动 cvs (常常因为 inetd.conf 使用了不正确的路径或防火墙阻止了连接)。"unrecognized auth response" 错误是 inetd.conf 中错误的命令行造成,像无效的选项或忘记将 `pserver' 命令置于行末。另外一种可能的原因是编辑器添加了不可见的控制字符,而没有给出提示。

    一个很好用的调试工具是 "telnet servername 2401"。连接以后,发任意一个文本 (例如 "foo" 并回车)。如果 cvs 工作正常,将回显

              cvs [pserver aborted]: bad auth protocol start: foo

        

    如果是看到:

              Usage: cvs [cvs-options] command [command-options-and-arguments]

              ...

        

    那么应该是忘记在 inetd.conf 行末加上 `pserver' 命令; 检验一下,确保整个命令处于一行并且完整。

    同样,如果你得到:

              Unknown command: `pserved'

             

              CVS commands are:

                      add          Add a new file/directory to the repository

              ...

        

    也就是在某处拼写错了 `pserver'。如果不那么明显,检查一下 inetd.conf 里面的非显示控制字符(特别是回车)。

    如果完全不工作,那么先确保 inetd 可以正常使用。修改 inetd.conf,用 echo 替换里面的 cvs 调用。例如:

              2401  stream  tcp  nowait  root /bin/echo echo hello

        

    修改之后让 inetd 重新读取配置文件,"telnet servername 2401" 应该回显 hello,然后服务器关闭连接。如果也不工作,你应该在考虑 cvs 之前先解决这个问题。

    在 AIX 系统上,2401 端口会被系统自己的程序使用。这是 AIX 的问题,因为 2401 是 cvs 注册使用的端口。我听说有一个 AIX 补丁可以解决这个问题。

    另外一个很好的调试工具是在 inetd 上使用 `-d' (调试) 选项。研究一下系统文件掌握如何使用。

    如果好像已经连接,但得到如下的错误:

              cvs server: cannot open /root/.cvsignore: Permission denied

              cvs [server aborted]: can't chdir(/root): Permission denied

        

    那么你也许没有在 inetd.conf 里面指定 `-f'。(在 cvs 1.11.1 以前的发行版,这个问题是因为环境变量 $HOME 是由 inetd 运行的程序设置。这种情况下,你可以让 inetd 运行一个脚本,里面先 unset $HOME,再运行 cvs,或者使用 env 在原始环境下运行 cvs。)

    如果你开始可以成功连接,然后有不行了,可能是达到了 inetd 的限制。(如果 inetd 短期内同一个服务接收了过多的请求,它会认为出错,并暂时禁止服务。)查看一下 inetd 的文档,找到如果调节限制(有些版本的 inetd 只有一个限制可以调,另外的可以为每个服务单独设置。)

  3.   但是,上面的文件被莫名其妙的删除了是怎么一回事呢?难道真是我神经短路,在本地的几个文件夹里分别选了几个文件去删除吗?不可能吧?也许这还是一个问题?难道防火墙问题会大到自作主张的去删除服务器端的文件吗?我表示怀疑。

Comments are closed.