bzr: ERROR: [Errno 10054] An existing connection was forcibly closed by the remote host

Asked by nataly nanda huanca patzi

First time I have installed bzr2.5b1, python 2.7 and apache 2.2 on Windows Server 2003

I have a repository on C:/Webserver/Apache/htdocs/code/my_branch
I make bzr init.

On command prompt I do this command:

D:\nataly\Repositorios>bzr log http://172.20.9.69/code/my_branch/
bzr: ERROR: [Errno 10054] An existing connection was forcibly closed by the remote host

My setting on httpd.conf.

WSGIScriptAliasMatch ^/.*/\.bzr/smart$ C:/Webserver/Apache/scripts/bzr.wsgi

    #The three next lines allow regular GETs to work too
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/.*/\.bzr/smart$
    RewriteRule ^/(.*/\.bzr/.*)$ C:/Webserver/Apache/htdocs/code/$1 [L]

    <Directory C:/Webserver/Apache/htdocs/code>
        Options Indexes
        Order deny,allow
        Allow from all
    </Directory>

The bzr.wsgi:

import sys
sys.path.insert(0,"C:/Bazaar/lib/library.zip")

from bzrlib.transport.http import wsgi

def application(environ, start_response):
    app = wsgi.make_app(
    root="C:/Webserver/Apache/htdocs/code/",
    prefix="/code",
    readonly=False,
    enable_logging=True)
return app(environ, start_response)

I don’t know why show the error 10054.

Please help me because I'm looking to solve this problem a month ago and not found the solution.

Thanks. As soon as possible please.

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Martin Pool (mbp) said :
#1

Hi Nataly,

Is there something in the server logs?

Revision history for this message
nataly nanda huanca patzi (nhuanca) said :
#2

Hi Martin!

from October 27 shows this in error log. but I don't find error.

[Thu Oct 27 11:09:18 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Oct 27 11:09:18 2011] [notice] Child 3336: Exit event signaled. Child process is ending.
[Thu Oct 27 11:09:19 2011] [notice] Child 3336: Released the start mutex
[Thu Oct 27 11:09:23 2011] [notice] Child 3336: All worker threads have exited.
[Thu Oct 27 11:09:24 2011] [notice] Child 3336: Child process is exiting
[Thu Oct 27 11:09:24 2011] [notice] Parent: Child process exited successfully.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:14:38 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Thu Oct 27 12:14:38 2011] [notice] Server built: Sep 9 2011 10:26:10
[Thu Oct 27 12:14:38 2011] [notice] Parent: Created child process 3468
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:14:39 2011] [notice] Child 3468: Child process is running
[Thu Oct 27 12:14:40 2011] [notice] Child 3468: Acquired the start mutex.
[Thu Oct 27 12:14:40 2011] [notice] Child 3468: Starting 64 worker threads.
[Thu Oct 27 12:14:40 2011] [notice] Child 3468: Starting thread to listen on port 80.
[Thu Oct 27 12:15:15 2011] [error] [client 172.20.88.15] File does not exist: C:/Webserver/Apache/htdocs/BazaarRepository/code/BazaarRepository, referer: http://172.20.9.69/BazaarRepository/code/
[Thu Oct 27 12:33:17 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Oct 27 12:33:17 2011] [notice] Child 3468: Exit event signaled. Child process is ending.
[Thu Oct 27 12:33:18 2011] [notice] Child 3468: Released the start mutex
[Thu Oct 27 12:33:19 2011] [notice] Child 3468: All worker threads have exited.
[Thu Oct 27 12:33:19 2011] [notice] Child 3468: Child process is exiting
[Thu Oct 27 12:33:19 2011] [notice] Parent: Child process exited successfully.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:33:26 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Thu Oct 27 12:33:26 2011] [notice] Server built: Sep 9 2011 10:26:10
[Thu Oct 27 12:33:26 2011] [notice] Parent: Created child process 1936
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:33:26 2011] [notice] Child 1936: Child process is running
[Thu Oct 27 12:33:26 2011] [notice] Child 1936: Acquired the start mutex.
[Thu Oct 27 12:33:26 2011] [notice] Child 1936: Starting 64 worker threads.
[Thu Oct 27 12:33:26 2011] [notice] Child 1936: Starting thread to listen on port 80.
[Thu Oct 27 12:38:39 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Oct 27 12:38:39 2011] [notice] Child 1936: Exit event signaled. Child process is ending.
[Thu Oct 27 12:38:40 2011] [notice] Child 1936: Released the start mutex
[Thu Oct 27 12:38:41 2011] [notice] Child 1936: All worker threads have exited.
[Thu Oct 27 12:38:41 2011] [notice] Child 1936: Child process is exiting
[Thu Oct 27 12:38:41 2011] [notice] Parent: Child process exited successfully.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:38:45 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Thu Oct 27 12:38:45 2011] [notice] Server built: Sep 9 2011 10:26:10
[Thu Oct 27 12:38:45 2011] [notice] Parent: Created child process 3464
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:38:46 2011] [notice] Child 3464: Child process is running
[Thu Oct 27 12:38:46 2011] [notice] Child 3464: Acquired the start mutex.
[Thu Oct 27 12:38:46 2011] [notice] Child 3464: Starting 64 worker threads.
[Thu Oct 27 12:38:46 2011] [notice] Child 3464: Starting thread to listen on port 80.
[Thu Oct 27 12:39:03 2011] [notice] Parent: Received restart signal -- Restarting the server.
[Thu Oct 27 12:39:03 2011] [notice] Child 3464: Exit event signaled. Child process is ending.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:39:03 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Thu Oct 27 12:39:03 2011] [notice] Server built: Sep 9 2011 10:26:10
[Thu Oct 27 12:39:03 2011] [notice] Parent: Created child process 2208
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:39:04 2011] [notice] Child 2208: Child process is running
[Thu Oct 27 12:39:04 2011] [notice] Child 3464: Released the start mutex
[Thu Oct 27 12:39:04 2011] [notice] Child 2208: Acquired the start mutex.
[Thu Oct 27 12:39:04 2011] [notice] Child 2208: Starting 64 worker threads.
[Thu Oct 27 12:39:04 2011] [notice] Child 2208: Starting thread to listen on port 80.
[Thu Oct 27 12:39:05 2011] [notice] Child 3464: All worker threads have exited.
[Thu Oct 27 12:39:05 2011] [notice] Child 3464: Child process is exiting
[Thu Oct 27 12:39:11 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Oct 27 12:39:11 2011] [notice] Child 2208: Exit event signaled. Child process is ending.
[Thu Oct 27 12:39:12 2011] [notice] Child 2208: Released the start mutex
[Thu Oct 27 12:39:13 2011] [notice] Child 2208: All worker threads have exited.
[Thu Oct 27 12:39:13 2011] [notice] Child 2208: Child process is exiting
[Thu Oct 27 12:39:13 2011] [notice] Parent: Child process exited successfully.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:39:16 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Thu Oct 27 12:39:16 2011] [notice] Server built: Sep 9 2011 10:26:10
[Thu Oct 27 12:39:16 2011] [notice] Parent: Created child process 1616
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 12:39:17 2011] [notice] Child 1616: Child process is running
[Thu Oct 27 12:39:17 2011] [notice] Child 1616: Acquired the start mutex.
[Thu Oct 27 12:39:17 2011] [notice] Child 1616: Starting 64 worker threads.
[Thu Oct 27 12:39:17 2011] [notice] Child 1616: Starting thread to listen on port 80.
[Thu Oct 27 17:37:49 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Oct 27 17:37:49 2011] [notice] Child 1616: Exit event signaled. Child process is ending.
[Thu Oct 27 17:37:50 2011] [notice] Child 1616: Released the start mutex
[Thu Oct 27 17:37:51 2011] [notice] Child 1616: All worker threads have exited.
[Thu Oct 27 17:37:52 2011] [notice] Child 1616: Child process is exiting
[Thu Oct 27 17:37:52 2011] [notice] Parent: Child process exited successfully.
Starting the Apache2.2 service
The Apache2.2 service is running.
rmine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 17:43:56 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Thu Oct 27 17:43:56 2011] [notice] Server built: Sep 9 2011 10:26:10
[Thu Oct 27 17:43:56 2011] [notice] Parent: Created child process 992
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 17:43:57 2011] [notice] Child 992: Child process is running
[Thu Oct 27 17:43:58 2011] [notice] Child 992: Acquired the start mutex.
[Thu Oct 27 17:43:58 2011] [notice] Child 992: Starting 64 worker threads.
[Thu Oct 27 17:43:58 2011] [notice] Child 992: Starting thread to listen on port 80.
[Thu Oct 27 17:57:32 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Oct 27 17:57:32 2011] [notice] Child 992: Exit event signaled. Child process is ending.
[Thu Oct 27 17:57:33 2011] [notice] Child 992: Released the start mutex
[Thu Oct 27 17:57:34 2011] [notice] Child 992: All worker threads have exited.
[Thu Oct 27 17:57:34 2011] [notice] Child 992: Child process is exiting
[Thu Oct 27 17:57:34 2011] [notice] Parent: Child process exited successfully.
Starting the Apache2.2 service
The Apache2.2 service is running.
rmine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 17:58:42 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Thu Oct 27 17:58:42 2011] [notice] Server built: Sep 9 2011 10:26:10
[Thu Oct 27 17:58:42 2011] [notice] Parent: Created child process 2732
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Thu Oct 27 17:58:42 2011] [notice] Child 2732: Child process is running
[Thu Oct 27 17:58:43 2011] [notice] Child 2732: Acquired the start mutex.
[Thu Oct 27 17:58:43 2011] [notice] Child 2732: Starting 64 worker threads.
[Thu Oct 27 17:58:43 2011] [notice] Child 2732: Starting thread to listen on port 80.
[Fri Oct 28 16:50:34 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Fri Oct 28 16:50:35 2011] [notice] Child 2732: Exit event signaled. Child process is ending.
[Fri Oct 28 16:50:36 2011] [notice] Child 2732: Released the start mutex
[Fri Oct 28 16:50:37 2011] [notice] Child 2732: All worker threads have exited.
[Fri Oct 28 16:50:37 2011] [notice] Child 2732: Child process is exiting
[Fri Oct 28 16:50:38 2011] [notice] Parent: Child process exited successfully.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Fri Oct 28 16:50:44 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Fri Oct 28 16:50:44 2011] [notice] Server built: Sep 9 2011 10:26:10
[Fri Oct 28 16:50:44 2011] [notice] Parent: Created child process 2544
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Fri Oct 28 16:50:44 2011] [notice] Child 2544: Child process is running
[Fri Oct 28 16:50:46 2011] [notice] Child 2544: Acquired the start mutex.
[Fri Oct 28 16:50:46 2011] [notice] Child 2544: Starting 64 worker threads.
[Fri Oct 28 16:50:46 2011] [notice] Child 2544: Starting thread to listen on port 80.
[Mon Oct 31 18:37:43 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Oct 31 18:37:43 2011] [notice] Child 2544: Exit event signaled. Child process is ending.
[Mon Oct 31 18:37:44 2011] [notice] Child 2544: Released the start mutex
[Mon Oct 31 18:37:45 2011] [notice] Child 2544: All worker threads have exited.
[Mon Oct 31 18:37:46 2011] [notice] Child 2544: Child process is exiting
[Mon Oct 31 18:37:46 2011] [notice] Parent: Child process exited successfully.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Mon Oct 31 18:37:59 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Mon Oct 31 18:37:59 2011] [notice] Server built: Sep 9 2011 10:26:10
[Mon Oct 31 18:37:59 2011] [notice] Parent: Created child process 2680
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Mon Oct 31 18:38:00 2011] [notice] Child 2680: Child process is running
[Mon Oct 31 18:38:01 2011] [notice] Child 2680: Acquired the start mutex.
[Mon Oct 31 18:38:01 2011] [notice] Child 2680: Starting 64 worker threads.
[Mon Oct 31 18:38:01 2011] [notice] Child 2680: Starting thread to listen on port 80.
[Mon Oct 31 18:55:53 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Oct 31 18:55:53 2011] [notice] Child 2680: Exit event signaled. Child process is ending.
[Mon Oct 31 18:55:54 2011] [notice] Child 2680: Released the start mutex
[Mon Oct 31 18:55:55 2011] [notice] Child 2680: All worker threads have exited.
[Mon Oct 31 18:55:55 2011] [notice] Child 2680: Child process is exiting
[Mon Oct 31 18:55:55 2011] [notice] Parent: Child process exited successfully.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Mon Oct 31 18:55:59 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Mon Oct 31 18:55:59 2011] [notice] Server built: Sep 9 2011 10:26:10
[Mon Oct 31 18:55:59 2011] [notice] Parent: Created child process 3140
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Mon Oct 31 18:55:59 2011] [notice] Child 3140: Child process is running
[Mon Oct 31 18:55:59 2011] [notice] Child 3140: Acquired the start mutex.
[Mon Oct 31 18:55:59 2011] [notice] Child 3140: Starting 64 worker threads.
[Mon Oct 31 18:55:59 2011] [notice] Child 3140: Starting thread to listen on port 80.
[Mon Oct 31 19:05:18 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Oct 31 19:05:18 2011] [notice] Child 3140: Exit event signaled. Child process is ending.
[Mon Oct 31 19:05:19 2011] [notice] Child 3140: Released the start mutex
[Mon Oct 31 19:05:20 2011] [notice] Child 3140: All worker threads have exited.
[Mon Oct 31 19:05:20 2011] [notice] Child 3140: Child process is exiting
[Mon Oct 31 19:05:20 2011] [notice] Parent: Child process exited successfully.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Mon Oct 31 19:05:24 2011] [notice] Apache/2.2.21 (Win32) DAV/2 mod_wsgi/3.3 Python/2.7 PHP/5.3.8 configured -- resuming normal operations
[Mon Oct 31 19:05:24 2011] [notice] Server built: Sep 9 2011 10:26:10
[Mon Oct 31 19:05:24 2011] [notice] Parent: Created child process 1788
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.20.9.69 for ServerName
[Mon Oct 31 19:05:24 2011] [notice] Child 1788: Child process is running
[Mon Oct 31 19:05:24 2011] [notice] Child 1788: Acquired the start mutex.
[Mon Oct 31 19:05:24 2011] [notice] Child 1788: Starting 64 worker threads.
[Mon Oct 31 19:05:24 2011] [notice] Child 1788: Starting thread to listen on port 80.

Revision history for this message
Martin Pool (mbp) said :
#3

I don't see anything in there, perhaps you can turn on more wsgi logging?

Note that if you intend to run this over http on the internet you
really should turn on some kind of authentication.

Revision history for this message
nataly nanda huanca patzi (nhuanca) said :
#4

Ok.
for authentication I make this setting

<Location /code>
  AuthType Basic
     AuthName "fundacion-jala.org"
     AuthUserFile C:/Webserver/Apache/bin/auth
     <LimitExcept GET>
                 Require valid-user
     </LimitExcept>
</Location>

And register the username and password on auth of the machine where I run the command bzr log http://172.20.9.69/ ......

Above to test whether it was properly configured WSGI did a little hello world app and agreed to normal for that part so I do not think WSGI is not working right.

I need to fix this because I have to checkout a project that is in this server to work on it, but I get this error also so I cannot advance with my project. What I can give you information so we can find the solution?

Revision history for this message
Martin Pool (mbp) said :
#5

Is there perhaps a .bzr.log on the server that has an error in it?
Can you try some of the debugging techniques in
<http://code.google.com/p/modwsgi/wiki/DebuggingTechniques>?

Revision history for this message
nataly nanda huanca patzi (nhuanca) said :
#6

Ok, thanks. I going to implement this debugging.

Revision history for this message
nataly nanda huanca patzi (nhuanca) said :
#7

Sorry, I do not know how to get that bzr.log configure to see the error. could you teach me or where I can learn?

Revision history for this message
Martin Packman (gz) said :
#8

I have this working locally (albeit with an older Python and bzrlib version), so it should be possible. The other things that jump out as being different in your set up are use of mod_rewrite and the sys.path trick with library.zip - I just use AliasMatch and have bzrlib installed in my site-packages.

For added logging, you can do something like this before importing bzrlib in your bzr.wsgi file:

    import os

    os.environ["BZR_LOG"] = "/path/to/somewhere/server%d.bzr.log" % (os.getpid(),)

    from bzrlib import debug

    debug.debug_flags.add("hpss")

That's not the neatest option, but should help reduce the confusion about what's logging where and adds information about what the smart server is up to.

Can you help with this problem?

Provide an answer of your own, or ask nataly nanda huanca patzi for more information if necessary.

To post a message you must log in.