6

OpenVZ 仮想化の下に ubuntu マシンがあります。fsc test.scala を実行すると、次のようになります。

Unable to establish connection to compilation daemon

次にps aux、このような多くのプロセスを示します

ren      17482  0.0  0.0   4908  1400 pts/0    S    00:29   0:00 /bin/bash --posix /usr/bin/scala -Djava.net.preferIPv4Stack=true scala.tools
ren      17490  0.2  0.5 1246676 24268 pts/0   Sl   00:29   0:00 java -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true -Xbootc

私はそれを機能させる方法のアイデアを使い果たしました.バージョンはScala code runner version 2.9.2 -- Copyright 2002-2011, LAMP/EPFL. 何か案は?

編集:

これを見つけ たので:

  • selinux がインストールされていません
  • 輸出 | grep SCALA は何も返しませんが、scalac と scala は正常にコンパイル/実行されるため、この手順は問題ないと思います
  • ping localhost - 動作します
  • fsc -reset - 同じエラー
  • fsc -verbose >> logfile.log 2>&1 はこれを生成します:
Fast Scala compiler version 2.9.2 -- Copyright 2002-2011, LAMP/EPFL
[Given arguments: -verbose]
[Transformed arguments: -verbose -current-dir /home/ren]
[VM arguments: ]
[Temp directory: /tmp/scala-devel/ren]
[Port number: 36737]
java.net.SocketException: Invalid argument or cannot assign requested address
[Connecting to compilation daemon at port 36737 failed; re-trying...]
No compile server running: starting one with args ''
[Executing command: scala scala.tools.nsc.CompileServer -v]
Starting CompileServer on port 34962
Redirect dir is /tmp/scala-devel/ren/output-redirects
[Port number: 34962]
java.net.SocketException: Invalid argument or cannot assign requested address
[Connecting to compilation daemon at port 34962 failed; re-trying...]
[Port number: 34962]
java.net.SocketException: Invalid argument or cannot assign requested address
[Connecting to compilation daemon at port 34962 failed; re-trying...]
No compile server running: starting one with args '' and so on ...

編集2:

さて、このようにコンパイルサーバーを起動すると、scala scala.tools.nsc.CompileServer -v実際に機能します! そして、 fsc はこれらのサーバーをすべて起動したようですが、何らかの理由で起動しなかったと判断しました。fsc -server localhost:port test.scala動作します。今のところはこれで十分です。

4

1 に答える 1

4

fsc はhostname、コンパイル サーバーへの接続に使用されているようです。ホスト名が ping に応答しませんでした。localhost に変更すると/etc/hostname、問題が修正されました。

于 2013-03-21T19:15:20.437 に答える