Skip to content

Fixed wrong agent forwarding implementation (fixes #393) - #428

Merged
oanhnn merged 1 commit into
deployphp:masterfrom
dbalabka:forward-agent
Aug 14, 2015
Merged

Fixed wrong agent forwarding implementation (fixes #393)#428
oanhnn merged 1 commit into
deployphp:masterfrom
dbalabka:forward-agent

Conversation

@dbalabka

Copy link
Copy Markdown
Contributor

No description provided.

oanhnn pushed a commit that referenced this pull request Aug 14, 2015
Fixed wrong agent forwarding implementation (fixes #393)
@oanhnn
oanhnn merged commit 50b5070 into deployphp:master Aug 14, 2015
@oanhnn

oanhnn commented Aug 14, 2015

Copy link
Copy Markdown
Contributor

Thank you! 👍

@vanquang9387

Copy link
Copy Markdown
Contributor

👍

@AlexStansfield

Copy link
Copy Markdown
Contributor

The new phpseclib has broken git clones for me. I'm using pemfiles for auth.

Everything was fine with deployer/phpseclib:1.0.0 but now git clone produces empty directory.

I switched to 3.0.7 and downgraded phpseclib back to 1.0.0 and everything works fine again.

@dbalabka

Copy link
Copy Markdown
Contributor Author

@AlexStansfield I will look at this problem ASAP. I guess problem is in phpseclib because of BC breaks. It's a pity that there are no test for this case in deployer.

@AlexStansfield

Copy link
Copy Markdown
Contributor

@torinaki thanks. I'm not sure what's going on I even built a version that didn't suppress git messages to see if it was at least giving me some useful output. Absolutely nothing. I'd imagine there are some pretty big changes between phpseclib 1.0.0 and 2.0.0 and something there has really messed things up for me.

@dbalabka

Copy link
Copy Markdown
Contributor Author

@AlexStansfield I can say, that deployer already have used 2.0.0 version of phpseclib. The the tag v1.0.0 was created in deployphp/phpseclib incorrecly. So my changes was only updated the 2.0 version till lastes minor version
After quick investigation I have found that your issue may be related to timeout. Can you please tell me are you using timeout in your deployment task, and what value of timeout your are using?

@AlexStansfield

Copy link
Copy Markdown
Contributor

@torinaki actually v1.0.0 fork on deployer is from february 22nd. There have been many changes in phpseclib since then.

https://github.com/deployphp/phpseclib/commits/v1.0.0
https://github.com/phpseclib/phpseclib/commits/master?page=9

@AlexStansfield

Copy link
Copy Markdown
Contributor

As for timeout. it consistently fails with v2.0.0 from phpspeclib and consistently works with v1.0.0 from deployer. And it only takes about 5 seconds to do the git clone. I'm not setting any timeout myself.

Also it's not the clone that causes the deployer to fail. It's not until it tries to create a symlink to a shared file in a directory that doesn't exist (as it wasn't cloned by git) that an error is triggered.

@dbalabka

Copy link
Copy Markdown
Contributor Author

@AlexStansfield is this reproduceble with this fix:
176ca98
Please try with a latest deployer.
If it will still exists I will prepare PR to rollback phpseclib

Actual changes here:
phpseclib/phpseclib@b061cba...2.0
Yes, I know there are a lot changes, but in actual for deployer classes(RSA and SSH2) there are not so many.

@AlexStansfield

Copy link
Copy Markdown
Contributor

Sorry I had left work.

That fix breaks it more. When trying to connect to the server I get:

PHP Notice: Cannot connect to stage.ourserver.com:22. Error 60. Operation timed out in phar:///Users/alex/Dev/Source/deployer/deployer.phar/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 1011

But replacing the timeout with with a high enough number (3600) did the trick.

Thanks

@antonmedv

Copy link
Copy Markdown
Member

@AlexStansfield does it work now with 3.0.8?

@AlexStansfield

Copy link
Copy Markdown
Contributor

@Elfet no, same error as mentioned above. I have to replace PHP_INT_MAX with something less huge.

I mentioned it on #429

@dbalabka

Copy link
Copy Markdown
Contributor Author

Really strange, because exactly same error I have notice when timeout was 0. @AlexStansfield how and where did you change that timeout? What PHP version you use?
Anyway 3600=1h timeout should be enough for most tasks, so if this fix your issue we can change it. I guess it may be related to fsockopen somehow.
Sorry, but please twice-check your version of deployer, to be sure that you are using right version.

@AlexStansfield

Copy link
Copy Markdown
Contributor

I took the 3.0.7 source and added PHP_INT_MAX as you suggested, it gave me that error. I then downloaded the 3.0.8 phar file and tried with no modifications and it gave me that error.

Alexs-MBP:~ alex$ php --version
PHP 5.5.26 (cli) (built: Jun 12 2015 08:17:31) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans

@dbalabka

Copy link
Copy Markdown
Contributor Author

@AlexStansfield please upgrade till latest version 3.0.9. Fix already in master

@AlexStansfield

Copy link
Copy Markdown
Contributor

Yep that fixed it, cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants