Re: misc/157499: fetch confused me with it's error message
The following reply was made to PR misc/157499; it has been noted by GNATS. From: Jaakko Heinonen j...@freebsd.org To: Konstantin konstantin.ma...@kaspersky.com Cc: bug-follo...@freebsd.org Subject: Re: misc/157499: fetch confused me with it's error message Date: Thu, 2 Jun 2011 11:01:22 +0300 On 2011-06-01, Konstantin wrote: I have found out some strange error handling in /usr/bin/fetch. Here it is: # fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz: Syntax error, command unrecognized USER anonymous 331 Please specify the password. PASS r...@h-ksn-hkg-fe-2.kaspersky-labs.com 500 OOPS: cannot change directory:/home/ftp fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz: Syntax error, command unrecognized This is how reply code 500 is defined in RFC 959: 500Syntax error, command unrecognized. This may include errors such as command line too long. -- Jaakko ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to freebsd-bugs-unsubscr...@freebsd.org
RE: misc/157499: fetch confused me with it's error message
The following reply was made to PR bin/157499; it has been noted by GNATS. From: Konstantin Malov konstantin.ma...@kaspersky.com To: Jaakko Heinonen j...@freebsd.org Cc: bug-follo...@freebsd.org bug-follo...@freebsd.org Subject: RE: misc/157499: fetch confused me with it's error message Date: Thu, 2 Jun 2011 12:48:07 +0400 I agree with this. So real problem is that this error message 'Syntax error, command unrecogni= zed' appears with warnx function:=20 warnx(%s: %s, URL, fetchLastErrString);=20 There are three such places in fetch.c where warnx is used without addition= al information about error cause. I don't know what to add in this place:=20 402 /* set the protocol timeout. */ 403 fetchTimeout =3D timeout; 404 405 /* just print size */ 406 if (s_flag) { 407 if (timeout) 408 alarm(timeout); 409 r =3D fetchStat(url, us, flags); 410 if (timeout) 411 alarm(0); 412 if (sigalrm || sigint) 413 goto signal; 414 if (r =3D=3D -1) { 415 warnx(%s, fetchLastErrString); 416 goto failure; 417 } 418 if (us.size =3D=3D -1) 419 printf(Unknown\n); 420 else 421 printf(%jd\n, (intmax_t)us.size); 422 goto success; 423 } But for last two I can suggest this patch:=20 --- fetch.c.orig2011-06-02 12:06:26.0 +0400 +++ fetch.c 2011-06-02 12:28:25.0 +0400 @@ -463,7 +463,7 @@ if (sigalrm || sigint) goto signal; if (f =3D=3D NULL) { - warnx(%s: %s, URL, fetchLastErrString); + warnx(data fetch from '%s' failed with error: %s, URL, fe= tchLastErrString); if (i_flag strcmp(url-scheme, SCHEME_HTTP) =3D=3D 0 fetchLastErrCode =3D=3D FETCH_OK strcmp(fetchLastErrString, Not Modified) =3D=3D 0)= { @@ -574,7 +574,7 @@ */ url-offset =3D 0; if ((f =3D fetchXGet(url, us, flags)) =3D=3D NULL)= { - warnx(%s: %s, URL, fetchLastErrString); + warnx(data fetch from '%s' failed with err= or: %s, URL, fetchLastErrString); goto failure; } if (sigint) -Original Message- From: Jaakko Heinonen [mailto:j...@freebsd.org]=20 Sent: Thursday, June 02, 2011 12:01 PM To: Konstantin Malov Cc: bug-follo...@freebsd.org Subject: Re: misc/157499: fetch confused me with it's error message On 2011-06-01, Konstantin wrote: I have found out some strange error handling in /usr/bin/fetch. Here it is:=20 =20 # fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz: Syntax= error, command unrecognized USER anonymous 331 Please specify the password. PASS r...@h-ksn-hkg-fe-2.kaspersky-labs.com 500 OOPS: cannot change directory:/home/ftp fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz: Synta= x error, command unrecognized This is how reply code 500 is defined in RFC 959: 500Syntax error, command unrecognized. This may include errors such as command line too long. --=20 Jaakko ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to freebsd-bugs-unsubscr...@freebsd.org
misc/157499: fetch confused me with it's error message
Number: 157499 Category: misc Synopsis: fetch confused me with it's error message Confidential: no Severity: non-critical Priority: low Responsible:freebsd-bugs State: open Quarter: Keywords: Date-Required: Class: sw-bug Submitter-Id: current-users Arrival-Date: Wed Jun 01 14:20:05 UTC 2011 Closed-Date: Last-Modified: Originator: Konstantin Release:8.2-RELEASE/7.3-RELEASE Organization: Kaspersky Lab Environment: FreeBSD ourhost.kaspersky.com 7.3-RELEASE-p3 FreeBSD 7.3-RELEASE-p3 #0: Tue Sep 21 18:03:17 MSD 2010 r...@ourhost.kaspersky.com:/usr/obj/usr/src/sys/GENERIC amd64 Description: I have found out some strange error handling in /usr/bin/fetch. Here it is: # fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz: Syntax error, command unrecognized So it's very confusing error message. With some extra debug it looks more clear: # fetch -vvv ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz scheme: [ftp] user: [] password: [] host: [ftp.freebsd.org] port: [0] document: [/pub/FreeBSD/ports/ports/ports.tar.gz] --- ftp.freebsd.org:21 looking up ftp.freebsd.org connecting to ftp.freebsd.org:21 220 Welcome to freebsd.isc.org. How-To-Repeat: Fix: Release-Note: Audit-Trail: Unformatted: USER anonymous 331 Please specify the password. PASS r...@h-ksn-hkg-fe-2.kaspersky-labs.com 500 OOPS: cannot change directory:/home/ftp fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz: Syntax error, command unrecognized # host ftp.freebsd.org ftp.freebsd.org has address 204.152.184.73 ftp.freebsd.org has address 87.51.34.132 ftp.freebsd.org has address 149.20.64.73 ftp.freebsd.org has IPv6 address 2001:4f8:0:2::e ftp.freebsd.org has IPv6 address 2001:6c8:2:600::132 Actually this problem exists only with 204.152.184.73 server. See ftp connect to it: # ftp ftp open ftp.freebsd.org Trying 204.152.184.73... Connected to ftp.freebsd.org. 220 Welcome to freebsd.isc.org. Name (ftp.freebsd.org:root): ftp 331 Please specify the password. Password: 500 OOPS: cannot change directory:/home/ftp ftp: Login failed. ftp exit 500 OOPS: priv_sock_get_cmd I don't know why fetch on 7.3 sticked to this server and I had error 'Syntax error, command unrecognized' every time I run fetch. It could be some problem in DNS resolving algorithm on 7.3. On 8.2 fetch works with different servers, so I had this error n ot very often. Anyway, error message 'Syntax error, command unrecognized' on some FTP problems sounds very confusing for me. ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to freebsd-bugs-unsubscr...@freebsd.org