Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to determine HOME directory after trying.... #29

Open
epicwhale opened this issue May 29, 2014 · 8 comments
Open

Failed to determine HOME directory after trying.... #29

epicwhale opened this issue May 29, 2014 · 8 comments

Comments

@epicwhale
Copy link

I am getting a bunch of Failed to determine HOME directory after trying "sh: 1: cd: can't cd to ~" (exit code 2) in my error logs.

Seems to be originating from sdk.class.php at Line 1484. Is this something to do with the way the Bundle configures amazon's sdk configuration?

@epicwhale
Copy link
Author

@epicwhale
Copy link
Author

After debugging this further, I verified that I have disable_auto_config set to true.

This issue seems to be happening while running sf2 in production mode only. The constant AWS_DISABLE_CONFIG_AUTO_DISCOVERY is not set to true in production for some reason.

@mbadolato
Copy link
Contributor

Have you tried clearing your production cache? If it's only doing it there, that may be the source of the issue.

@epicwhale
Copy link
Author

@mbadolato Yes. Cleared the cache for sure. Happening on production server (every deployment is a fresh new directory).

Locally cleared cache and in one of my console commands with --env=prod, I am dumping the value of AWS_DISABLE_CONFIG_AUTO_DISCOVERY and its false... where as in dev, it is true.

Somehow, the logic that's at https://github.com/Cybernox/AmazonWebServicesBundle/blob/fd721e092188707c9fa3902619331b0b77f15e1e/DependencyInjection/CybernoxAmazonWebServicesExtension.php#L41 does not seem to trigger in production.

@mbadolato mbadolato reopened this May 29, 2014
@mbadolato
Copy link
Contributor

Is it possible you're using different version of PHP in prod and dev, or that you have different ini settings in prod that could be preventing it?

What about the disable_auto_config setting in your parameters.yml file?

@epicwhale
Copy link
Author

I am not using different versions of PHP for sure, but if I am, how would that affect it?

Secondly, the config value for disable_auto_config is hard-coded into config.yml (which is in our code repository and used uniformly across)

config.yml

# Amazon Web Services Configuration
cybernox_amazon_web_services:
    key:                        %aws_key%
    secret:                     %aws_secret%
    account_id:                 %aws_account_id%
    canonical_id:               %aws_canonical_id%
    canonical_name:             %aws_canonical_name%
    mfa_serial:                 %aws_mfa_serial%
    cloudfront_keypair:         %aws_cloudfront_keypair%
    cloudfront_pem:             %aws_cloudfront_pem%
    default_cache_config:       apc
    enable_extensions:          []
    certificate_authority:      false
    disable_auto_config:        true

So that rules out any parameters.yml override.

Still debugging other possible reasons or any room for silly mistakes. Will let u know if I find out.. But I'm mostly sure that I've ruled out the configuration reasons.

Did a full text search of disable_auto_config string within project code too.

@mbadolato
Copy link
Contributor

The php version comment was more of a guess. Seeing as they've been known to completely change things between versions, you never know.

I'm at a loss for why that wouldn't be hitting, other than possibly something in php.ini (or some other environmental reason) preventing it from being set. That portion of code was something submitted by another developer, so I'm not familiar with it. In fact, I'm not even using this library myself anymore, since we removed AWS from the project it was built for... :)

@wellsjo
Copy link
Contributor

wellsjo commented Feb 19, 2015

hey guys, I realize this is an old thread at this point, but I fixed the issue in this pull request

https://github.com/Cybernox/AmazonWebServicesBundle/pull/34/files

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

No branches or pull requests

3 participants