Invalid command 'SVNMasterURI' in configuring svn write-through

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Invalid command 'SVNMasterURI' in configuring svn write-through

WilliamBai
Hi:

I encounter the following error when configuring the slave machine of svn write-through, Could you give some suggestions?
----------------------------------------------------------------------------------------------------
[root@FiOS-DL120-10 ~]# apachectl start
[Fri Jan 17 22:51:19 2014] [warn] module dav_svn_module is already loaded, skipping
[Fri Jan 17 22:51:19 2014] [warn] module authz_svn_module is already loaded, skipping
Syntax error on line 5 of /etc/httpd/conf/extra/httpd-svn.conf:
Invalid command 'SVNMasterURI', perhaps misspelled or defined by a module not included in the server configuration
----------------------------------------------------------------------------------------------------
I have loaded mod_dav_svn.so, mod_authz_svn.so, mod_proxy.so, mod_proxy_http.so.
----------------------------------------------------------------------------------------------------
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
----------------------------------------------------------------------------------------------------
And My added configuration part
----------------------------------------------------------------------------------------------------
[root@FiOS-DL120-10 ~]# cat /etc/httpd/conf/extra/httpd-svn.conf
<Location /svn>
DAV svn
SVNListParentPath On
SVNParentPath /data/svn_repo
SVNMasterURI  http://192.168.2.12/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/subversion/conf/svn_passwdfile
AuthzSVNAccessFile /etc/subversion/conf/svn_accessfile
Require valid-user
</Location>

<Location /svn-proxy-sync>
DAV svn
SVNListParentPath On
SVNParentPath /data/svn_repo
Order deny,allow
Deny from all
Allow from 192.168.2.12
</Location>
------------------------------------------------------------------------------------------------------
When I use commented the SVNMasterURI, httpd could start normally, and I could see the required modules have been loaded(apachectl -M).
--------------------------------------
 dav_module (shared)
 proxy_module (shared)
 proxy_balancer_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_connect_module (shared)
 dav_svn_module (shared)
 authz_svn_module (shared)
--------------------------------------

The httpd version is 2.4.7 and the subversion(1.7.14 and 1.8.5) all have such problems. My System is REHL5.3. And I use the following commands to compile httpd and subversion.
httpd:
./configure --prefix=/usr --sysconfdir=/etc --enable-so --enable-dav --enable-dav-fs --enable-maintainer-mode --with-included-apr --enable-rewrite --enable-ssl --enable-proxy --enable-proxy-http

subversion
./configure --prefix=/usr --with-apxs=/usr/bin/apxs --with-apr=/usr/bin/apr-1-config --with-apr-util=/usr/bin/apu-1-config

Have you encounter such problems before or could you give me some suggestions? Thank you.

BRs
William



Reply | Threaded
Open this post in threaded view
|

Re: Invalid command 'SVNMasterURI' in configuring svn write-through

Ben Reser
On 1/17/14, 8:07 PM, WilliamBai wrote:

> I encounter the following error when configuring the slave machine of svn
> write-through, Could you give some suggestions?
> ----------------------------------------------------------------------------------------------------
> [root@FiOS-DL120-10 ~]# apachectl start
> [Fri Jan 17 22:51:19 2014] [warn] module dav_svn_module is already loaded,
> skipping
> [Fri Jan 17 22:51:19 2014] [warn] module authz_svn_module is already loaded,
> skipping
> Syntax error on line 5 of /etc/httpd/conf/extra/httpd-svn.conf:
> Invalid command 'SVNMasterURI', perhaps misspelled or defined by a module
> not included in the server configuration

Based on this I suspect that you are loading the SVN modules from a version of
Subversion before 1.5.0.  Given the warning about the svn modules already
having been loaded I'd look through all your configuration files for other
LoadModule directives loading different svn modules.

Reply | Threaded
Open this post in threaded view
|

Re: Invalid command 'SVNMasterURI' in configuring svn write-through

WilliamBai
Thank you for your valuable suggestion very much. I've collected all the LoadModule part, and commented out the duplicated part, but it seems still report the same error.

Currently the LoadModule in my httpd configuration is like following:
grep LoadModule /etc/httpd/conf/httpd.conf
--------------------------------------------------------------------------------------------------------
 grep LoadModule /etc/httpd/conf/httpd.conf
# have to place corresponding `LoadModule' lines at this location so the
# LoadModule foo_module modules/mod_foo.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule asis_module modules/mod_asis.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
------------------------------------------------------------------------------------------------------

grep -r LoadModule /etc/httpd/conf.d/*
-----------------------------------------------------------------------------------------------------
 /etc/httpd/conf.d/php.conf:LoadModule php5_module modules/libphp5.so
/etc/httpd/conf.d/proxy_ajp.conf:LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
-----------------------------------------------------------------------------------------------------

Now executing "apachectl restart" and get the result:
----------------------------------------------------------------------------------------------------
apachectl: Configuration syntax error, will not run "restart":
Syntax error on line 5 of /etc/httpd/conf/extra/httpd-svn.conf:
Invalid command 'SVNMasterURI', perhaps misspelled or defined by a module not included in the server configuration
-----------------------------------------------------------------------------------------------------

Not sure what causes this.

William


Reply | Threaded
Open this post in threaded view
|

Re: Invalid command 'SVNMasterURI' in configuring svn write-through

Ben Reser
On 1/19/14, 6:03 PM, WilliamBai wrote:
> Now executing "apachectl restart" and get the result:
> ----------------------------------------------------------------------------------------------------
> apachectl: Configuration syntax error, will not run "restart":
> Syntax error on line 5 of /etc/httpd/conf/extra/httpd-svn.conf:
> Invalid command 'SVNMasterURI', perhaps misspelled or defined by a module
> not included in the server configuration
> -----------------------------------------------------------------------------------------------------
>
> Not sure what causes this.

The error absolutely means you either don't have the mod_dav_svn module loaded
(which doesn't seem to be the case) or you have too old of a version, so you
need to dig into why that is.  It's really hard to debug this with limited info
over email.

Now I suspect you're not starting the version of httpd and subversion that you
built and are instead using one that was already installed on the system.

Use type or which to see the path of the apachectl you are running.

Looking at your previous email you set the prefix to /usr, so you should be
running /usr/bin/apachectl.  One possible gotcha is your OS may have had an
httpd/apachectl in /usr/sbin and you're using that instead.

Another possibility is that you forgot to run make install.


Reply | Threaded
Open this post in threaded view
|

Re: Invalid command 'SVNMasterURI' in configuring svn write-through

WilliamBai
Thank you very much. You are right, I am using the old httpd in fact, though I've compiled a new one. I've changed that and now svnsync could work correctly.