我有一个Java Akka应用程序,现在已经添加了所需的配置,以将其与Typesafe控制台集成并监视系统。我的系统包含几个远程节点,运行正常,但Typesafe控制台无法显示任何内容。
我正在使用的common.conf
如下:
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote.netty.tcp.port = 0
remote.log-remote-lifecycle-events = off
loggers = ["akka.event.slf4j.Slf4jLogger", "com.typesafe.atmos.trace.Slf4jTraceContextLogger"]
loglevel = "INFO"
remote {
transport-failure-detector {
heartbeat-interval = 3 s
threshold = 10.0
max-sample-size = 100
min-std-deviation = 200 ms
acceptable-heartbeat-pause = 5 s
}
watch-failure-detector {
heartbeat-interval = 3 s
threshold = 12.0
max-sample-size = 200
min-std-deviation = 200 ms
acceptable-heartbeat-pause = 7 s
unreachable-nodes-reaper-interval = 3 s
expected-response-after = 6 s
}
}
}
atmos {
trace {
enabled = true
node = ${HOSTNAME}
traceable {
"*" = on
}
sampling {
"*" = 1
}
}
}
我觉得有点可疑的是,atmos的配置不需要任何引用Typesafe控制台运行的位置。
我正在使用的application.conf
如下:
MapReduceSystem {
include "common"
akka {
actor {
deployment {
/mapActor {
router = round-robin
nr-of-instances = ${MAPREDUCE_NUMBER_OF_JOBS}
target.nodes = ["akka.tcp://MapReduceSystem@olympus:2552", "akka.tcp://MapReduceNode@zeus:2552", "akka.tcp://MapReduceNode@hera:2552"]
}
/reduceActor {
remote = "akka.tcp://MapReduceSystem@olympus:2552"
router = round-robin
nr-of-instances = 1
}
/masterActor {
remote = "akka.tcp://MapReduceSystem@olympus:2552"
nr-of-instances = 1
}
}
}
remote.netty.tcp.port = 2552
remote.enabled-transports = ["akka.remote.netty.tcp"]
remote.netty.tcp.hostname = "olympus"
}
}
MapReduceNode {
include "common"
akka {
remote.netty.tcp.port = 2552
remote.enabled-transports = ["akka.remote.netty.tcp"]
remote.netty.tcp.hostname = ${HOSTNAME}
}
}
更新
atmos日志只显示:
azg@olympus:~/code/hpcmom/hpcmom-mapreduce$ sudo $TYPESAFE_CONSOLE_ROOT/bin/typesafe-console atmos
2013-11-20 15:10:46,922 INFO [akka.event.slf4j.Slf4jEventHandler] [] [] : Slf4jEventHandler started
2013-11-20 15:10:46,954 INFO [U] [ActorSystem(query)] [query-akka.actor.default-dispatcher-2] : *** No license available. Defaulting to in-memory persistence. ***
2013-11-20 15:10:47,169 INFO [akka.event.slf4j.Slf4jEventHandler] [] [] : Slf4jEventHandler started
2013-11-20 15:10:47,199 INFO [akka.event.slf4j.Slf4jEventHandler] [] [] : Slf4jEventHandler started
2013-11-20 15:10:47,508 INFO [akka://query/user/IO-HTTP/listener-0] [akka://query/user/IO-HTTP/listener-0] [query-akka.actor.default-dispatcher-12] : Bound to olympus/192.168.92.21:8660
答案 0 :(得分:1)
由于您在MapReduceSystem
上下文中导入公共配置,Atmos将无法找到atmos配置部分。它期望在根级别的atmos配置。
请尝试将atmos部分直接添加到application.conf
文件中。