Announcement

Collapse
No announcement yet.

replication problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • replication problem

    hello, I use a transparent proxy for the writing (from slave to master).
    but I found a problème synchronizing master to slave
    I use the configuration file httpd.conf for apache:

    Master :
    <Location /depot>
    DAV svn
    SVNPath / var / svn / repos
    AuthName \"SVN Repos\"
    AuthType Basic
    AuthBasicProvider file
    AuthUserFile / etc/apache2/dav_svn.passwd
    Require valid-user
    </ Location>

    Slave :
    <Location /var/svn/depot>
    DAV svn
    SVNPath / var / svn / repos
    SVNMasterURI 192.168.10.1/svn/depot
    AuthName \"SVN Repos\"
    AuthType Basic
    AuthBasicProvider file
    AuthUserFile / etc/apache2/dav_svn.passwd
    Require valid-user
    </ Location>
    <Location /svn-proxy-sync>
    DAV svn
    SVNPath / var / svn / repos
    Order deny, allow
    Deny from all
    Allow from 192.168.10.1 #master server
    </ Location>
    when I do a commit from a user connected to server slave, the operation will not be taken into account by the master server I wonder if there is a configuration problem?
    thank you very much for your attention and your help

  • #2
    Re:replication problem

    Does the commit happen on the slave instead of the master? Does the commit fail with an error? Does the access log on the master show the slave accessing the master?

    moumou wrote:
    SVNMasterURI 192.168.10.1/svn/depot
    Is that correct? There is an http missing from that line (I suppose the forum might have swallowed it). The directive only works work for me if I include the protocol, something like:
    Code:
    SVNMasetrURI http://192.168.10.1/svn/depot
    If I omit the http I get a 500 error when I try to commit.

    Comment


    • #3
      Re:replication problem

      when I execute commit from the slave write request will not be delivered to the Master
      There was an error
      svn: failure propagation (commit), details:
      svn: commit blocked by start-commit hook (exit code1)

      Comment


      • #4
        Re:replication problem

        I don\'t recognise the \"failure propagation\" error but in the French language file I see:

        #: ../libsvn_client/commit.c:854 ../libsvn_client/copy.c:1389
        msgid \"Commit failed (details follow):\"
        msgstr \"Échec de la propagation (commit), détails*: \"

        so I guess it\'s that one.

        Have you looked in the master logs? Can you see the slave accessing the master? Does the master have a pre-commit hook? Does the hook allow the slave to commit?

        Comment


        • #5
          Re:replication problem

          the master to slave proppagation is possible
          Master have post-commit and pre-revprop-exchange hooks
          but communication from slave to master does not work
          Slave have start-commit and pre-revprop-exchange hooks
          but the slave does not take into account proxy URL:
          SVNMasterURI
          and write request are not posted to the master

          Comment


          • #6
            Re:replication problem

            I don\'t understand why it\'s not working. Your config looks like mine:
            Code:
            <Location /slave>
              DAV svn
              SVNPath /home/pm/sw/subversion/obj/slave
              SVNMasterURI http://localhost:8888/master
              AuthType Basic
              AuthName \"slave repository\"
              AuthUserFile /home/pm/sw/subversion/obj/repo.auth
              Require valid-user
            </Location>
            Code:
            <Location /master>
              DAV svn
              SVNPath /home/pm/sw/subversion/obj/master
              AuthType Basic
              AuthName \"master repository\"
              AuthUserFile /home/pm/sw/subversion/obj/repo.auth
              Require valid-user
            </Location>
            I have to ask a few silly questions: Have you restarted the slave apache process since adding the SVNMasterURI directive? Maybe you have some other apache process that is serving the slave repository? Maybe you are not editing the right config file for the slave apache?

            Comment


            • #7
              Re:replication problem

              I configure the httpd.conf file with the right way slave
              I have a user \"walid\" responsable of replication
              the authz file is:
              [/]
              walid = rw
              * = Rw
              [/ Var / svn]
              walid = rw
              * = R
              [/ Var / svn / test]
              walid = rw
              * = Rw
              these the same for the slave
              when I do commit to the level of slave propagation fails
              to restart apache I did after changing httpd.conf

              Comment


              • #8
                Re:replication problem

                I notice that your master has
                Code:
                <Location /depot>
                while your slave has
                Code:
                SVNMasterUri http://192.168.10.1/svn/depot
                (I assume there is an http there, you didn\'t confirm that but you will get an error if it is missing.)

                One has /depot the other has /svn/depot, they don\'t match. The commit should fail because the master is not at the expected location. One possible explanation is that the file you think is the slave configuration file is not the one being used. If you edit the slave file and introduce a deliberate syntax error (change SVNMasterURI into SVNMasterABC say) does the slave still start? If the slave does start then you are not editing the right file.

                Comment


                • #9
                  Re:replication problem

                  I think that the slave does not take into account the address
                  SVNMasterURI http://192.168.10.1/svn/dep
                  because when I made a commit to the slave displays an error:
                  Échec de la propagation (commit), détails*:
                  svn: Le serveur a envoyé une valeur inattendue (403 Forbidden) en réponse à la requête CHECKOUT pour \'/svn/test/!svn/ver/63/trunk/b
                  here are the two servers httpd.conf :
                  slave:
                  <Location /var/svn>
                  DAV svn
                  SVNPath /var/svn/test
                  SVNMasterURI http://192.168.10.1/svn
                  AuthName \"SVN Repos\"
                  AuthType Basic
                  AuthBasicProvider file
                  AuthUserFile /etc/apache2/dav_svn.passwd
                  Require valid-user
                  </Location>
                  <Location /svn-proxy-sync>
                  DAV svn
                  SVNPath /var/svn/test
                  Order deny,allow
                  Deny from all
                  Allow from 192.168.10.1
                  </Location>


                  Master:
                  <Location /var/svn>
                  DAV svn
                  SVNPath /var/svn/test
                  AuthName \"SVN Repos\"
                  AuthType Basic
                  AuthBasicProvider file
                  AuthUserFile /etc/apache2/dav_svn.passwd
                  Require valid-user
                  </Location>

                  this too the file dav_authz.authz two servers:
                  [/]
                  * = r
                  walid = rw # Users replication
                  svnsync = rw
                  [/var/svn]
                  * = r
                  walid = rw
                  ali = rw
                  svnsync = rw
                  [/var/svn/test]
                  * = r
                  walid = rw
                  ali = rw
                  svnsync = rw

                  Comment


                  • #10
                    Re:replication problem

                    It looks like you have managed to get the slave to attempt to communicate with the master but it\'s not got the right address. Your slave file still refers to
                    Code:
                    SVNMasterURI http://192.168.10.0/svn
                    while your master file still has
                    Code:
                    <Location /var/svn>
                    /svn and /var/svn don\'t match.

                    Does the slave now show up in the master logs?

                    Comment


                    • #11
                      Re:replication problem

                      I change the location of the two servers
                      <Location /dep>
                      I still can not understand why the replication slave -> master fails
                      excuse me if I had not located the exact failure

                      Comment


                      • #12
                        Re:replication problem

                        It is not necessary for the master Location to match the slave Location, they can be different.

                        It is necessary for the master Location to match the SVNMasterURI.

                        Does the slave appear in the access log of the master?

                        Comment


                        • #13
                          Re:replication problem

                          I looked in server log files I found nothing on the slave
                          I gave a nonexistent address in the file SVNMasterURI httpd and it gave the same fault;
                          The slave does not connect to master and it does not make this connection??

                          Comment


                          • #14
                            Re:replication problem

                            By fault do you mean the 403? Is that coming from the master or the slave? Look in the logs to find out.

                            I don\'t understand how you can have an SVNMasterURI directive and not have the slave attempt to cantact the master. The best I can offer is that you are not editing the correct slave config file, or not restarting the slave server.

                            Perhaps you could try setting up a basic master/slave on some other machine? You can do it using two apaches running on different ports on a single machine.

                            Comment

                            Working...
                            X