easyengine icon indicating copy to clipboard operation
easyengine copied to clipboard

STDERR: the input device is not a TTY

Open tareq1988 opened this issue 6 years ago • 10 comments

I’m trying to create a site remotely (via php) ee site create example.com --type=wp, but it’s failing because of STDERR: the input device is not a TTY error. Ref

ee.DEBUG: -----------------------
ee.INFO: Downloading and configuring WordPress.
ee.DEBUG: -----------------------
ee.DEBUG: COMMAND: docker-compose exec --user=root php chown -R www-data: /var/www/
ee.DEBUG: STDERR: the input device is not a TTY
ee.DEBUG: RETURN CODE: 1
ee.DEBUG: -----------------------
ee.DEBUG: -----------------------
ee.DEBUG: COMMAND: docker-compose exec --user='www-data' php wp core download --path=/var/www/htdocs --locale='en_US'
ee.DEBUG: STDERR: the input device is not a TTY
ee.DEBUG: RETURN CODE: 1
ee.DEBUG: -----------------------
ee.ERROR: Unable to download wp core.
ee.DEBUG: -----------------------

tareq1988 avatar Feb 25 '19 17:02 tareq1988

@mrrobot47 We need to detect if EasyEngine is running inside tty or not(for example via a ssh connection) and add the -T flag to docker-compose commands.

mbtamuli avatar Feb 26 '19 18:02 mbtamuli

I’m trying to create a site remotely (via php)

@tareq1988 I'm assuming you might be using something like ssh [email protected] 'ee site create example.com ...'. If that's the case, then until the bug is fixed, you can pass -t flag to ssh. i.e. ssh -t [email protected] 'ee site create example.com ...'.

-t will allocate TTY hence docker will not complain about it.

kirtangajjar avatar Mar 07 '19 12:03 kirtangajjar

I'm using phpseclib to create the site remotely from an API and I couldn't yet find a way to pass the -t flag.

When do you guys think will be able push a fix?

tareq1988 avatar Mar 07 '19 13:03 tareq1988

@tareq1988 Since this issue is an edge case and not something that everyone would encounter, I'll classify it as a low priority issue; Hence, I won't be able to give you a timeframe for a fix.

If you're interested in following developments on this issue, you can subscribe to this issue.

kirtangajjar avatar Mar 08 '19 11:03 kirtangajjar

Currently solved this via export COMPOSE_INTERACTIVE_NO_CLI=1;

tareq1988 avatar Mar 14 '19 12:03 tareq1988

Currently solved this via export COMPOSE_INTERACTIVE_NO_CLI=1;

@tareq1988 can you please share, where have you executed the export command? The path, i mean.

mobber007 avatar Jun 26 '19 21:06 mobber007

I've used like this export COMPOSE_INTERACTIVE_NO_CLI=1; ee site create example.com --type=wp

tareq1988 avatar Jun 28 '19 12:06 tareq1988

Was not able to fix with export COMPOSE_INTERACTIVE_NO_CLI=1; in no way whatsoever . A dirty workaround i've found was: script -q -c "ee site create example.com --type=wp" /dev/null | cat , "tricking" ee to see a tty.

mobber007 avatar Jun 29 '19 19:06 mobber007

Hi,

There is an approach for this? If not, I would like to contribute for this issue.

moige01 avatar Nov 22 '19 13:11 moige01

I'm getting the same error but I think due to an earlier failure. The site in question was deleted and recreated multiple times for unrelated reasons, then I started getting this error when trying to recreate it. See attached logs and the script that produced the stdout and stderr. I've tried the above workarounds but to no avail. Creating a different site works, or deleting the entire installation and starting over, but I would prefer not to have to do that to fix this one site. The more sites I add the worse that would be.

eeb.zip .

downwa avatar Jan 26 '22 01:01 downwa