FTP push does not work without specifying password

Bug #164567 reported by Jorgen Bodde
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Vincent Ladeuil

Bug Description

In Ubuntu Gutsy, I try to push my repository to my FTP site with;

bzr push ftp://<email address hidden>/home/.5b/j/jorgb/WWW/bzr/cvl/

BZR waits a while (not even prompting for a password), then chokes with this dump:

--------------------------
jorg@shale:~/versioned-src/cvl$ bzr push
Using saved location: ftp://<email address hidden>/home/.5b/j/jorgb/WWW/bzr/cvl/
bzr: ERROR: socket.gaierror: (-2, 'Name or service not known')

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 817, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 779, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 477, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 718, in run
    dir_to = bzrdir.BzrDir.open_from_transport(to_transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 568, in open_from_transport
    redirected)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1505, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 545, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1249, in find_format
    return format.probe_transport(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1259, in probe_transport
    format_string = transport.get(".bzr/branch-format").read()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/ftp.py", line 236, in get
    f = self._get_FTP()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/ftp.py", line 104, in _get_FTP
    connection, credentials = self._create_connection()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/ftp.py", line 129, in _create_connection
    connection.connect(host=self._host, port=self._port)
  File "ftplib.py", line 117, in connect
    for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')

bzr 0.90.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'push']

** please send this report to <email address hidden>
--------------------------

Strangely, when I enter my password on the command line like;

 bzr push ftp://jorgb:{PASSWORD}@ftp.xs4all.nl/home/.5b/j/jorgb/WWW/bzr/cvl/
FTP <email address hidden> password:
Pushed up to revision 12.

It goes on but still prompts for my password! It looks like it tries to use my login account name 'jorg' which is not similar to my ftp user name 'jorgb'.
I use BZR also under Windows XP, and this mechanism works there without problems.

With regards,
- Jorgen

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 164567] FTP push does not work without specifying password

On Thu, 2007-11-22 at 20:08 +0000, Jorgen Bodde wrote:
> Public bug reported:
>
> In Ubuntu Gutsy, I try to push my repository to my FTP site with;
>
> bzr push ftp://<email address hidden>/home/.5b/j/jorgb/WWW/bzr/cvl/
>
> BZR waits a while (not even prompting for a password), then chokes with
> this dump:
>
> --------------------------
> jorg@shale:~/versioned-src/cvl$ bzr push
> Using saved location: ftp://<email address hidden>/home/.5b/j/jorgb/WWW/bzr/cvl/
> bzr: ERROR: socket.gaierror: (-2, 'Name or service not known')

This means that your host cannot be resolved. Can you ping
ftp.xs4all.nl from that machine?

Thanks,

James

Revision history for this message
Vincent Ladeuil (vila) wrote :

I think you encounter two different problems here:

1) You had a transient dns resolution failure (Name or service not known), bzr should handle that more gracefully than giving you a back trace

2) You use version 0.90, later versions include a fix for bug #137044 related to ftp passwords

Changed in bzr:
assignee: nobody → v-ladeuil
importance: Undecided → Medium
milestone: none → 1.0rc1
status: New → Triaged
Revision history for this message
Jorgen Bodde (jorgb) wrote :

Hi James,

yes I can ping my provider. there is no problem accessing other websites either. As you can see I can continue when I pass a password along with the FTP URI, but without it seems to stall.

Hi Vila,

I will try to update to 0.92 and see if that will work. Right now I am under Vista using 0.92 and like I said there is no problem there.

With regards,
- Jorgen

Revision history for this message
Vincent Ladeuil (vila) wrote : Re: [Bug 164567] Re: FTP push does not work without specifying password

>>>>> "Jorgen" == Jorgen Bodde <email address hidden> writes:

    Jorgen> Hi James,
    Jorgen> yes I can ping my provider. there is no problem accessing other websites
    Jorgen> either. As you can see I can continue when I pass a password along with
    Jorgen> the FTP URI, but without it seems to stall.

That's why I talked about a *transient* error, by the time you
try to ping, the error is gone. But bzr should not gives you a
traceback, it should tell you that it can't reach that host at
that moment so that you can just retry.

ftp support should also be enhanced to cope with such transient
errors, but that's another bug.

Revision history for this message
Vincent Ladeuil (vila) wrote :

The attached patch provides an error message instead of a traceback on connection errors.

Changed in bzr:
status: Triaged → Fix Committed
Revision history for this message
John A Meinel (jameinel) wrote :

merged in as bzr.dev 3025

Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.