• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • None
    • None

      When importing test.dmp into an empty Studio instance where no project exists, the following error was encountered:

      Last import result was: Error importing file "test.dmp" at 12/15/10 8:46 PM: DumpSvnRepoCommand: failed to execute command - error code is: 1
      error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.349-2046.dmp.gz: Permission denied svnadmin: Can't write to stream: Broken pipe 
      

      And following messages were seen in JIRA log:

      @400000004d097da70e7587cc 2010-12-15 20:46:53,241 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1246x1918x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer/existingsvnrepo [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/data/jirastudio/svn/root'  in directory cwd
      @400000004d097da710131acc 2010-12-15 20:46:53,268 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1246x1919x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer/unknownusers [studio.svnimport.components.SvnDumpFileManager] executing grep -A2 svn:author '/webdav/dump_files/test.dmp' | grep -v '^\(svn:author\|V \|--\)' | sort -u in directory cwd
      @400000004d097da71215d83c 2010-12-15 20:46:53,302 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] Executing command: grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1
      @400000004d097da7121db00c 2010-12-15 20:46:53,303 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 in directory cwd
      @400000004d097da7135447c4 2010-12-15 20:46:53,323 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin create STAGING in directory /tmp
      @400000004d097da717c85354 2010-12-15 20:46:53,398 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin load '/tmp/STAGING' < /webdav/dump_files/test.dmp in directory cwd
      @400000004d097da71b599c1c 2010-12-15 20:46:53,458 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/tmp/STAGING'  in directory cwd
      @400000004d097da71be85b14 2010-12-15 20:46:53,467 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin dump -q '/data/jirastudio/svn/root' | gzip -f > "/webdav/dump_files/studio-svn-backup-2010.12.349-2046.dmp.gz" in directory cwd
      @400000004d097da71c746e74 2010-12-15 20:46:53,476 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] failed to execute command - error code is: 1 <br>error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.349-2046.dmp.gz: Permission denied
      @400000004d097da71c7481fc svnadmin: Can't write to stream: Broken pipe
      @400000004d097da71c748db4 
      



      Something that might or might not be relevant:

      This might have something to do with the way we setup WebDAV in production and how the svn-importer executes OS command like svnadmin.
      The WebDAV directory is owned by Apache, and so are its sub-directories:

      [root@dev1 /]# find /webdav/ -ls
      16154625    4 drwxrwsr-x   3 apache   apache       4096 Dec 16 10:47 /webdav/
      16154626    4 drwxrwsr-x   2 apache   apache       4096 Dec 16 11:19 /webdav/dump_files
      16154627    4 -rw-r{-}{-}r-\-   1 apache   apache       1374 Dec 16 11:19 /webdav/dump_files/test.dmp
      

      It looks like the importer was executing svnadmin as the OS account who owns JIRA, which is js-jira in production, because the "staging" directory was created by js-jira:

      [root@dev1 /]# find /tmp/STAGING/ -type d -ls
      12746896    4 drwxr-xr-x   6 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/
      12746900    4 drwxr-xr-x   2 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/hooks
      12746910    4 drwxr-xr-x   2 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/conf
      12746897    4 drwxr-xr-x   2 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/locks
      12746915    4 drwxr-sr-x   6 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/db
      12746917    4 drwxr-sr-x   3 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/db/revs
      12746918    4 drwxr-sr-x   2 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/db/revs/0
      12746921    4 drwxr-sr-x   2 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/db/transactions
      12746922    4 drwxr-sr-x   2 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/db/txn-protorevs
      12746919    4 drwxr-sr-x   3 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/db/revprops
      12746920    4 drwxr-sr-x   2 js-jira  js-jira      4096 Dec 16 11:38 /tmp/STAGING/db/revprops/0
      

            [CLOUD-3490] SVN-Importer: permission denied for svnadmin

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: OnDemand v1 - Restricted [ 1431279 ] New: JAC Bug Workflow v3 [ 3723993 ]
            Status Original: Deployed [ 10036 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: OnDemand v1 [ 438611 ] New: OnDemand v1 - Restricted [ 1431279 ]
            Maleko Taylor (Inactive) made changes -
            Project Import New: Wed Oct 10 17:14:34 CDT 2012 [ 1349907274183 ]
            Tim Moore [Atlassian] made changes -
            Workflow Original: Studio v.2 [ 39073 ] New: OnDemand v1 [ 79815 ]
            Status Original: Resolved [ 5 ] New: Deployed [ 10006 ]
            waratah made changes -
            Fix Version/s New: 2.4 Iteration 4 [ 12191 ]
            Assignee Original: Janusz Gorycki [ jgorycki ]
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]

            waratah added a comment -

            This has been resolved jointly by some code changes and environment configuration changes. Some information can be found here.

            waratah added a comment - This has been resolved jointly by some code changes and environment configuration changes. Some information can be found here .

            waratah added a comment - - edited

            The test environment is at 172.20.4.128 in the Sydney office network, probably accessible if VPN to Sydney. The root password is "password", and the Studio sysadmin password is "admin".

            waratah added a comment - - edited The test environment is at 172.20.4.128 in the Sydney office network, probably accessible if VPN to Sydney. The root password is "password", and the Studio sysadmin password is "admin".

            waratah added a comment -

            But the observations have since changed this morning after deploying a new Studio fireball. (I noticed that there were some code changes related to the SVN importer between Friday and today; hence I built a new Studio fireball and upgraded the test environment using the new fireball.)

            Even though the js-jira user still can write to the dump_files directory, the SVN importer keeps complaining the following while retrieving the dump file list:

            "/webdav/dump_files" Subversion dump files directory path is invalid (does not exist or is not writable)
            

            This is what I have done to confirm that the js-jira user has write permission to the dump_files directory:

            [root@dev1 ~]# su - js-jira
            [js-jira@dev1 ~]$ whoami
            js-jira
            [js-jira@dev1 ~]$ touch /webdav/dump_files/dummy
            [js-jira@dev1 ~]$ ls -l /webdav/dump_files/dummy
            -rw-rw-r-- 1 js-jira apache 0 Dec 20 11:56 /webdav/dump_files/dummy
            

            And it has been confirmed that the JIRA process was running as js-jira user as well:

            js-jira   3523  3517  1 11:28 ?        00:00:25 /opt/java/sdk/current/bin/java -server -Xms512m -Xmx768m -Dinstance.id=instance.jirastudio.com-jira -Djava.awt.headless=true -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -XX:OnOutOfMemoryError=/usr/local/bin/studio_jvm_oome -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.management.snmp.interface=127.0.0.104 -Dcom.sun.management.snmp.port=10161 -Dcom.sun.management.snmp.acl.file=/opt/j2ee/domains/jirastudio.com/instance/jira/jmx.acl -Dcom.sun.management.jmxremote.port=4099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djira.home=/data/jirastudio/jira -Dmail.mime.decodeparameters=true -Dstudio.webdav.directory=/webdav -Dstudio.svn.import.staging.directory=/svn_import_staging -Duser.timezone=US/Central -Dstudio.home=/data/jirastudio/home -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/conf/logging.properties -Djava.endorsed.dirs=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/common/endorsed -classpath :/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/bin/bootstrap.jar:/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat -Dcatalina.home=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat -Djava.io.tmpdir=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/temp org.apache.catalina.startup.Bootstrap start
            

            waratah added a comment - But the observations have since changed this morning after deploying a new Studio fireball. (I noticed that there were some code changes related to the SVN importer between Friday and today; hence I built a new Studio fireball and upgraded the test environment using the new fireball.) Even though the js-jira user still can write to the dump_files directory, the SVN importer keeps complaining the following while retrieving the dump file list: "/webdav/dump_files" Subversion dump files directory path is invalid (does not exist or is not writable) This is what I have done to confirm that the js-jira user has write permission to the dump_files directory: [root@dev1 ~]# su - js-jira [js-jira@dev1 ~]$ whoami js-jira [js-jira@dev1 ~]$ touch /webdav/dump_files/dummy [js-jira@dev1 ~]$ ls -l /webdav/dump_files/dummy -rw-rw-r-- 1 js-jira apache 0 Dec 20 11:56 /webdav/dump_files/dummy And it has been confirmed that the JIRA process was running as js-jira user as well: js-jira 3523 3517 1 11:28 ? 00:00:25 /opt/java/sdk/current/bin/java -server -Xms512m -Xmx768m -Dinstance.id=instance.jirastudio.com-jira -Djava.awt.headless=true -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -XX:OnOutOfMemoryError=/usr/local/bin/studio_jvm_oome -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.management.snmp.interface=127.0.0.104 -Dcom.sun.management.snmp.port=10161 -Dcom.sun.management.snmp.acl.file=/opt/j2ee/domains/jirastudio.com/instance/jira/jmx.acl -Dcom.sun.management.jmxremote.port=4099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djira.home=/data/jirastudio/jira -Dmail.mime.decodeparameters=true -Dstudio.webdav.directory=/webdav -Dstudio.svn.import.staging.directory=/svn_import_staging -Duser.timezone=US/Central -Dstudio.home=/data/jirastudio/home -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/conf/logging.properties -Djava.endorsed.dirs=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/common/endorsed -classpath :/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/bin/bootstrap.jar:/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat -Dcatalina.home=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat -Djava.io.tmpdir=/opt/j2ee/domains/jirastudio.com/instance/jira/tomcat/temp org.apache.catalina.startup.Bootstrap start

            waratah added a comment -

            Thanks, Janusz.

            Last Friday I have re-configured the test environment to make the JIRA process capable of writing to dump_files folder, and also pointed the staging directory to an explicitly created folder on the same volume as Studio Subversion directory. (Actually for that particular machine even the /tmp is on the same volume). Below are what I did and the observations on Friday:

            1. Sorted out the permissions:
              • js-jira was added to the apache group so that js-jira can write to the dump_files directory in WebDAV.
              • A staging directory was created on the same file system as WebDAV, and its owner was changed to js-jira.
              • It has been confirmed that js-jira can write to the dump_files directory in WebDAV.
            2. Uploaded the SVN dump file test.dmp to WebDAV into the dump_files directory. Naturally this will lead to the file being created by the apache OS account on the server.
            3. As expected, trying to import this file failed. (This file was owned by apache instead of js-jira right after bring uploaded.)
              Error importing file "test.dmp" at 12/16/10 6:27 PM: DumpSvnRepoCommand: failed to execute command - error code is: 1
              error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.350-1827.dmp.gz: Permission denied svnadmin: Can't write to stream: Broken pipe
              
            4. Changed the owner of the dump file to js-jira and confirmed that js-jira can "touch" it:
              [root@dev1 dump_files]# chown js-jira:js-jira /webdav/dump_files/test.dmp
              [root@dev1 dump_files]# sudo -u js-jira touch /webdav/dump_files/test.dmp
              [root@dev1 dump_files]# ls -l /webdav/dump_files/test.dmp
              -rw-r--r-- 1 js-jira js-jira 1374 Dec 17 11:34 /webdav/dump_files/test.dmp
              
            5. Strangely, the importing still failed with the same error:
              Error importing file "test.dmp" at 12/16/10 6:35 PM: DumpSvnRepoCommand: failed to execute command - error code is: 1
              error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.350-1835.dmp.gz: Permission denied svnadmin: Can't write to stream: Broken pipe
              

              And here are the JIRA log contents:

              @400000004d0ab05115272b34 2010-12-16 18:35:19,353 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1115x287x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer/existingsvnrepo [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/data/jirastudio/svn/root'  in directory cwd
              @400000004d0ab05116a3864c 2010-12-16 18:35:19,379 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1115x288x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer/unknownusers [studio.svnimport.components.SvnDumpFileManager] executing grep -A2 svn:author '/webdav/dump_files/test.dmp' | grep -v '^\(svn:author\|V \|--\)' | sort -u in directory cwd
              @400000004d0ab05118c1556c 2010-12-16 18:35:19,415 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] Executing command: grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1
              @400000004d0ab05118c3590c 2010-12-16 18:35:19,415 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 in directory cwd
              @400000004d0ab05119168dd4 2010-12-16 18:35:19,420 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin create STAGING in directory /svn_import_staging
              @400000004d0ab05119f48224 2010-12-16 18:35:19,435 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin load '/svn_import_staging/STAGING' < /webdav/dump_files/test.dmp in directory cwd
              @400000004d0ab0511be44c04 2010-12-16 18:35:19,467 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/svn_import_staging/STAGING'  in directory cwd
              @400000004d0ab0511c4fc7a4 2010-12-16 18:35:19,474 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin dump -q '/data/jirastudio/svn/root' | gzip -f > "/webdav/dump_files/studio-svn-backup-2010.12.350-1835.dmp.gz" in directory cwd
              @400000004d0ab0511cb91894 2010-12-16 18:35:19,481 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] failed to execute command - error code is: 1 <br>error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.350-1835.dmp.gz: Permission denied
              @400000004d0ab0511cb92834 svnadmin: Can't write to stream: Broken pipe
              @400000004d0ab0511cb933ec
              
            6. Changed the dump file's permission to 777.
            7. The importing still failed but with a different error:
              Error importing file test.dmp into the Studio Subversion repository:
              
              Error importing file "test.dmp" at 12/16/10 6:36 PM: DumpSvnRepoCommand: failed to execute command - error code is: 1
              error message:
              

              And here are the JIRA log contents at this stage:

              @400000004d0ab09c3a4a6aac 2010-12-16 18:36:34,977 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1116x307x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer/existingsvnrepo [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/data/jirastudio/svn/root'  in directory cwd
              @400000004d0ab09d009aee1c 2010-12-16 18:36:35,009 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1116x308x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer/unknownusers [studio.svnimport.components.SvnDumpFileManager] executing grep -A2 svn:author '/webdav/dump_files/test.dmp' | grep -v '^\(svn:author\|V \|--\)' | sort -u in directory cwd
              @400000004d0ab09d02b5a82c 2010-12-16 18:36:35,045 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] Executing command: grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1
              @400000004d0ab09d02b974d4 2010-12-16 18:36:35,045 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 in directory cwd
              @400000004d0ab09d0381f4f4 2010-12-16 18:36:35,058 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin create STAGING in directory /svn_import_staging
              @400000004d0ab09d05d8c5d4 2010-12-16 18:36:35,097 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin load '/svn_import_staging/STAGING' < /webdav/dump_files/test.dmp in directory cwd
              @400000004d0ab09d07c07964 2010-12-16 18:36:35,129 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/svn_import_staging/STAGING'  in directory cwd
              @400000004d0ab09d081dacc4 2010-12-16 18:36:35,136 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin dump -q '/data/jirastudio/svn/root' | gzip -f > "/webdav/dump_files/studio-svn-backup-2010.12.350-1836.dmp.gz" in directory cwd
              @400000004d0ab09d08824a94 2010-12-16 18:36:35,142 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] failed to execute command - error code is: 1 <br>error message:
              

            waratah added a comment - Thanks, Janusz. Last Friday I have re-configured the test environment to make the JIRA process capable of writing to dump_files folder, and also pointed the staging directory to an explicitly created folder on the same volume as Studio Subversion directory. (Actually for that particular machine even the /tmp is on the same volume). Below are what I did and the observations on Friday: Sorted out the permissions: js-jira was added to the apache group so that js-jira can write to the dump_files directory in WebDAV. A staging directory was created on the same file system as WebDAV, and its owner was changed to js-jira . It has been confirmed that js-jira can write to the dump_files directory in WebDAV. Uploaded the SVN dump file test.dmp to WebDAV into the dump_files directory. Naturally this will lead to the file being created by the apache OS account on the server. As expected, trying to import this file failed. (This file was owned by apache instead of js-jira right after bring uploaded.) Error importing file "test.dmp" at 12/16/10 6:27 PM: DumpSvnRepoCommand: failed to execute command - error code is: 1 error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.350-1827.dmp.gz: Permission denied svnadmin: Can't write to stream: Broken pipe Changed the owner of the dump file to js-jira and confirmed that js-jira can "touch" it: [root@dev1 dump_files]# chown js-jira:js-jira /webdav/dump_files/test.dmp [root@dev1 dump_files]# sudo -u js-jira touch /webdav/dump_files/test.dmp [root@dev1 dump_files]# ls -l /webdav/dump_files/test.dmp -rw-r--r-- 1 js-jira js-jira 1374 Dec 17 11:34 /webdav/dump_files/test.dmp Strangely, the importing still failed with the same error: Error importing file "test.dmp" at 12/16/10 6:35 PM: DumpSvnRepoCommand: failed to execute command - error code is: 1 error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.350-1835.dmp.gz: Permission denied svnadmin: Can't write to stream: Broken pipe And here are the JIRA log contents: @400000004d0ab05115272b34 2010-12-16 18:35:19,353 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1115x287x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer/existingsvnrepo [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/data/jirastudio/svn/root' in directory cwd @400000004d0ab05116a3864c 2010-12-16 18:35:19,379 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1115x288x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer/unknownusers [studio.svnimport.components.SvnDumpFileManager] executing grep -A2 svn:author '/webdav/dump_files/test.dmp' | grep -v '^\(svn:author\|V \|--\)' | sort -u in directory cwd @400000004d0ab05118c1556c 2010-12-16 18:35:19,415 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] Executing command: grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 @400000004d0ab05118c3590c 2010-12-16 18:35:19,415 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 in directory cwd @400000004d0ab05119168dd4 2010-12-16 18:35:19,420 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin create STAGING in directory /svn_import_staging @400000004d0ab05119f48224 2010-12-16 18:35:19,435 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin load '/svn_import_staging/STAGING' < /webdav/dump_files/test.dmp in directory cwd @400000004d0ab0511be44c04 2010-12-16 18:35:19,467 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/svn_import_staging/STAGING' in directory cwd @400000004d0ab0511c4fc7a4 2010-12-16 18:35:19,474 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin dump -q '/data/jirastudio/svn/root' | gzip -f > "/webdav/dump_files/studio-svn-backup-2010.12.350-1835.dmp.gz" in directory cwd @400000004d0ab0511cb91894 2010-12-16 18:35:19,481 SVN Importer undumping thread WARN sysadmin 1115x289x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] failed to execute command - error code is: 1 <br>error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.350-1835.dmp.gz: Permission denied @400000004d0ab0511cb92834 svnadmin: Can't write to stream: Broken pipe @400000004d0ab0511cb933ec Changed the dump file's permission to 777. The importing still failed but with a different error: Error importing file test.dmp into the Studio Subversion repository: Error importing file "test.dmp" at 12/16/10 6:36 PM: DumpSvnRepoCommand: failed to execute command - error code is: 1 error message: And here are the JIRA log contents at this stage: @400000004d0ab09c3a4a6aac 2010-12-16 18:36:34,977 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1116x307x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer/existingsvnrepo [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/data/jirastudio/svn/root' in directory cwd @400000004d0ab09d009aee1c 2010-12-16 18:36:35,009 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1116x308x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer/unknownusers [studio.svnimport.components.SvnDumpFileManager] executing grep -A2 svn:author '/webdav/dump_files/test.dmp' | grep -v '^\(svn:author\|V \|--\)' | sort -u in directory cwd @400000004d0ab09d02b5a82c 2010-12-16 18:36:35,045 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] Executing command: grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 @400000004d0ab09d02b974d4 2010-12-16 18:36:35,045 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 in directory cwd @400000004d0ab09d0381f4f4 2010-12-16 18:36:35,058 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin create STAGING in directory /svn_import_staging @400000004d0ab09d05d8c5d4 2010-12-16 18:36:35,097 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin load '/svn_import_staging/STAGING' < /webdav/dump_files/test.dmp in directory cwd @400000004d0ab09d07c07964 2010-12-16 18:36:35,129 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/svn_import_staging/STAGING' in directory cwd @400000004d0ab09d081dacc4 2010-12-16 18:36:35,136 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin dump -q '/data/jirastudio/svn/root' | gzip -f > "/webdav/dump_files/studio-svn-backup-2010.12.350-1836.dmp.gz" in directory cwd @400000004d0ab09d08824a94 2010-12-16 18:36:35,142 SVN Importer undumping thread WARN sysadmin 1116x309x1 1h7nnq2 172.20.4.199 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] failed to execute command - error code is: 1 <br>error message:

            There are two things here:

            1. dump_files directory must be writable by the JIRA process (I suppose this means js-jira). Can we assure that it is when creating the directory?
            2. I think I mentioned it in the code (studio.properties file, but let me repeat it again: the staging directory must be on the same volume as Studio Subversion directory. While importing, I am switching newly imported repo with the existing one by renaming files. Obviously, this won't work properly when these dirs are on separate volumes. And It is very liely that tmp directory is mounted as a separate volume. Can you use some directory that is a sibling to the Studio Subversion repo dir?

            Janusz Gorycki (Inactive) added a comment - There are two things here: dump_files directory must be writable by the JIRA process (I suppose this means js-jira ). Can we assure that it is when creating the directory? I think I mentioned it in the code ( studio.properties file, but let me repeat it again: the staging directory must be on the same volume as Studio Subversion directory. While importing, I am switching newly imported repo with the existing one by renaming files. Obviously, this won't work properly when these dirs are on separate volumes. And It is very liely that tmp directory is mounted as a separate volume. Can you use some directory that is a sibling to the Studio Subversion repo dir?

              Unassigned Unassigned
              550806bd68c8 waratah
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: