How to serve bzr files from Windows?

Asked by Jerry McRae

I am new to Bazaar. I installed the standalone 1.8 setup (lite) and tried it out.

It looks like what I need, so I try the server commands and (contrary to what I read) the installer didn't include the necessary Paramiko. So I install the win32-py24 version and try to follow all the dependencies from the BzrWin32Installer page. But after searching and reading everything I can find, I still cannot figure out how to access my repository from another machine.

I am running WinXP home at home, and WinXP pro at different work sites. I assume (should I) that the necessary servers will just work on the Linux boxes I work with.

I follow the examples up until there is a server or push command to a url. Then it _always_ tells me that it cannot access port such and such. Since version control won't do me much good if I cannot read/write from somewhere else, I need to figure this out. I searched all over the place and everyone else seems to know what to do or there program just works, and I cannot find any troubleshooting or help for this subject.

I assume I need some kind of server setup outside of bazaar, but I have no idea how or what that is. I know what my home IP is and I don't have any problems changing my firewall, forwarding ports, or configuring services.

What do I need to run in Windows to access my repositories remotely?
Sub questions?
 - How to I keep it secure?
 - does it store a second copy of all my files somewhere on the server? or will it just point to all the various VC'ed folders?

Sorry to be so dense (again!). Can someone help me with these questions?

-Anita

Question information

Language:
English Edit question
Status:
Expired
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jerry McRae (j3ry) said :
#1

The server starts almost immediately on my Linux box at work, but on Windows, I get undecipherable errors. The source gives no clues (to me) I have stuff I would like to serve from home, not work. I have read everything on the bazaar site with 'server', and searched for the error on the web. I seem to be the only one getting this error. I've checked and the port is open (openports.exe). I've tried with several installs and on multiple Win XP (SP1) boxes. Does it magically work for everyone else like on Linux? What could possibly be my problem? Even a clue?

*****************
Using bzr installed on Python 2.4. It doesn't matter what I provide as parameters or switches
+>bzr server
bzr: ERROR: socket.gaierror: (10022, 'getaddrinfo failed')

Traceback (most recent call last):
  File "C:\Python24\Lib\site-packages\bzrlib\commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "C:\Python24\Lib\site-packages\bzrlib\commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "C:\Python24\Lib\site-packages\bzrlib\commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "C:\Python24\Lib\site-packages\bzrlib\builtins.py", line 3922, in run
    smart_server = server.SmartTCPServer(t, host=host, port=port)
  File "C:\Python24\Lib\site-packages\bzrlib\smart\server.py", line 66, in __init__
    socket.SOCK_STREAM, 0, socket.AI_PASSIVE)[0]
gaierror: (10022, 'getaddrinfo failed')

bzr 1.8 on python 2.4.4 (win32)
arguments: ['C:\\Python24\\Scripts\\bzr', 'server']

************
Using setup-lite 1.8rc1
C:\data\VCS\bzrtest>bzr server --directory=.
bzr: ERROR: socket.gaierror: (10022, 'getaddrinfo failed')

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 849, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 795, in run_bzr
  File "bzrlib\commands.pyo", line 495, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 3922, in run
  File "bzrlib\smart\server.pyo", line 66, in __init__
gaierror: (10022, 'getaddrinfo failed')

bzr 1.8rc1 on python 2.5.2 (win32)
arguments: ['bzr', 'server', '--directory=.']
encoding: 'cp1252', fsenc: 'mbcs', lang: None

****push tests - obviously won't work without a server, but I tried.
***** push test, "lite" install:
C:\data\VCS\bzrtest\xxx\testtrunk>bzr push sftp://centralhost/srv/bzr/xxx/testtrunk
bzr: ERROR: Unsupported protocol for url "sftp://centralhost/srv/bzr/xxx/testtrunk": Unable to import paramiko (required for sftp support): No module named paramiko
***** push test, Python 2.4:
C:\temp\ezi\myproject>bzr push sftp://centralhost/srv/bzr/xxx/testtrunk
bzr: ERROR: Unable to connect to SSH host centralhost; (11001, 'getaddrinfo failed')

C:\temp\ezi\myproject>bzr push sftp://localhost/srv/bzr/xxx/testtrunk
bzr: ERROR: Unable to connect to SSH host localhost; (10061, 'Connection refused')

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

Hi Anita,

You don't need to run a server on your Windows machine unless you want to be able to access it from other places. Even then, if you want to access it over the internet running an ssh server is much more secure and appropriate. You don't need to run a server to be able to push _from_ or pull _onto_ that machine.

The getaddrinfo failure is strange; I wonder if there is a problem with the network configuration on that machine. It's probably trying to look up an address like "127.0.0.1:4155" and that should not fail.

> bzr: ERROR: Unable to connect to SSH host centralhost; (11001, 'getaddrinfo failed')

This means we could not look up the ip address of 'centralhost'. What happens if you try typing 'ping centralhost' on the command line?

> bzr push sftp://localhost/srv/bzr/xxx/testtrunk

This is not surprising as you have no ssh server running on your Windows machine.

Revision history for this message
Jerry McRae (j3ry) said :
#3

Martin, Thanks for the quick reply.

>You don't need to run a server on your Windows machine unless you want to be able to access it from other places
That's just what I need to do. For several programs, scripts, and configuration files I want to be able to access them from anywhere.

> Even then, if you want to access it over the internet running an ssh server is much more secure and appropriate.
Yes, I want it secure. Can you point me to somewhere I learn about running an ssh server? I have no problem adding startup items, or to add services and modify the registry. I have Putty, does that help? I assume I would access from another machine in the format of the Linux scp command. Do I just search for any old Windows ssh server? I've never done this.

>You don't need to run a server to be able to push _from_ or pull _onto_ that machine.
I've done this on my network with "bzr push file://<computer name>/full/path/to/file. I would need a server for outside my network, yes?

>The getaddrinfo failure is strange; I wonder if there is a problem with the network configuration on that machine. It's probably trying to look up an address like "127.0.0.1:4155" and that should not fail.
The only thing slightly unusual is that I use static IPs internally. Other than that I haven't had any problems with any network clients or servers in years. I did (after some trial and error to get around the program swallowing stdout) print out the values on the error line (line 66 in smart/server.py). It doesn't seem right that the value for server is None. That means None was passed to the SmartTCPServer.
socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
values for socket.getaddrinfo( (None, 4155, 0, 1, 0, 1)

The help for the 'server' command shows there is an option for port, but none for server, which makes sense I guess. Does that give any clues about what I could try, or look for?

Thanks for your patience.

-A

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.