Tôi đang cố gắng để tạo ra một cụm AKKA cơ bản trên một máy Win 7 từ tài liệu này không thuộc địa phương:
http://doc.akka.io/docs/akka/snapshot/scala/cluster-usage.htmlAKKA hạch hạt giống cụm cho lỗi: thả nhắn cho người nhận
và tôi nhận được một lỗi khi tôi chạy các nút hạt giống (nhiều hơn về họ dưới đây)
AdriansClusterSystem-akka.actor.default-dispa tcher-16] [akka://AdriansClusterSystem/system/endpointManager/reliableEndpointWr iter-akka.tcp%3A%2F%2FAdriansClusterSystem%40127.0.0.1%3A2552-3/endpointWriter] dropping message [class akka.actor.SelectChildName] for non-local recipient [Act or[akka.tcp://[email protected]:2552/]] arriving at [akka.tcp://ClusterSys [email protected]:2552] inbound addresses are [akka.tcp://[email protected] .0.1:2552]
Câu hỏi: Tại sao tôi nhận được lỗi này? Tôi đã bỏ lỡ một cái gì đó từ tài liệu akka?
tập tin conf của tôi:
tôi đã thêm dòng này thêm * Để các tập tin được liệt kê ở trên URL * enabled-transports = ["akka.remote.netty.tcp"]
akka {
actor {
provider = "akka.cluster.ClusterActorRefProvider"
}
remote {
enabled-transports = ["akka.remote.netty.tcp"] <--added this from remoting
log-remote-lifecycle-events = off
netty.tcp {
hostname = "127.0.0.1"
port = 0
}
}
cluster {
seed-nodes = [
"akka.tcp://[email protected]:2551",
"akka.tcp://[email protected]:2552"]
auto-down = on
}
}
tôi bắt đầu 2 nút, mỗi trong các cửa sổ khác nhau SBT
run-main sample.cluster.simple.SimpleClusterApp 2551 run-main sample.cluster.simple.SimpleClusterApp 2552
Cả hai điều này khởi động tốt sau đó liên tục hiển thị thông báo ERROR
:
mybuild:-:0.0.1-SNAPSHOT>`run-main sample.cluster.simple.SimpleClusterApp 2552`
[warn] Credentials file C:\Users\amocanu\.ivy2\.credentials does not exist <-- ?
[info] Running sample.cluster.simple.SimpleClusterApp 2552
args[0]= 2552
[INFO] [07/31/2013 10:50:00.397] [run-main] [Remoting] Starting remoting
[INFO] [07/31/2013 10:50:00.661] [run-main] [Remoting] Remoting started; listeni
ng on addresses :[akka.tcp://[email protected]:2552]
[INFO] [07/31/2013 10:50:00.710] [run-main] [Cluster(akka://AdriansClusterSystem
)] Cluster Node [akka.tcp://[email protected]:2552] - Starting up..
.
[INFO] [07/31/2013 10:50:00.823] [run-main] [Cluster(akka://AdriansClusterSystem
)] Cluster Node [akka.tcp://[email protected]:2552] - Registered cl
uster JMX MBean [akka:type=Cluster]
[INFO] [07/31/2013 10:50:00.823] [run-main] [Cluster(akka://AdriansClusterSystem
)] Cluster Node [akka.tcp://[email protected]:2552] - Started up su
ccessfully
[INFO] [07/31/2013 10:50:00.868] [AdriansClusterSystem-akka.actor.default-dispat
cher-2] [Cluster(akka://AdriansClusterSystem)] Cluster Node [akka.tcp://AdriansC
[email protected]:2552] - Metrics will be retreived from MBeans, and may be
incorrect on some platforms. To increase metric accuracy add the 'sigar.jar' to
the classpath and the appropriate platform-specific native libary to 'java.libr
ary.path'. Reason: java.lang.ClassNotFoundException: org.hyperic.sigar.Sigar
[INFO] [07/31/2013 10:50:00.874] [AdriansClusterSystem-akka.actor.default-dispat
cher-2] [Cluster(akka://AdriansClusterSystem)] Cluster Node [akka.tcp://AdriansC
[email protected]:2552] - Metrics collection has started successfully
[INFO] [07/31/2013 10:50:00.883] [AdriansClusterSystem-akka.actor.default-dispat
cher-13] [akka://AdriansClusterSystem/user/clusterListener] Current members:
[ERROR] [07/31/2013 10:50:01.003] [AdriansClusterSystem-akka.actor.default-dispa
tcher-3] [akka://AdriansClusterSystem/system/endpointManager/reliableEndpointWri
ter-akka.tcp%3A%2F%2FAdriansClusterSystem%40127.0.0.1%3A2551-0/endpointWriter] d
ropping message [class akka.actor.SelectChildName] for non-local recipient [Acto
r[akka.tcp://[email protected]:2552/]] arriving at [akka.tcp://ClusterSyst
[email protected]:2552] inbound addresses are [akka.tcp://[email protected]
0.1:2552]
[ERROR] [07/31/2013 10:50:01.009] [AdriansClusterSystem-akka.actor.default-dispa
tcher-16] [akka://AdriansClusterSystem/system/endpointManager/reliableEndpointWr
iter-akka.tcp%3A%2F%2FAdriansClusterSystem%40127.0.0.1%3A2552-3/endpointWriter]
dropping message [class akka.actor.SelectChildName] for non-local recipient [Act
or[akka.tcp://[email protected]:2552/]] arriving at [akka.tcp://ClusterSys
[email protected]:2552] inbound addresses are [akka.tcp://[email protected]
.0.1:2552]
Nếu bây giờ tôi làm
run-main sample.cluster.simple.SimpleClusterApp
mà là vụ phải chọn một cổng ngẫu nhiên và chạy một nút hạt giống trên, nó bắt đầu của cũng giống như các nút 2 hạt giống khác, sau đó cho thấy một lớp học không tìm thấy ngoại lệ như INFO
và không có thành viên hiện tại
[INFO] [07/31/2013 11:19:36.612] [AdriansClusterSystem-akka.actor.default-dispat
cher-3] [Cluster(akka://AdriansClusterSystem)] Cluster Node [akka.tcp://AdriansC
[email protected]:54824] - Metrics will be retreived from MBeans, and may b
e incorrect on some platforms. To increase metric accuracy add the 'sigar.jar' t
o the classpath and the appropriate platform-specific native libary to 'java.lib
rary.path'. Reason: java.lang.ClassNotFoundException: org.hyperic.sigar.Sigar
[INFO] [07/31/2013 11:19:36.619] [AdriansClusterSystem-akka.actor.default-dispat
cher-3] [Cluster(akka://AdriansClusterSystem)] Cluster Node [akka.tcp://AdriansC
[email protected]:54824] - Metrics collection has started successfully
[INFO] [07/31/2013 11:19:36.633] [AdriansClusterSystem-akka.actor.default-dispat
cher-12] [akka://AdriansClusterSystem/user/clusterListener] Current members:
Yup nó chỉ bị treo ở đó và tôi phải đóng cửa sổ SBT để chấm dứt nó.
Tôi cảm thấy như một thằng ngốc ngay bây giờ. Cảm ơn, tôi đã thay đổi rất nhiều thiết lập và quên mất một thay đổi này. Một đôi mắt khác luôn giúp :) – Adrian