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

level="fatal" msg="cannot enable tty mode on non tty input" #913

Closed
pdxbmw opened this issue Jan 21, 2015 · 4 comments · Fixed by #914
Closed

level="fatal" msg="cannot enable tty mode on non tty input" #913

pdxbmw opened this issue Jan 21, 2015 · 4 comments · Fixed by #914

Comments

@pdxbmw
Copy link

pdxbmw commented Jan 21, 2015

The dokku run command executes the docker run command in interactive mode, which causes remote commands to terminate with the error:

level="fatal" msg="cannot enable tty mode on non tty input"

(I was trying to setup a cronjob to run nightly). The only way I could get this to work was to manually execute docker run without the -i switch instead of executing dokku run.

Cronjob:

Doesn't work:
0 15 * * * bash -c ': | PATH="$PATH:/usr/local/bin" dokku run www python main.py' > /tmp/main.output
Works:
0 15 * * * bash -c ': | PATH="$PATH:/usr/local/bin" docker run -t dokku/www /exec python main.py' > /tmp/main.output

@michaelshobbs
Copy link
Member

Perhaps related to #552 or new in the latest docker version. Not sure of the right solution here. Perhaps we can detect when we have a TTY and pass -i or not.

@pdxbmw
Copy link
Author

pdxbmw commented Jan 21, 2015

Hmm, the only reference I see in the Docker release notes is back in version 1.3.1, but it's not clear to me what they fixed. For what it's worth, my first cronjob command worked before I upgraded Dokku (I believe I was on 0.2.0).

@michaelshobbs
Copy link
Member

@pdxbmw #914 seems to solve your issue. can you confirm?

@pdxbmw
Copy link
Author

pdxbmw commented Jan 21, 2015

Yes, I resorted back to my original command and it worked perfectly.

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 a pull request may close this issue.

2 participants