View previous topic :: View next topic |
Author |
Message |
Shamus397 Apprentice
Joined: 03 Apr 2005 Posts: 218 Location: Ur-th
|
Posted: Mon Dec 19, 2005 12:06 am Post subject: Problem checking out Subversion repo using httpd [SOLVED] |
|
|
Ok, I've looked and looked but can't seem to find any info on this, at least as it refers to my setup. I set up a subversion repository on my server, created a repository and all is well. I set it up first to allow access via the svn+ssh:// protocol and that worked fine (for the most part) but I wanted to set it up to be able to access it through https://.
I went through configuring apache2 and it works somewhat. I can pull up the repository through a browser (and it properly validates me, I can pull down individual files, etc) but I can't use svn on the command line to checkout a copy. Here's the error from the ssl_error_log:
Code: | [Sun Dec 18 15:16:10 2005] [error] [client 192.168.0.2] The state report gatherer could not be created. [500, #20014]
[Sun Dec 18 15:16:10 2005] [error] [client 192.168.0.2] Can't find a temporary directory [500, #20014] |
Here's the request from ssl_access_log:
Code: | 192.168.0.2 - shamus [18/Dec/2005:15:16:07 -0800] "PROPFIND /svn/repo HTTP/1.1" 207 645
192.168.0.2 - shamus [18/Dec/2005:15:16:08 -0800] "PROPFIND /svn/repo/!svn/vcc/default HTTP/1.1" 207 396
192.168.0.2 - shamus [18/Dec/2005:15:16:08 -0800] "PROPFIND /svn/repo/!svn/bln/1 HTTP/1.1" 207 447
192.168.0.2 - shamus [18/Dec/2005:15:16:08 -0800] "PROPFIND /svn/repo HTTP/1.1" 207 645
192.168.0.2 - shamus [18/Dec/2005:15:16:08 -0800] "PROPFIND /svn/repo/!svn/vcc/default HTTP/1.1" 207 447
192.168.0.2 - shamus [18/Dec/2005:15:16:08 -0800] "PROPFIND /svn/repo/!svn/bc/1 HTTP/1.1" 207 655
192.168.0.2 - shamus [18/Dec/2005:15:16:08 -0800] "PROPFIND /svn/repo HTTP/1.1" 207 645
192.168.0.2 - - [18/Dec/2005:15:16:10 -0800] "PROPFIND /svn/repo HTTP/1.1" 401 401
192.168.0.2 - shamus [18/Dec/2005:15:16:10 -0800] "PROPFIND /svn/repo HTTP/1.1" 207 645
192.168.0.2 - shamus [18/Dec/2005:15:16:10 -0800] "PROPFIND /svn/repo/!svn/vcc/default HTTP/1.1" 207 396
192.168.0.2 - shamus [18/Dec/2005:15:16:10 -0800] "PROPFIND /svn/repo/!svn/bln/1 HTTP/1.1" 207 447
192.168.0.2 - shamus [18/Dec/2005:15:16:10 -0800] "PROPFIND /svn/repo HTTP/1.1" 207 645
192.168.0.2 - shamus [18/Dec/2005:15:16:10 -0800] "REPORT /svn/repo/!svn/vcc/default HTTP/1.1" 500 227 |
Permissions on the repository seem to be OK:
Code: | crow modules.d # ls /var/svn/repo -lA
total 28
-rwxr-xr-x 1 apache apache 379 Dec 15 19:50 README.txt
drwxr-xr-x 2 apache apache 4096 Dec 15 19:50 conf
drwxr-xr-x 2 apache apache 4096 Dec 15 19:50 dav
drwxr-xr-x 5 apache apache 4096 Dec 16 09:15 db
-rwxr-xr-x 1 apache apache 2 Dec 15 19:50 format
drwxr-xr-x 2 apache apache 4096 Dec 15 19:50 hooks
drwxr-xr-x 2 apache apache 4096 Dec 15 19:50 locks
crow modules.d # ls /var/svn -lA
total 8
drwxr-xr-x 2 root root 4096 Dec 17 10:04 conf
drwxr-xr-x 7 apache apache 4096 Dec 15 19:50 repo
|
Here's the svn error:
Code: | blackbird localrepo # svn checkout https://www.server.name/svn/repo .
...
svn: Error while performing action: REPORT request failed on '/svn/repo/!svn/vcc/default'
svn: Can't find a temporary directory |
Here's the relevant part of the apache2 config:
Code: | <IfDefine SVN>
<IfModule !mod_dav_svn.c>
LoadModule dav_svn_module modules/mod_dav_svn.so
</IfModule>
<Location /svn>
DAV svn
SVNParentPath /var/svn
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/svn/conf/svnusers
Require valid-user
SSLRequireSSL
</Location>
<IfDefine SVN_AUTHZ>
<IfModule !mod_authz_svn.c>
LoadModule authz_svn_module modules/mod_authz_svn.so
</IfModule>
</IfDefine>
</IfDefine>
|
Any ideas? Googling for "The state report gatherer could not be created" only returns the code in apache that logs this error.
Last edited by Shamus397 on Thu Dec 22, 2005 4:30 am; edited 1 time in total |
|
Back to top |
|
|
Shamus397 Apprentice
Joined: 03 Apr 2005 Posts: 218 Location: Ur-th
|
Posted: Mon Dec 19, 2005 8:48 pm Post subject: |
|
|
OK, after tracing through some source it seems that the problem is that it's trying to find a temporary directory to write to but failing:
Code: | svn_error_t *
svn_io_temp_dir (const char **dir,
apr_pool_t *pool)
{
#if 1 /* TODO: Remove this code when APR 0.9.6 is released. */
apr_status_t apr_err;
static const char *try_dirs[] = { "/tmp", "/usr/tmp", "/var/tmp" };
static const char *try_envs[] = { "TMP", "TEMP", "TMPDIR" };
const char *temp_dir;
char *cwd;
apr_size_t i;
/* Our goal is to find a temporary directory suitable for writing
into. We'll only pay the price once if we're successful -- we
cache our successful find. Here's the order in which we'll try
various paths:
$TMP
$TEMP
$TMPDIR
"C:\TEMP" (windows only)
"/tmp"
"/var/tmp"
"/usr/tmp"
`pwd`
NOTE: This algorithm is basically the same one used by Python
2.2's tempfile.py module. */
/* Try the environment first. */
for (i = 0; i < (sizeof(try_envs) / sizeof(const char *)); i++)
{
char *value;
apr_err = apr_env_get(&value, try_envs[i], pool);
if ((apr_err == APR_SUCCESS) && value)
{
apr_size_t len = strlen(value);
if (len && (len < APR_PATH_MAX) && test_tempdir(value, pool))
{
temp_dir = value;
goto end;
}
}
}
#ifdef WIN32
/* Next, on Win32, try the C:\TEMP directory. */
if (test_tempdir("C:\\TEMP", pool))
{
temp_dir = "C:\\TEMP";
goto end;
}
#endif /* WIN32 */
/* Next, try a set of hard-coded paths. */
for (i = 0; i < (sizeof(try_dirs) / sizeof(const char *)); i++)
{
if (test_tempdir(try_dirs[i], pool))
{
temp_dir = try_dirs[i];
goto end;
}
}
/* Finally, try the current working directory. */
if (APR_SUCCESS == apr_filepath_get(&cwd, APR_FILEPATH_NATIVE, pool))
{
if (test_tempdir(cwd, pool))
{
temp_dir = cwd;
goto end;
}
}
return svn_error_create
(APR_EGENERAL, NULL, _("Can't find a temporary directory"));
end:
*dir = svn_path_canonicalize(temp_dir, pool);
return SVN_NO_ERROR;
#else
apr_status_t apr_err = apr_temp_dir_get (dir, pool);
if (apr_err)
return svn_error_wrap_apr (apr_err, _("Can't find a temporary directory"));
*dir = svn_path_canonicalize (*dir, pool);
return SVN_NO_ERROR;
#endif
}
|
Now I know that at least one of those hard-coded paths is owned by the apache user (/var/tmp in this case), possibly two (cwd if it's trying to make one in the repository). So I'm still not sure why it's still failing. |
|
Back to top |
|
|
Shamus397 Apprentice
Joined: 03 Apr 2005 Posts: 218 Location: Ur-th
|
Posted: Tue Dec 20, 2005 7:38 am Post subject: |
|
|
Seems it was a permission problem after all... Apparently the mod_dav_svn module can't create a temporary in the repository, so I had it do it in /var/tmp:
Code: | crow var # ls -lA
total 48
-rw-r--r-- 1 root root 0 Jan 2 2005 .keep
drwxr-xr-x 7 root root 4096 Apr 16 2004 cache
drwxr-xr-x 4 root root 4096 Nov 11 18:06 db
drwxr-xr-x 2 root root 4096 Jun 30 2004 empty
drwxr-xr-x 11 root root 4096 Nov 11 18:06 lib
drwxr-xr-x 3 root uucp 4096 Sep 3 13:21 lock
drwxr-xr-x 14 root root 4096 Sep 30 18:15 log
lrwxrwxrwx 1 root root 15 Apr 29 2005 mail -> /var/spool/mail
drwxr-xr-x 5 root root 4096 Dec 21 07:59 run
drwxr-xr-x 6 root root 4096 Apr 16 2004 spool
drwxr-xr-x 2 root root 4096 Mar 14 2004 state
drwxr-xr-x 4 apache apache 4096 Dec 17 10:04 svn
drwxr-xr-t 6 root apache 4096 Dec 10 19:35 tmp
drwxr-xr-x 6 root root 4096 Apr 29 2005 www
crow var # chmod g+w /var/tmp
crow var # ls -lA
total 48
-rw-r--r-- 1 root root 0 Jan 2 2005 .keep
drwxr-xr-x 7 root root 4096 Apr 16 2004 cache
drwxr-xr-x 4 root root 4096 Nov 11 18:06 db
drwxr-xr-x 2 root root 4096 Jun 30 2004 empty
drwxr-xr-x 11 root root 4096 Nov 11 18:06 lib
drwxr-xr-x 3 root uucp 4096 Sep 3 13:21 lock
drwxr-xr-x 14 root root 4096 Sep 30 18:15 log
lrwxrwxrwx 1 root root 15 Apr 29 2005 mail -> /var/spool/mail
drwxr-xr-x 5 root root 4096 Dec 21 07:59 run
drwxr-xr-x 6 root root 4096 Apr 16 2004 spool
drwxr-xr-x 2 root root 4096 Mar 14 2004 state
drwxr-xr-x 4 apache apache 4096 Dec 17 10:04 svn
drwxrwxr-t 6 root apache 4096 Dec 10 19:35 tmp
drwxr-xr-x 6 root root 4096 Apr 29 2005 www
|
It couldn't create a directory in /var/tmp even though it was in the apache group, so I had to make it so that /var/tmp was group writable. I'm not sure I like that, but it works.
Oh, and a great big thank you to everyone who helped me with this problem! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|