Skip to content

Commit c2cb696

Browse files
committed
Disable console input/stdin for Tanuki Wrapper
Often (especially when testing the built docker images) we get errors when running within containers (via `wrapper console`) such as: wrapper | Failed to set JVM input handle to non blocking mode: Bad file descriptor (9) wrapper | Failed to set JVM input handle to close on JVM exit: Bad file descriptor (9) wrapper | Unable to set JVM's stdin: Bad file descriptor wrapper | JVM exited while loading the application. When running in regular mode on a direct Linux install via `wrapper start` the stdin isn't attached to the wrapper anyway, so this should not be required at all. On advice from Tanuki we can workaround this issue by disabling console input entirely. See https://wrapper.tanukisoftware.com/doc/english/prop-disable-console-input.html
1 parent 71a2a01 commit c2cb696

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

installers/generic.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ def configureGenericZip(Zip zipTask, InstallerType installerType) {
145145
if (eachLine == '#encoding=UTF-8') {
146146
def newLines = [
147147
'#encoding=UTF-8',
148-
'wrapper.working.dir=..'
148+
'wrapper.working.dir=..',
149+
'wrapper.disable_console_input=TRUE'
149150
]
150151

151152
installerType.additionalEnvVars.forEach { k, v ->

installers/linux.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ def configureLinuxPackage(DefaultTask packageTask, InstallerType installerType,
204204
if (eachLine == '#encoding=UTF-8') {
205205
def newLines = [
206206
'#encoding=UTF-8',
207-
"wrapper.working.dir=/var/lib/${installerType.baseName}"
207+
"wrapper.working.dir=/var/lib/${installerType.baseName}",
208+
'wrapper.disable_console_input=TRUE'
208209
]
209210

210211
(installerType.additionalEnvVars + installerType.additionalLinuxEnvVars).forEach { k, v ->

0 commit comments

Comments
 (0)