Zeta
05.Август.2022 13:28:44
1
Добрый день!
Во время удаления скриптов wb-rules упал. Вот лог:
Лог
Aug 05 13:24:11 IQ320000 wb-rules[3962]: INFO: LiveRemoveFile: /etc/wb-rules/62b57f0baaeeddb83b48d2b3-__1456343689__.js
Aug 05 13:24:11 IQ320000 wb-rules[3962]: INFO: LiveRemoveFile: /etc/wb-rules/62b9bde5b593102b816c9bce-__3175239624__.js
Aug 05 13:24:11 IQ320000 wb-rules[3962]: INFO: LiveRemoveFile: /etc/wb-rules/62b9bde52596e33945363cfe-__2012289009__.js
Aug 05 13:24:11 IQ320000 wb-rules[3962]: INFO: [engine] Stop main loop
Aug 05 13:24:11 IQ320000 wb-rules[3962]: panic: send on closed channel
Aug 05 13:24:11 IQ320000 wb-rules[3962]: goroutine 53 [running]:
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wb-rules/wbrules.(*RuleEngine).CallSync(0x1560100, 0x15f8ca0)
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wb-rules/wbrules/engine.go:893 +0xf4
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgong.(*DeferredList).MaybeDefer(0x1876260, 0x15f8ca0)
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgong@v0.3.0/util.go:61 +0x11c
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wb-rules/wbrules.(*RuleEngine).WhenEngineReady(...)
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wb-rules/wbrules/engine.go:910
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wb-rules/wbrules.(*ESEngine).LiveRemoveFile(0x1476640, 0x18590c0, 0x38, 0x38, 0x19b0a00)
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wb-rules/wbrules/esengine.go:917 +0x154
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private.(*dirWatcher).removePath(0x14768c0, 0x18590c0, 0x38)
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private/dirwatcher.go:227 +0x290
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private.(*dirWatcher).processOp(0x14768c0, 0x15f3310)
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private/dirwatcher.go:117 +0x110
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private.(*dirWatcher).processEvents(0x14768c0)
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private/dirwatcher.go:128 +0x9c
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private.(*dirWatcher).startWatching.func1(0x14768c0)
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private/dirwatcher.go:158 +0x1b4
Aug 05 13:24:11 IQ320000 wb-rules[3962]: created by github.com/wirenboard/wbgo-private.(*dirWatcher).startWatching
Aug 05 13:24:11 IQ320000 wb-rules[3962]: github.com/wirenboard/wbgo-private/dirwatcher.go:148 +0x1bc
Aug 05 13:24:11 IQ320000 systemd[1]: wb-rules.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 05 13:24:11 IQ320000 systemd[1]: Stopped MQTT Rule engine for Wiren Board.
Aug 05 13:24:11 IQ320000 systemd[1]: wb-rules.service: Unit entered failed state.
Aug 05 13:24:11 IQ320000 systemd[1]: wb-rules.service: Failed with result 'exit-code'.
Aug 05 13:25:06 IQ320000 systemd[1]: Started MQTT Rule engine for Wiren Board.
Aug 05 13:25:07 IQ320000 wb-rules[5333]: INFO: driver is created
Aug 05 13:25:07 IQ320000 wb-rules[5333]: INFO: [wbgo_mqtt] rules-IQ320000-5333: MQTT connection established
Aug 05 13:25:07 IQ320000 wb-rules[5333]: INFO: driver loop is started
Aug 05 13:25:08 IQ320000 wb-rules[5333]: INFO: wait for driver to become ready
Aug 05 13:25:17 IQ320000 wb-rules[5333]: INFO: driver is ready
Версия wb-rules 2.11.1
Добрый день.
А падет именно при таих услвиях, при удалении трех файлов с правилами? А что в них за правила, как воспроизвести?
Zeta
05.Август.2022 16:03:28
4
Обычно не падает, но в этот раз упало.
Файлов там больше, в районе 10-15ти, просто скинул вырезку. JS файлы генерируем, поэтому они могут за раз замениться на другие.
В файлах правила cron, whenChanged. Есть виртуальные устройства.
Попробую воспроизвести, конечно. Предполагаю что как раз дело в остановке работающих правил (или таймеров).
Zeta
16.Сентябрь.2022 18:55:45
6
Отлаживал скрипт, wb-rules упал и сразу перезапустился:
Sep 16 18:53:25 IQ950000 wb-rules[32057]: INFO: LiveRemoveFile: /etc/wb-rules/info-__987999762__.js
Sep 16 18:53:26 IQ950000 wb-rules[32057]: INFO: reloading file: /etc/wb-rules/info-__1382764998__.js
Sep 16 18:53:28 IQ950000 wb-rules[32057]: INFO: [rule info] controller_info: "cpu_temperature" not found
Sep 16 18:53:28 IQ950000 wb-rules[32057]: INFO: [rule info] controller_info: "board_temperature" not found
Sep 16 18:53:28 IQ950000 wb-rules[32057]: INFO: [rule info] controller_info: "ppp0_signal_level" not found
Sep 16 18:53:28 IQ950000 wb-rules[32057]: INFO: [rule info] controller_info: "ppp0_sim_slot" not found
Sep 16 18:53:30 IQ950000 wb-rules[32057]: panic: operation on invalid context
Sep 16 18:53:30 IQ950000 wb-rules[32057]: goroutine 52 [running]:
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules.(*ESContext).mustBeValid(...)
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules/escontext.go:119
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules.(*ESContext).invokeCallback(0x166abe0, 0x155e, 0x0, 0x15e1260, 0x0, 0x0)
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules/escontext.go:298 +0x39c
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules.(*ESContext).WrapCallback.func1(0x15e1260, 0x0, 0x0)
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules/escontext.go:366 +0x38
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules.(*RuleEngine).newTrackHandler.func1.1()
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules/engine.go:1743 +0x28
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules.(*RuleEngine).syncLoop(0x1560100)
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules/engine.go:712 +0xf4
Sep 16 18:53:30 IQ950000 wb-rules[32057]: created by github.com/wirenboard/wb-rules/wbrules.(*RuleEngine).Start
Sep 16 18:53:30 IQ950000 wb-rules[32057]: github.com/wirenboard/wb-rules/wbrules/engine.go:1241 +0x1e8
Sep 16 18:53:30 IQ950000 systemd[1]: wb-rules.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 16 18:53:30 IQ950000 systemd[1]: wb-rules.service: Unit entered failed state.
Sep 16 18:53:30 IQ950000 systemd[1]: wb-rules.service: Failed with result 'exit-code'.
Sep 16 18:53:31 IQ950000 systemd[1]: wb-rules.service: Service hold-off time over, scheduling restart.
Sep 16 18:53:31 IQ950000 systemd[1]: Stopped MQTT Rule engine for Wiren Board.
Sep 16 18:53:31 IQ950000 systemd[1]: Started MQTT Rule engine for Wiren Board.
Sep 16 18:53:32 IQ950000 wb-rules[392]: INFO: driver is created
Sep 16 18:53:32 IQ950000 wb-rules[392]: INFO: [wbgo_mqtt] rules-IQ950000-392: MQTT connection established
Версия wb-rules 2.11.4
Здравствуйте! Воспроизводится ли проблема? Если да, то пришлите нам минимальное правило для выяснения проблемы.
Zeta
20.Октябрь.2022 14:34:44
8
Если локализуем проблему, обязательно пришлем. Пока это встречается рандомно на разных контроллерах.
system
Закрыл(а) тему
27.Октябрь.2022 14:34:48
9
Эта тема была автоматически закрыта через 7 дней после последнего ответа. В ней больше нельзя отвечать.