Return-Path: Delivered-To: apmail-incubator-ivy-user-archive@locus.apache.org Received: (qmail 13938 invoked from network); 28 Nov 2007 21:55:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2007 21:55:32 -0000 Received: (qmail 33637 invoked by uid 500); 28 Nov 2007 21:55:19 -0000 Delivered-To: apmail-incubator-ivy-user-archive@incubator.apache.org Received: (qmail 33616 invoked by uid 500); 28 Nov 2007 21:55:19 -0000 Mailing-List: contact ivy-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ivy-user@incubator.apache.org Delivered-To: mailing list ivy-user@incubator.apache.org Received: (qmail 33605 invoked by uid 99); 28 Nov 2007 21:55:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 13:55:19 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [207.71.50.169] (HELO mail.zilliant.com) (207.71.50.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 21:54:59 +0000 Received: from prodmail2.austx.zilliant.com ([192.168.141.35]) by prodmail3.austx.zilliant.com ([192.168.141.64]) with mapi; Wed, 28 Nov 2007 15:55:00 -0600 From: "Hilton, Chris" To: "ivy-user@incubator.apache.org" Date: Wed, 28 Nov 2007 15:54:59 -0600 Subject: RE: Problem grabbing updated artifacts Thread-Topic: Problem grabbing updated artifacts Thread-Index: AcgwkBZMsohjcRLxR3ezsr9rgH9ZywBawtdA Message-ID: <7FE5E452E16A8D4186AAD00EE4532047042AA593A7@prodmail2.austx.zilliant.com> References: <7FE5E452E16A8D4186AAD00EE4532047042AA58E14@prodmail2.austx.zilliant.com> <635a05060711210946k29268755wfbe5c1c97094ccd7@mail.gmail.com> <7FE5E452E16A8D4186AAD00EE4532047042AA58EAF@prodmail2.austx.zilliant.com> <635a05060711211027r7ccba0c6h1e25b1b5b5c6d86c@mail.gmail.com> <7FE5E452E16A8D4186AAD00EE4532047042AA58EB1@prodmail2.austx.zilliant.com> <635a05060711211100g47597c19x57c1db7f64f3aa02@mail.gmail.com> <7FE5E452E16A8D4186AAD00EE4532047042AA5910D@prodmail2.austx.zilliant.com> <635a05060711261651l6f7c9d73lf97a6a54052d9f59@mail.gmail.com> In-Reply-To: <635a05060711261651l6f7c9d73lf97a6a54052d9f59@mail.gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Well, I seem to have hit upon the issue after some debugging. When I get to= the offending conditional, here are my variable values: repLastModified: 1196271408 cacheLastModified: 1194477984933 Guess that shows why the cache version is preferred. Further debugging foun= d that the lastModified value for the cached version of the ivy file I'm ha= ving problems with comes from the URLConnection class which returns the las= t modified time in number of milliseconds [1], whereas the parseTLine() in = the Scp class is returning last modified time in number of seconds. For further info, I watched the above variables as I had Ivy resolve a proj= ect with dependencies on 44 different projects. Of those, 36 performed seco= nd-to-second comparisons and 8 performed erroneous second-to-millisecond co= mparisons. I'm not sure what's causing it, but it doesn't look like the SSH resolver i= s reliable for checking updated ivy files at the moment. I'll try a differe= nt resolver and see if I get better results. Chris [1] http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLConnection.html#get= LastModified() > -----Original Message----- > From: Xavier Hanin [mailto:xavier.hanin@gmail.com] > Sent: Monday, 26 November, 2007 18:52 > To: ivy-user@incubator.apache.org > Subject: Re: Problem grabbing updated artifacts > > I really think the problem comes from the timestamp, the isDefault return > true only if the module descriptor was not found and generated in memory > by > Ivy from the artifact only. In your case I think the problem comes from a= n > incompatibility with cygwin SSH, but I won't be of much help to track the > problem down. Try debugging with a debugger and follow step by step what'= s > going on in the SSHResolver. > > Xavier > > On Nov 27, 2007 1:05 AM, Hilton, Chris wrote: > > > I'm using the Cygwin SSH server. I looked through the code from your > link > > below to see what it expects from the SSH server and thought it might b= e > a > > problem with parseTLine() in the Scp class, but I get the following whe= n > I > > run a debugging command against the SSH server: > > > > $ scp -p -v chilton@localhost > > :/cygdrive/c/temp/ftp/repository/zilliant/policymg > > t_campaignmanager_swingui/6.5.0.0/ivy.xml . > > Executing: program /usr/bin/ssh host localhost, user chilton, command > scp > > -v -p > > -f > > > /cygdrive/c/temp/ftp/repository/zilliant/policymgt_campaignmanager_swingu= i > /6. > > 5.0.0/ivy.xml > > OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007 > > debug1: Reading configuration data /etc/ssh_config > > debug1: Connecting to localhost [127.0.0.1] port 22. > > debug1: Connection established. > > debug1: identity file /cygdrive/u/.ssh/identity type -1 > > debug1: identity file /cygdrive/u/.ssh/id_rsa type -1 > > debug1: identity file /cygdrive/u/.ssh/id_dsa type -1 > > debug1: Remote protocol version 2.0, remote software version OpenSSH_4.= 7 > > debug1: match: OpenSSH_4.7 pat OpenSSH* > > debug1: Enabling compatibility mode for protocol 2.0 > > debug1: Local version string SSH-2.0-OpenSSH_4.7 > > debug1: SSH2_MSG_KEXINIT sent > > debug1: SSH2_MSG_KEXINIT received > > debug1: kex: server->client aes128-cbc hmac-md5 none > > debug1: kex: client->server aes128-cbc hmac-md5 none > > debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent > > debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP > > debug1: SSH2_MSG_KEX_DH_GEX_INIT sent > > debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY > > debug1: Host 'localhost' is known and matches the RSA host key. > > debug1: Found key in /cygdrive/u/.ssh/known_hosts:3 > > debug1: ssh_rsa_verify: signature correct > > debug1: SSH2_MSG_NEWKEYS sent > > debug1: expecting SSH2_MSG_NEWKEYS > > debug1: SSH2_MSG_NEWKEYS received > > debug1: SSH2_MSG_SERVICE_REQUEST sent > > debug1: SSH2_MSG_SERVICE_ACCEPT received > > debug1: Authentications that can continue: > > publickey,password,keyboard-interacti > > ve > > debug1: Next authentication method: publickey > > debug1: Trying private key: /cygdrive/u/.ssh/identity > > debug1: Trying private key: /cygdrive/u/.ssh/id_rsa > > debug1: Trying private key: /cygdrive/u/.ssh/id_dsa > > debug1: Next authentication method: keyboard-interactive > > debug1: Authentications that can continue: > > publickey,password,keyboard-interacti > > ve > > debug1: Next authentication method: password > > chilton@localhost's password: > > debug1: Authentication succeeded (password). > > debug1: channel 0: new [client-session] > > debug1: Entering interactive session. > > debug1: Sending command: scp -v -p -f > > /cygdrive/c/temp/ftp/repository/zilliant/p > > olicymgt_campaignmanager_swingui/6.5.0.0/ivy.xml > > Could not chdir to home directory /cygdrive/u: No such file or director= y > > Sink: T1195587575 0 1196118721 0 > > Sending file modes: C0600 1843 ivy.xml > > Sink: C0600 1843 ivy.xml > > ivy.xml 100% 1843 1.8KB/s > > 00:00 > > debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 > > debug1: channel 0: free: client-session, nchannels 1 > > debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 1.9 seconds > > debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0 > > debug1: Exit status 0 > > > > You can see the "T" line above looks like what parseTLine() expects and > it > > has the correct last modified timestamp (a Nov. 20 date, more recent > than > > the Nov. 7 date in the cache). So it seems to me that either that date > isn't > > getting down to the "not updated" comparison you pointed out in > > BasicResolver, or it could be the other part of the conditional > > (!rmr.getDescriptor().isDefault()) is evaluating to true. What do you > think? > > Is there something I can check for that conditional part? > > > > Chris > > > > > -----Original Message----- > > > From: Xavier Hanin [mailto:xavier.hanin@gmail.com] > > > Sent: Wednesday, 21 November, 2007 13:01 > > > To: ivy-user@incubator.apache.org > > > Subject: Re: Problem grabbing updated artifacts > > > > > > According to the code [1] and your debug trace("not updated"), Ivy > finds > > a > > > last modified time stamp in the repository which is older than cache > > one. > > > So > > > it seems your problem comes from the SSH repository implementation. > > Which > > > SSH server are you using? Maybe its a problem of incompatibility with > > the > > > library we use... I suggest trying with another SSH server, and maybe > > also > > > trying with a simple filesystem resolver to see if it's related to SS= H > > or > > > a > > > more general problem. > > > > > > Xavier > > > > > > [1] > > > > > > https://svn.apache.org/repos/asf/incubator/ivy/core/tags/1.4.1/src/java/f= r > > > /jayasoft/ivy/resolver/BasicResolver.java > > > > > > On Nov 21, 2007 7:33 PM, Hilton, Chris > > wrote: > > > > > > > > Yes, this is very strange. Which version of Ivy do you use? > > > > > > > > 1.4.1. > > > > > > > > Chris > > > > > > > > > > > > > > > > -- > > > Xavier Hanin - Independent Java Consultant > > > http://xhab.blogspot.com/ > > > http://ant.apache.org/ivy/ > > > http://www.xoocode.org/ > > > > > > -- > Xavier Hanin - Independent Java Consultant > http://xhab.blogspot.com/ > http://ant.apache.org/ivy/ > http://www.xoocode.org/