2016-11-04 6 views
0

私はリモートマシン上にあり、実行中のErlang VMノードを持っています。私はiexを経由してのErlang VMノードに接続するが、バックのエラーを取得しようとしている:リモートノードに接続

$ iex --name [email protected] --remsh [email protected] --setcookie NMFJGSU0FwvGKlrqMuGfY1I6LtgSz1Rn2PLiDnqMS54 
Erlang/OTP 18 [erts-7.3.1] [source] [64-bit] [async-threads:10] [kernel-poll:false] 

Could not contact remote node [email protected], reason: :nodedown. Aborting... 
$ 

epmd -namesはErlangのVMノードが実行されている報告:

$ epmd -names 
epmd: up and running on port 4369 with data: 
name myapp at port 45671 
$ 

ここで展開され、アプリのvm.argsの内容です:

-name [email protected] 
-setcookie NMFJGSU0FwvGKlrqMuGfY1I6LtgSz1Rn2PLiDnqMS54= 
-smp auto 

質問:私は間違っていますか?

答えて

4

あなたはvm.argsに1とiexに同じクッキーを渡す必要があります:

iex --name [email protected] --remsh [email protected] --cookie NMFJGSU0FwvGKlrqMuGfY1I6LtgSz1Rn2PLiDnqMS54= 

クッキーが間違っている場合、あなたは:nodedownエラーが発生します。

シェル#1から:

$ iex --cookie foo --name [email protected] 

シェル#2から:

$ iex --name [email protected] --remsh [email protected] 
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] 

Could not contact remote node [email protected], reason: :nodedown. Aborting... 
$ iex --name [email protected] --remsh [email protected] --cookie foo 
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] 

Interactive Elixir (1.3.4) - press Ctrl+C to exit (type h() ENTER for help) 
iex([email protected])1> 
+0

申し訳ありませんが、私はそれを指定していないが、私は実際にクッキーを渡しました。私は私の質問を更新します。 – gmile

+0

'--setcookie'や' --cookie'を使いましたか?それは 'iex'の' --cookie'でなければなりません。そして最後の '='を忘れてしまったようにも見えます(または、編集で誤字を犯しました)。 – Dogbert

+0

あなたは完全に正しいです!私は間違ったキーを使用したことを完全に忘れてしまった。すべてが今働きます、ありがとう:) P.S.最後に欠落している '= '記号を指摘してくれてありがとう! – gmile