与厨师独奏时SBT挂起 [英] SBT hangs when running with chef solo

查看:98
本文介绍了与厨师独奏时SBT挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Chef-solo下运行SBT,它挂起并试图从终端读取。将 / dev / null 重定向到它没有帮助,即使我直接使用Java运行jar。它仅在我孤立后才有效,并且仅在父厨师-独奏终止时终止。它必须先关闭stdin,然后再重新打开它,从而获得父级的stdin。挂起期间的堆栈跟踪似乎表明了这一点。我怀疑这与其中一个插件有关

I'm running SBT under chef-solo, and it hangs trying to read from the terminal. Redirecting /dev/null into it doesn't help, even if I run the jar directly with java. It only works if I orphan it, and will only terminate when the parent chef-solo terminates. It must be closing stdin, and then reopening it, thus getting the stdin of the parent. The stack trace during the hang seems to indicate that. I suspect it has something to do with one of the plugins

Thread 22379: (state = IN_NATIVE)
 - java.io.FileInputStream.readBytes(byte[], int, int) @bci=0 (Interpreted frame)
 - java.io.FileInputStream.read(byte[], int, int) @bci=16, line=272 (Interpreted frame)
 - java.io.BufferedInputStream.fill() @bci=175, line=235 (Interpreted frame)
 - java.io.BufferedInputStream.read() @bci=12, line=254 (Interpreted frame)
 - jline.internal.TerminalLineSettings.exec(java.lang.String[]) @bci=54, line=191 (Interpreted frame)
 - jline.internal.TerminalLineSettings.exec(java.lang.String) @bci=26, line=173 (Interpreted frame)
 - jline.internal.TerminalLineSettings.stty(java.lang.String) @bci=26, line=168 (Interpreted frame)
 - jline.internal.TerminalLineSettings.set(java.lang.String) @bci=2, line=76 (Interpreted frame)
 - jline.UnixTerminal.init() @bci=15, line=54 (Interpreted frame)
 - jline.TerminalFactory.create() @bci=298, line=101 (Interpreted frame)
 - jline.TerminalFactory.get() @bci=14, line=159 (Interpreted frame)
 - sbt.ConsoleLogger$.ansiSupported() @bci=0, line=123 (Interpreted frame)
 - sbt.ConsoleLogger$.<init>() @bci=21, line=117 (Interpreted frame)
 - sbt.ConsoleLogger$.<clinit>() @bci=3 (Interpreted frame)
 - sbt.GlobalLogging$.initial(scala.Function2, scala.Function0, sbt.ConsoleOut) @bci=0, line=43 (Interpreted frame)
 - sbt.StandardMain$.initialGlobalLogging() @bci=24, line=60 (Interpreted frame)
 - sbt.StandardMain$.initialState(xsbti.AppConfiguration, scala.collection.Seq, scala.collection.Seq) @bci=205, line=69 (Interpreted frame)
 - sbt.xMain.run(xsbti.AppConfiguration) @bci=97, line=28 (Interpreted frame)
 - xsbt.boot.Launch$$anonfun$run$1.apply() @bci=10, line=109 (Interpreted frame)
 - xsbt.boot.Launch$.withContextLoader(java.lang.ClassLoader, scala.Function0) @bci=15, line=128 (Interpreted frame)
 - xsbt.boot.Launch$.run(xsbti.Launcher, xsbt.boot.RunConfiguration) @bci=97, line=109 (Interpreted frame)
 - xsbt.boot.Launch$$anonfun$apply$1.apply(java.lang.Object) @bci=16, line=35 (Interpreted frame)
 - xsbt.boot.Launch$.launch(scala.Function1, xsbt.boot.RunConfiguration) @bci=2, line=117 (Interpreted frame)
 - xsbt.boot.Launch$.apply(xsbt.boot.LauncherArguments) @bci=876, line=18 (Interpreted frame)
 - xsbt.boot.Boot$.runImpl(xsbt.boot.LauncherArguments) @bci=4, line=41 (Interpreted frame)
 - xsbt.boot.Boot$.main(java.lang.String[]) @bci=291, line=17 (Interpreted frame)
 - xsbt.boot.Boot.main(java.lang.String[]) @bci=4 (Interpreted frame)




推荐答案

好吧,经过大量挖掘,这应该可以,但不会

Well, after much digging, this should work but doesn't

-Dsbt.log.noformat = true

-Dsbt.log.noformat=true

所以我深入jline网站,发现这无法查询终端

So I dug into the jline website and found this disables interrogating the terminal

-Djline.terminal=jline.UnsupportedTerminal

这篇关于与厨师独奏时SBT挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆