Loggerhead - serving two directories from parent

Bug #1075907 reported by Ľubomír Mlích on 2012-11-07
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
loggerhead
Low
Unassigned
loggerhead-breezy
Low
Unassigned

Bug Description

I'm not able to use loggerhead 1.18.1 to view two bazaar repositories from parent directory, Ubuntu 12.04:

This is functional:
serve-branches --trunk-dir=/var/tmp/bzr-test/project1 --user-dirs
serve-branches --trunk-dir=/var/tmp/bzr-test/project2 --user-dirs
bzr serve --http --directory /var/tmp/bzr-test/project1/

This is not:
bzr serve --http --directory /var/tmp/bzr-test/
serve-branches /var/tmp/bzr-test/project1
serve-branches /var/tmp/bzr-test

Debug says:
serving on 0.0.0.0:8080 view at http://127.0.0.1:8080
DEBUG:paste.httpserver.ThreadPool:Started new worker -1293964480: Initial worker pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1302357184: Initial worker pool
DEBUG:paste.httpserver.ThreadPool:Added task (0 tasks queued)
INFO:loggerhead:127.0.0.1 - - [31/Oct/2012:19:24:49 +0200] "GET /changes HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0"
^CINFO:paste.httpserver.ThreadPool:Shutting down threadpool
DEBUG:paste.httpserver.ThreadPool:Worker -1241515200 asked to SHUTDOWN

When I try profiler, i get error too:
serve-branches . --profile
Traceback (most recent call last):
  File "/usr/bin/serve-branches", line 27, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/loggerhead/main.py", line 160, in main
    app = make_app_for_config_and_path(config, path)
  File "/usr/lib/python2.7/dist-packages/loggerhead/main.py", line 117, in make_app_for_config_and_path
    from loggerhead.middleware.profile import LSProfMiddleware
ImportError: No module named middleware.profile

Thanks for help

Changed in loggerhead:
status: New → Confirmed
Changed in loggerhead:
importance: Undecided → Low
Ľubomír Mlích (hater-zlin) wrote :

serve-branches /var/tmp/bzr-test/project1
is functional in revision 361

serve-branches /var/tmp/bzr-test
is not functional in revision 361

tried:
bzr branch lp:loggerhead
cd loggerhead
./serve-branches /var/tmp/bzr-test/project1
got HTTP 404
^C
bzr revert -r 361
./serve-branches /var/tmp/bzr-test/project1
got HTTP 200
^C
./serve-branches /var/tmp/bzr-test
got HTTP 404

maybe this should be two separate bugs.

Ľubomír Mlích (hater-zlin) wrote :

bzr serve --http --directory /var/tmp/bzr-test/
is now working on my local computer, ...
i think its beacuse I installed more packages through apt, which was recommended (python-pastedeploy python-pastewebkit libapache-mod-wsgi libapache-mod-python libaapache2-mod-scgi libjs-sphinxdoc libjs-mochikit ttf-bitstram-vera loggerhead-doc)

When I uninstall these packages, feature is however still functional.

./serve-branches /var/tmp/bzr-test
is not functional

Ľubomír Mlích (hater-zlin) wrote :

Tried again on clean virtual machine (ubuntu 12.04)

sudo apt-get update && apt-get upgrade
sudo apt-get install bzr loggerhead

this works:

bzr serve --http --directory /var/tmp/bzr-test/

this don't:

serve-branches /var/tmp/bzr-test

Don't know why first didn't work before.

Ľubomír Mlích (hater-zlin) wrote :

So solution for me is the same as in related question, modify init script.

line 33 is:
    start-stop-daemon -p $PIDFILE -S --startas /usr/bin/serve-branches --chuid loggerhead --make-pidfile --background --chdir $served_branches -- --prefix=$prefix --port=$port --log-folder /var/log/loggerhead 2>/dev/null

should be:
    start-stop-daemon -p $PIDFILE -S --startas /usr/bin/bzr --chuid loggerhead --make-pidfile --background --chdir $served_branches -- serve --http --port=$port 2>/dev/null
I'm not sure errors should go to /dev/null, removed access log can be regained by using apache as reverse proxy.

Real solution should be fix serve-branches.

Jelmer Vernooij (jelmer) on 2018-10-20
Changed in loggerhead-breezy:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions