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

Chanllenge error with server letsencrypt, ok on stage #53

Closed
vinpel opened this issue Mar 21, 2017 · 3 comments
Closed

Chanllenge error with server letsencrypt, ok on stage #53

vinpel opened this issue Mar 21, 2017 · 3 comments
Labels

Comments

@vinpel
Copy link

vinpel commented Mar 21, 2017

Hello,

First thanks for the tools !

I've an error on my server (i've replaced real url with "exemple.com").

The same command /config work fine with the staging letsencrupt server.

When i try the the normale serveur i get the following error messsage :

What can cause that ? a missing package ?

The error :

Issuance for the following domains failed: exemple.com
Reason: exception 'Kelunik\Acme\AcmeException' with message 'Unexpected exit code (1) for ''/usr/bin/php' '/usr/bin/acme-client' 'issue' '--server' 'letsencrypt' '--storage' '/data/htdocs/letsencrypt_keys' '--domains' 'exemple.com' '--path' '/data/htdocs/acme' '--bits' '4096''.

    Providing payload at http://exemple.com/.well-known/acme-challenge/mHJsDyc9NzAijTjxWb7Iwq4y0BYxqgELYn5Hl_y_2v0
Socket connection failed before data could be fully written. This *may* have occurred because you're attempting to connect via HTTP when the remote server only supports encrypted HTTPS connections. Try your request using an https:// URI.
exception 'Kelunik\Acme\AcmeException' with message 'Issuance failed, not all challenges could be solved.' in phar:///usr/bin/acme-client/src/Commands/Issue.php:104



' in phar:///usr/bin/acme-client/src/Commands/Auto.php:239
Stack trace:
#0 [internal function]: Kelunik\AcmeClient\Commands\Auto::checkAndIssue(Array, 'letsencrypt', '/data/htdocs/le...')
#1 phar:///usr/bin/acme-client/vendor/amphp/amp/lib/functions.php(876): Generator->send(Object(stdClass))
#2 [internal function]: Amp\__coroutineSend(NULL, Object(stdClass), Object(Amp\CoroutineState))
#3 phar:///usr/bin/acme-client/vendor/amphp/amp/lib/Placeholder.php(91): call_user_func('Amp\\__coroutine...', NULL, Object(stdClass), Object(Amp\CoroutineState))
#4 phar:///usr/bin/acme-client/vendor/amphp/amp/lib/PrivatePromisor.php(20): Amp\PrivatePlaceholder->resolve(NULL, Object(stdClass))
#5 [internal function]: Amp\PrivatePlaceholder->Amp\{closure}(NULL, Object(stdClass))
#6 phar:///usr/bin/acme-client/vendor/amphp/amp/lib/PrivatePromisor.php(57): call_user_func(Object(Closure), NULL, Object(stdClass))
#7 phar:///usr/bin/acme-client/vendor/amphp/process/Process.php(106): Amp\Deferred->succeed(Object(stdClass))
#8 [internal function]: Amp\Process->Amp\{closure}('0000000046df489...', NULL)
#9 phar:///usr/bin/acme-client/vendor/amphp/amp/lib/NativeReactor.php(100): call_user_func(Object(Closure), '0000000046df489...', NULL)
#10 phar:///usr/bin/acme-client/vendor/amphp/amp/lib/NativeReactor.php(172): Amp\NativeReactor->tryImmediate(Object(stdClass))
#11 phar:///usr/bin/acme-client/vendor/amphp/amp/lib/NativeReactor.php(71): Amp\NativeReactor->doTick(false)
#12 phar:///usr/bin/acme-client/vendor/amphp/amp/lib/functions.php(46): Amp\NativeReactor->run(Object(Closure))
#13 phar:///usr/bin/acme-client/bin/acme(170): Amp\run(Object(Closure))
#14 /usr/bin/acme-client(2): include('phar:///usr/bin...')
#15 {main}

My command (after account creation) :

acme-client  auto -c /data/htdocs/myscript/acme-client.yml

acme-client.yml file :

# Storage directory for certificates and keys.
storage: /data/htdocs/letsencrypt_keys

# Server to use. URL to the ACME directory.
# "letsencrypt" and "letsencrypt:staging" are valid shortcuts.
server: letsencrypt

# E-mail to use for the setup.
# This e-mail will receive expiration notices from Let's Encrypt.
email: certificat-renew@exemple.com

# List of certificates to issue.
certificates:
    # For each certificate, there are a few options.
    #
    # Required: paths
    # Optional: bits, user
    #
    # paths: Map of document roots to domains. Maps each path to one or multiple
    #        domains. If one domain is given, it's automatically converted to an
    #        array. The first domain will be the common name.
    #
    #        The client will place a file into $path/.well-known/acme-challenge/
    #        to verify ownership to the CA
    #
    # bits:  Number of bits for the domain private key
    #
    # user:  User running the web server. Challenge files are world readable,
    #        but some servers might require to be owner of files they serve.
    #
    - bits: 4096
      paths:
        /data/htdocs/acme:
            - exemple.com
    # You can have multiple certificate with different users and key options.
    #- user: www-data
    # paths:
    #  /var/www: example.org
@kelunik
Copy link
Owner

kelunik commented Mar 21, 2017

I think this happens if the connection is reset before the HTTP client could send its request. Did you retry it?

@vinpel
Copy link
Author

vinpel commented Mar 31, 2017

it was a virtualhost error, sorry for the mess.

@vinpel vinpel closed this as completed Mar 31, 2017
@kelunik
Copy link
Owner

kelunik commented Mar 31, 2017

@vinpel Don't worry. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants