我已经使用here描述的方法在Azure Ubuntu16.04实例上安装了Apache2 / Subversion v1.9.3。
我已经在sites-available/[sitename].conf
中配置了SSL,并且能够使用Firefox和TortoiseSvn进行远程连接。
如果我在服务器的本地文件系统上创建一个repo,那么一切都可以正常工作--我可以使用TortoiseSvn将文件导入到repo中,而不会出现错误。
如果我将存储库替换为托管在Azure文件服务存储上的存储库,则使用:
sudo mount -t cifs //[].file.core.windows.net/svn /mnt/svn -o vers=3.0,username=[],password=[],dir_mode=0777,file_mode=0777,sec=ntlmssp,uid=www-data,gid=www-data
...Tortoise SVN报告post commit FS processing had error: Couldn't open rep-cache database
/var/log/apache/error.log
包含以下内容:
[Sat May 26 15:12:00.994705 2018] [:error] [pid 11577:tid 140074997974784] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] Couldn't open rep-cache database
[Sat May 26 15:12:00.994745 2018] [:error] [pid 11577:tid 140074997974784] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] -Couldn't perform atomic initialization
[Sat May 26 15:12:00.994749 2018] [:error] [pid 11577:tid 140074997974784] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] -sqlite[S5]: database is locked, executing statement 'CREATE TABLE rep_cache ( hash TEXT NOT NULL PRIMARY KEY, revision INTEGER NOT NULL, offset INTEGER NOT NULL, size INTEGER NOT NULL, expanded_size INTEGER NOT NULL ); PRAGMA USER_VERSION = 1; '
[Sat May 26 15:12:02.713630 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] Couldn't open rep-cache database
[Sat May 26 15:12:02.713658 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] -Couldn't perform atomic initialization
[Sat May 26 15:12:02.867911 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] Couldn't open rep-cache database
[Sat May 26 15:12:02.867922 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] -Couldn't perform atomic initialization
[Sat May 26 15:12:03.801075 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): commit of r1 succeeded, but an error occurred after the commit: 'post commit FS processing had error:\nCouldn't open rep-cache database'
This问题似乎解决了同样的问题,但是我不清楚是否可以修改Apache2中的模块加载顺序,因为模块配置是基于mods-enabled/*.load
的内容的。
对repo目录中的文件的权限似乎是reasonable...although,有相当多的文件大小为零:
-rwxrwxrwx 1 www-data www-data 2 May 26 15:12 current
-rwxrwxrwx 1 www-data www-data 41 May 26 15:08 format
-rwxrwxrwx 1 www-data www-data 10178 May 26 15:08 fsfs.conf
-rwxrwxrwx 1 www-data www-data 5 May 26 15:08 fs-type
-rwxrwxrwx 1 www-data www-data 2 May 26 15:08 min-unpacked-rev
-rwxrwxrwx 1 www-data www-data 0 May 26 15:11 rep-cache.db
-rwxrwxrwx 1 www-data www-data 0 May 26 15:12 rep-cache.db-journal
drwxrwxrwx 2 www-data www-data 0 May 26 15:08 revprops
drwxrwxrwx 2 www-data www-data 0 May 26 15:08 revs
drwxrwxrwx 2 www-data www-data 0 May 26 15:08 transactions
-rwxrwxrwx 1 www-data www-data 2 May 26 15:11 txn-current
-rwxrwxrwx 1 www-data www-data 0 May 26 15:08 txn-current-lock
drwxrwxrwx 2 www-data www-data 0 May 26 15:08 txn-protorevs
-rwxrwxrwx 1 www-data www-data 74 May 26 15:08 uuid
-rwxrwxrwx 1 www-data www-data 0 May 26 15:08 write-lock
但是,如果模块加载顺序有问题,我可以想象无论repo是在本地文件系统上还是在挂载的文件系统上都会出现问题。
这是在Azure中存储subversion存储库数据的正确方法吗?
任何关于如何更好地诊断/解决问题的见解或指导都是非常受欢迎的。
发布于 2018-05-27 03:11:06
更多的测试表明,这个问题与使用Azure文件服务存储subversion存储库数据有关。
setup中的一个过程是创建存储库:
sudo svnadmin create /path/to/repo
sudo chown -R www-data:www-data /path/to/repo
sudo chmod -R g+ws /path/to/repo
在本地(ext4?)上执行此操作时驱动器中,db
目录如下所示:
-rw-rwSr-- 1 www-data www-data 2 May 26 18:56 current
-r--rwSr-- 1 www-data www-data 41 May 26 18:54 format
-rw-rwSr-- 1 www-data www-data 10178 May 26 18:54 fsfs.conf
-rw-rwSr-- 1 www-data www-data 5 May 26 18:54 fs-type
-rw-rwSr-- 1 www-data www-data 2 May 26 18:54 min-unpacked-rev
-rw-rwSr-- 1 www-data www-data 3072 May 26 18:56 rep-cache.db
-rw-rw-r-- 1 www-data www-data 0 May 26 18:56 rep-cache.db-journal
drwxrwsr-x 3 www-data www-data 4096 May 26 18:54 revprops
drwxrwsr-x 3 www-data www-data 4096 May 26 18:54 revs
drwxrwsr-x 2 www-data www-data 4096 May 26 18:56 transactions
-rw-rwSr-- 1 www-data www-data 2 May 26 18:56 txn-current
-rw-rwSr-- 1 www-data www-data 0 May 26 18:54 txn-current-lock
drwxrwsr-x 2 www-data www-data 4096 May 26 18:56 txn-protorevs
-rw-rwSr-- 1 www-data www-data 74 May 26 18:54 uuid
-rw-rwSr-- 1 www-data www-data 0 May 26 18:54 write-lock
带有s/S标志的...which与Azure文件服务上的目录内容不同(如问题所示)。不是Linux专家,我假设它们是features not supported by the Azure file service。
因此,我的解决方案是先create and attach a data disk to the VM,然后再partition, format and mount磁盘。然后,可以像上面那样创建存储库,并且一切都按其应有的方式工作。
发布于 2019-04-16 02:39:41
这是sqlite DB的一个限制。随着repo大小的增长,您会看到这一点。我通过将我的svn存储库划分为更小的块来修复它。
https://stackoverflow.com/questions/50544663
复制相似问题