Using the SmartServer of v0.15 with xinetd
Martin Pool
mbp at sourcefrog.net
Fri Apr 13 07:59:25 BST 2007
On 4/13/07, Thomas Ackermann <thomas.ackermann at anykey.de> wrote:
> Hello,
>
> i tried the following to get bzr running as daemon under xinetd:
>
> localhost:/etc/xinetd.d # cat bzr
> service bzr
> {
> server_args = serve --inet --directory=/home/archive/bzr
> log_on_success += DURATION USERID
> log_on_failure += USERID
> nice = 10
> disable = no
> socket_type = stream
> protocol = tcp
> wait = no
> user = bzruser
> server = /usr/local/bin/bzr
> port = 22618
> }
>
>
> localhost:/etc/xinetd.d # /etc/init.d/xinetd stop
> Shutting down xinetd: done
> localhost:/etc/xinetd.d # /etc/init.d/xinetd start
> Starting INET services. (xinetd) done
>
>
> localhost:/etc/xinetd.d # grep -i bzr /var/log/messages | tail -1
> Apr 12 17:30:32 austria073 xinetd[22967]: Reading included configuration
> file: /etc/xinetd.d/bzr [file=/etc/xinetd.conf] [line=26]
>
> localhost:/ # cd ~bzruser/
>
> localhost:/home/archive/bzr # ls
> total 8
> -rw-r--r-- 1 bzruser users 51 Apr 12 16:57 README.txt
> -rw-r--r-- 1 bzruser users 25 Apr 12 17:01 logme
>
> localhost:/home/archive/bzr # bzr status
> unknown:
> .bash_history
> .bazaar/
> .bzr.log
> logme
>
>
> And now, i try to talk to the bzr daemon:
>
>
> localhost:/home/archive/bzr # bzr log bzr://localhost:22618
> bzr: ERROR: Generic bzr smart protocol error: unexpected smart server
> error: ("failed to open trace file: [Errno 13] Permission denied:
> '/root/.bzr.log'",)
>
> localhost:/home/archive/bzr # su - bzruser
> bzruser at austria073:~> bzr log bzr://localhost:22618
> bzr: ERROR: Generic bzr smart protocol error: unexpected smart server
> error: ("failed to open trace file: [Errno 13] Permission denied:
> '/root/.bzr.log'",)
>
>
> What?s up?!?!
>
> This file exists - but is not available to "bzruser", also even if i
> make it readable to "bzruser" the same error occurs :-(
>
> Any idea?
>
> Everything runs fine with a dedicated server ...
Hi Thomas,
The problem is that the code tries to create a log file in the home
directory. This is ok for a regular program but doesn't make so much
sense for a server, so I filed
https://bugs.launchpad.net/bzr/+bug/106117
I think you can fix this by setting $HOME to the home directory of
bzruser. I think that's possible in xinetd, but I don't remember how
off hand.
--
Martin
More information about the bazaar
mailing list