finalshell日志乱码问题_使用SVN时遇到的一些问题

这篇博客记录了在使用SVN过程中遇到的问题,包括版本兼容错误、Dav请求失败、SELinux导致的错误、实时同步问题以及日志文件出现的错误。解决方案涉及到创建 dav 目录、设置 pre-revprop-change 钩子、调整SELinux策略以及修复 SVN 仓库中的文件错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

b91a000cfc4757415690c40a2b28b433.png

记录一些 SVN 使用过程中遇到的问题。

问题集

  1. Can't open activity db: No such file or directory
    这个是因为版本兼容引起的问题。svnadmin create一个新的repo时,没有在repo相应的目录下建立一个"dav"目录。只需要在对应repo目录上建立一个"dav"目录,并修改一下权限就可以。
svnadmin create devops
mkdir -p devops/dav
chown -R apache:apache devops
  1. 利用svnsync建立SVN仓库镜像时:"svnsync: DAV request failed; it's possible that the repository's pre-revprop-change hook either failed or isnon-existent"
    要求源仓库和镜像仓库中都必须有"pre-revprop-change"才算合格。
  2. "Could not open the requested SVN filesystem, errcode="13""
    这个问题可能是由于SELinux所引起的,按照/etc/httpd/conf.d/subversion.conf中的说明操作可以避免。chcon -R -t httpd_sys_content_t repos
  3. 在SVN仓库中设定勾子进行SVN实时同步时发生错误:"svnsync: OPTIONS of .... could not connect to server"。
    在某个仓库的勾子"post-commit"中添加svnsync sync http://url/bak/ repo当进行checkin时,主仓库和镜像仓库会自动同步,但出现了上面的错误。引起这个问题同样是因为SELinux。查看日志文件"/var/log/audit/audit.log",你会看到:log type=AVC msg=audit(1379518173.188:94): avc: denied { name_connect } for pid=1498 comm="svnsync" dest=80 scontext=unconfined_u:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket
    通过使用SELinux相关工具(audit2why)可以找到解决方案:bash setsebool -P allow_ypbind 1 setsebool -P httpd_can_network_connect 1
    需要进行一步学习关于SELinux管理的知识,audit2why属于包setroubleshoot
  4. 问题描述:
  • 客户端取SVN时指示Cannot open the request svn filesystem(记不很清),errcode=70014
  • 检查http日志发现:access_log中相应的请求都是返回500;error_log中提示"(20014)Internal error ... End of file found""Could not fetch resource information. [500, #0] Could not open therequested SVN filesystem [500, #70014]"

解决:google后发现,是因为相应仓库下的文件db/currentdbtxn-current被坏所引起的。[^2]db/current存放的是当前修订号;db/txn-current应该是存放提交次数之类的数据,此文件为空时,客户端可以正常获取SVN,但提交时会提示 ../db/txn-current end of file 之类的错误。只需要向其中输入一个换行符(echo > db/txn-current)就能解决此问题。

  1. 命令svn info可以正常执行,但是执行svn up时得到错误:svn: XML data was not well-formed
    subversion 1.8时:svn info可以正常运行,svn up得到错误:Updating '.': svn: E175004: The PROPFIND response did not include the requested properties
    原因:在OS X上使用svn时会提示key的解密,奇怪的行为。(用户由管理员降为普通用户,删除过.subversion,移除过.ssh均未奏效)
  2. 在Linux下利用crontab定期更新一个SVN仓库时出错:text svn: Can't convert string from 'UTF-8' to native encoding: svn: /home/artsvn/trunk/icloud/D.?233?129?147?229?133?183
    由于中文引起的乱码问题,在crontab中可以设置环境变量LANG=zh_CN.UTF-8, LC_ALL=zh_CN.UTF-8就可以了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值