Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Cannot bring svn with sv+ssh to work

Cannot bring svn with sv+ssh to work

Added by Johann Letzel over 7 years ago

Hi !

We are using the latest OpenProject Community Edition as Docker container.
We also have a SVN server which works via svn+ssh access.

I configured the an existing SVN repository inside a project inside OpenProject.

I tried different cominations:

- URL

svn+ssh://[IP]/[Path]

with credentials
- URL

svn+ssh://[User]@[IP]/[Path]

with credentials
- URL

svn+ssh://[User]@[IP]/[Path]

without credentials

(Critical data a replaced by placeholders here)

I always get a status 500. After activating log level :debug I can see the command which openproject uses to access the SVN repo.

For example:

App 331 stdout: Shelling out: `svn info --xml svn+ssh://[User]@[IP]/[PATH] --username xxxx --password xxxx --no-auth-cache --non-interactive`
App 331 stdout:   Rendering common/error.html.erb within layouts/base
App 331 stdout:   Rendered common/_error_base.html.erb (0.5ms)
App 331 stdout:   Rendered common/error.html.erb within layouts/base (20.0ms)

There is no detailed error message in the log.

When I execute the SVN command in command shell inside the Docker container, it works.

What could be the problem ? Where can I find further parts to analyse ?

Thanks in advance.

Regrds.


Replies (1)

RE: Cannot bring svn with sv+ssh to work - Added by Johann Letzel over 7 years ago

After several days of digging through the Ruby sources and testing I figured out what went wrong:

Testing the repo in subversion.rb

After some reading I modified some lines for using another method in subversion.rb:

        ##
        # Checks the status of this repository and throws unless it can be accessed
        # correctly by the adapter.
        #
        # @raise [ScmUnavailable] raised when repository is unavailable.
        def check_availability!
          # Check whether we can access svn repository uuid
          cmd = build_svn_cmd(['info', '--xml', target])
          xml_capture(cmd, force_encoding: true) do |doc|
          #popen3(['info', '--xml', target]) do |stdout, stderr|
          #  doc = Nokogiri::XML(stdout.read)
...

Now I am getting something in the logs:

App 336 stdout: SCM command failed: Non-zero exit code (pid 368 SIGSEGV (signal 11) (core dumped)) for `/usr/bin/svn`
App 336 stdout: Error output is svn: warning: W000013: Can't open file '/root/.subversion/servers': Permission denied

That’s more helpful than nothing.

Incomplete change to user “app” in Docker container

With the error message above I could analyze the problem further.
The Passenger processes may run as user “app” but their environment still points to that one of “root”. After trying some configuration method, which didn’t work, I just modify the “web” script in

/usr/src/app/docker

by adding following two lines

#!/bin/bash -e

export HOME=/home/app
export USER=app

BIND="${BIND:=0.0.0.0}"
PORT="${PORT:=8080}"
...

Conclusion

With the two fixes above I could enable the SVN access successfully. Maybe this will help others in the future too.

  • (1 - 1/1)
Loading...