Error with no google hits

Please fill out the fields below so we can help you better.

My domain is: dev.permaculture.org.nz

I ran this command: certbot-auto certonly --webroot -w /var/www/db.permaculture.org.nz/public_html -d db.permaculture.org.nz

It produced this output:/usr/bin/certbot-auto: line 965: cannot create temp file for here-document: Invalid argument

Same error happens from certbot-auto renew

My operating system is (include version): CentOS 6.8

My web server is (include version): Apache 2.4

My hosting provider, if applicable, is:KGOVPS

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

Since this happened, I can’t browse to the dev. site (Firefox says it can’t authenticate server, drops connection) those certs are still valid (August 13) - the new cert is for phpMyAdmin

I’ve googled the above error message and come up blank. It sounds like a permissions issue, but where?

Well, looks like your complete webserver is offline. But I doubt that’s the fault of certbot-auto. I think you’re dealing with two different problems here: certbot-auto won’t run (why? No clue, more context of the error would be needed) and the fact your webserver is offline (we’d need error logs of your Apache to determine why that’s the case and if there’s a relation with Let’s Encrypt/certbot).

ok, the server is now running again - I restarted apache one more time this morning and all is good. There is nothing relevant in the error logs.

does “here-file” mean the .well-known directory? That has not been created for /var/www/db.permaculture.org.nz/ permissions are 755, just as with the other site-directories with certs.

Without the full output of certbot-auto it's very hard to determin that.

A “here document” in shell scripting jargon is input to a command provided in the body of the shell script itself, using the << syntax.

There are several uses of this feature in certbot-auto:

(search for “<<”)

The shell needs to create a temporary file for this data because it needs a place, in the Unix sense, to attach the input of the command to. “cannot create temp file for here-document” implies that for some reason when the shell tried to make a temporary file, it received the EINVAL error from the operating system.

I don’t know why that would happen and haven’t seen that happen before.

You could try to produce a smaller test case by running

cat << hello
hi
hello

at your shell prompt, and see if it succeeds.

The problem appears to have resolved itself now, in that Certbot-auto ran successfully. I still don’t have a certificate, but that’s a matter for a different thread.
I will ask, does it matter which directory you are in when you run certbot?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.