规则关闭后再无法开启

关闭日志:

2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=info msg="stopping 1133_mongo4585_0_mongo" file="runtime/plugin.go:159" plugin=mqtt_protocol
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=info msg="file sink done" file="big-mongodb/mongodb_sink.go:72" rule=1133
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=info msg="closed sink data channel" file="runtime/sink.go:121" rule=1133
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=error msg="ack error: object closed" file="runtime/sink.go:99" rule=1133
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=error msg="file sink fails to write out result '\n' with error write /kuiper/2.log: file already closed." file="big-mongodb/mongodb_sink.go:96" rule=1133
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=info msg="object closed" file="runtime/sink.go:115" rule=1133
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=info msg="object closed" file="runtime/sink.go:119" rule=1133
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=info msg="closed sink data channel" file="runtime/sink.go:121" rule=1133
2025-01-07 11:29:03 time="2025-01-07T03:29:03Z" level=info msg="stopped symbol mongo" file="runtime/plugin_ins_manager.go:128" rule=1133
2025-01-07 11:29:03 time="2025-01-07T03:29:03Z" level=info msg="Rule 1133 is replaced." file="processor/rule.go:112"
2025-01-07 11:29:03 time="2025-01-07T03:29:03Z" level=info msg="stop source" file="runtime/source.go:108" rule=1133
2025-01-07 11:29:03 time="2025-01-07T03:29:03Z" level=info msg="Closing source random" file="runtime/source.go:142" rule=1133
2025-01-07 11:29:03 time="2025-01-07T03:29:03Z" level=info msg="clean up source" file="runtime/source.go:84" rule=1133
2025-01-07 11:29:03 randomize count to 50time="2025-01-07 03:29:03" level=info msg="received command stop with arg:'{\"symbolName\":\"random\",\"meta\":{\"ruleId\":\"1133\",\"opId\":\"random5038\",\"instanceId\":0},\"pluginType\":\"source\",\"config\":{\"deduplicate\":0,\"delimiter\":\"\",\"format\":\"json\",\"interval\":1000,\"key\":\"\",\"pattern\":{\"count\":50},\"seed\":1}}'" file="runtime/plugin.go:104" plugin=mqtt_protocol
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=info msg="stopping 1133_random5038_0_random" file="runtime/plugin.go:159" plugin=mqtt_protocol
2025-01-07 11:29:03 time="2025-01-07 03:29:03" level=info msg="closed source data channel" file="runtime/source.go:90" rule=1133
2025-01-07 11:29:03 time="2025-01-07T03:29:03Z" level=info msg="stopped symbol random" file="runtime/plugin_ins_manager.go:128" rule=1133
2025-01-07 11:29:04 time="2025-01-07T03:29:04Z" level=info msg="stop plugin mqtt_protocol" file="runtime/plugin_ins_manager.go:141" rule=1133
2025-01-07 11:29:04 time="2025-01-07T03:29:04Z" level=info msg="plugin executable /kuiper/plugins/portable/mqtt_protocol/mqtt_protocol stops with error signal: killed" file="runtime/plugin_ins_manager.go:293"
2025-01-07 11:29:04 time="2025-01-07T03:29:04Z" level=warning msg="instance mqtt_protocol not found when deleting" file="runtime/plugin_ins_manager.go:339"
2025-01-07 11:29:04 time="2025-01-07T03:29:04Z" level=info msg="stop plugin mqtt_protocol" file="runtime/plugin_ins_manager.go:141" rule=1133

开启日志:

2025-01-07 11:29:53 time="2025-01-07T03:29:53Z" level=info msg="started symbol random" file="runtime/plugin_ins_manager.go:104" rule=1133
2025-01-07 11:29:53 time="2025-01-07 03:29:53" level=info msg="Setup message pipeline, start sending" file="runtime/source.go:53" rule=1133
2025-01-07 11:29:53 time="2025-01-07 03:29:53" level=info msg="running source random" file="runtime/plugin.go:126" plugin=mqtt_protocol
2025-01-07 11:29:53 time="2025-01-07 03:29:53" level=info msg="open random source with config &{Interval:1000 Seed:1 Pattern:map[count:50] Deduplicate:0 Format:json}" file="big-mongodb/mongodb_source.go:63" rule=1133
2025-01-07 11:29:53 time="2025-01-07T03:29:53Z" level=error msg="runtime error: can't listen on pull socket for ipc:///tmp/1133_mongo4585_0_ack.ipc: address in use" file="infra/saferun.go:56" rule=1133
2025-01-07 11:29:53 time="2025-01-07T03:29:53Z" level=error msg="closing rule 1133 for error: can't listen on pull socket for ipc:///tmp/1133_mongo4585_0_ack.ipc: address in use" file="rule/ruleState.go:242"
2025-01-07 11:29:53 time="2025-01-07T03:29:53Z" level=info msg="source random5038 done" file="node/source_node.go:142" rule=1133
2025-01-07 11:29:54 randomize count to 50time="2025-01-07T03:29:54Z" level=info msg="stop source" file="runtime/source.go:129" rule=1133
2025-01-07 11:29:54 time="2025-01-07T03:29:54Z" level=info msg="Closing source random" file="runtime/source.go:142" rule=1133
2025-01-07 11:29:54 time="2025-01-07T03:29:54Z" level=info msg="clean up source" file="runtime/source.go:84" rule=1133
2025-01-07 11:29:54 time="2025-01-07 03:29:54" level=info msg="received command stop with arg:'{\"symbolName\":\"random\",\"meta\":{\"ruleId\":\"1133\",\"opId\":\"random5038\",\"instanceId\":0},\"pluginType\":\"source\",\"config\":{\"deduplicate\":0,\"delimiter\":\"\",\"format\":\"json\",\"interval\":1000,\"key\":\"\",\"pattern\":{\"count\":50},\"seed\":1}}'" file="runtime/plugin.go:104" plugin=mqtt_protocol
2025-01-07 11:29:54 time="2025-01-07 03:29:54" level=info msg="stopping 1133_random5038_0_random" file="runtime/plugin.go:159" plugin=mqtt_protocol
2025-01-07 11:29:54 time="2025-01-07 03:29:54" level=info msg="closed source data channel" file="runtime/source.go:90" rule=1133
2025-01-07 11:29:54 time="2025-01-07T03:29:54Z" level=info msg="stopped symbol random" file="runtime/plugin_ins_manager.go:128" rule=1133
2025-01-07 11:29:55 time="2025-01-07T03:29:55Z" level=info msg="stop plugin mqtt_protocol" file="runtime/plugin_ins_manager.go:141" rule=1133
2025-01-07 11:29:55 time="2025-01-07T03:29:55Z" level=info msg="plugin executable /kuiper/plugins/portable/mqtt_protocol/mqtt_protocol stops with error signal: killed" file="runtime/plugin_ins_manager.go:293"

请问使用的是什么版本

v1.14.7-slim-python

用的自己开发的便捷插件

麻烦试一下v2.x

使用v2.0.6保持规则的时候报错

2025-01-07 14:59:40 time="2025-01-07T06:59:40Z" level=error msg="invalid rule json: Parse rule {\"id\":\"mdb\",\"options\":{\"isEventTime\":null,\"sendMetaToSink\":null,\"lateTolerance\":null,\"concurrency\":null,\"bufferLength\":null,\"qos\":null,\"checkpointInterval\":null,\"attempts\":null,\"delay\":null,\"maxDelay\":null,\"multiplier\":null,\"jitterFactor\":null},\"graph\":{\"nodes\":{\"random2306\":{\"type\":\"source\",\"nodeType\":\"random\",\"props\":{\"node\":{\"id\":1,\"name\":\"random\",\"data\":{\"id\":\"random2306\",\"name\":\"random\",\"label\":{\"en_US\":\"Random\",\"zh_CN\":\"随机数1\"},\"type\":\"output\",\"group\":\"source\",\"properties\":[{\"exist\":false,\"name\":\"interval\",\"default\":1000,\"type\":\"int\",\"control\":\"text\",\"connection_related\":false,\"optional\":false,\"values\":null,\"hint\":{\"en\":\"The interval (ms) to issue a message\",\"zh\":\"发出消息的间隔(毫秒)\"},\"label\":{\"en\":\"Interval\",\"zh\":\"间隔时间\"}},{\"exist\":false,\"name\":\"seed\",\"default\":1,\"type\":\"int\",\"control\":\"text\",\"connection_related\":false,\"optional\":true,\"values\":null,\"hint\":{\"en\":\"The maximum integer to be produced by the random function\",\"zh\":\"随机函数产生的最大整数\"},\"label\":{\"en\":\"Seed\",\"zh\":\"最大整数\"}},{\"exist\":false,\"name\":\"deduplicate\",\"default\":0,\"type\":\"int\",\"control\":\"text\",\"connection_related\":false,\"optional\":true,\"values\":null,\"hint\":{\"en\":\"An int value. If it is a positive number, the source will not issue the messages which are duplicates of any of the previous 'deduplicate' length of messages. If it is 0, the source won't check for duplications. If it is a negative number, the source will check for duplicates over any previous messages. Do not use negative length if you have very large input data sets as all the previous data will be kept.\",\"zh\":\"一个整数值。 如果它为正数,则源不会发出与以前任何“重复数据删除”长度的消息重复的消息。如果为0,则源不会检查是否存在重复。如果是负数,则源将检查以前任何消息的重复项。如果有非常大的输入数据集,请不要使用负长度,因为将保留所有以前的数据。\"},\"label\":{\"en\":\"Deduplicate\",\"zh\":\"去除重复\"}},{\"exist\":false,\"name\":\"pattern\",\"default\":[{\"exist\":false,\"name\":\"count\",\"default\":50,\"type\":\"int\",\"control\":\"text\",\"connection_related\":false,\"optional\":false,\"values\":null,\"hint\":{\"en\":\"User-defined fields\",\"zh\":\"用户自定义字段名\"},\"label\":{\"en\":\"Fields\",\"zh\":\"字段名\"}}],\"type\":\"list_object\",\"control\":\"list\",\"connection_related\":false,\"optional\":false,\"values\":null,\"hint\":{\"en\":\"The style generated by the source can define multiple fields. The style is json, for example {\\\"count\\\":50}.\",\"zh\":\"源生成的样式,可定义多个字段。样式为json,例如{\\\"count\\\":50}\"},\"label\":{\"en\":\"Pattern\",\"zh\":\"样式\"}}],\"schemaDesc\":{\"en\":\"The source will generate random inputs with a specified pattern.\",\"zh\":\"随机源将生成具有指定样式的随机输入。\"},\"trueType\":\"source\",\"nodeType\":\"random\",\"inputs\":[],\"outputs\":[]},\"class\":\"BasicNode is-source\",\"html\":\"BasicNode\",\"typenode\":\"vue\",\"inputs\":{},\"outputs\":{\"output_1\":{\"connections\":[{\"node\":\"2\",\"output\":\"input_1\"}]}},\"pos_x\":48,\"pos_y\":211}}},\"mongo6580\":{\"type\":\"sink\",\"nodeType\":\"mongo\",\"props\":{\"node\":{\"id\":2,\"name\":\"mongo\",\"data\":{\"id\":\"mongo6580\",\"name\":\"mongo\",\"label\":{\"en\":\"mongodb\",\"zh\":\"mongodb\"},\"type\":\"input\",\"group\":\"sink\",\"properties\":[{\"exist\":false,\"name\":\"url\",\"default\":\"\",\"type\":\"string\",\"control\":\"text\",\"connection_related\":false,\"optional\":false,\"values\":null,\"hint\":{\"en\":\"The URL for connecting to Mongodb, which contains the connection account and password.\",\"zh\":\"连接Mongodb的URL,其中包含连接账号和密码。\"},\"label\":{\"en\":\"Connection URL\",\"zh\":\"连接URL\"}},{\"exist\":false,\"name\":\"document\",\"default\":null,\"type\":\"string\",\"control\":\"text\",\"connection_related\":false,\"optional\":false,\"values\":null,\"hint\":{\"en\":\"Enter the name of the written document.\",\"zh\":\"填入写入文档的名称。\"},\"label\":{\"en\":\"Document name\",\"zh\":\"文档名称\"}}],\"schemaDesc\":{\"en\":\"This plug-in writes data to the Mongodb database plug-in and can be used to store analysis data into a specified database.\",\"zh\":\"本插件为数据写入到Mongodb数据库插件,可以用于将分析数据存入指定的数据库中。\"},\"trueType\":\"sink\",\"nodeType\":\"mongo\",\"inputs\":[],\"outputs\":[],\"record\":{\"url\":\"mongodb://mongo_BJH5dT:mongo_rDzKir@18.156.197.225:27017\",\"document\":\"3xi_saas\",\"runAsync\":false,\"omitIfEmpty\":false,\"sendSingle\":true,\"dataTemplate\":\"\",\"bufferLength\":1024,\"enableCache\":false,\"format\":\"json\",\"schemaName\":\"\",\"schemaMessage\":\"\",\"delimiter\":\"\"}},\"class\":\"BasicNode is-sink\",\"html\":\"BasicNode\",\"typenode\":\"vue\",\"inputs\":{\"input_1\":{\"connections\":[{\"node\":\"1\",\"input\":\"output_1\"}]}},\"outputs\":{},\"pos_x\":388.4453125,\"pos_y\":282},\"url\":\"mongodb://mongo_BJH5dT:mongo_rDzKir@18.156.197.225:27017\",\"document\":\"3xi_saas\",\"runAsync\":false,\"omitIfEmpty\":false,\"sendSingle\":true,\"bufferLength\":1024,\"enableCache\":false,\"format\":\"json\"}}},\"topo\":{\"sources\":[\"random2306\"],\"edges\":{\"random2306\":[\"mongo6580\"]}}}} error : unsupported type:%!t(<nil>)." file="server/rest.go:89"

规则语法不对。这是用manager生成的?可能已经有些不兼容了。把那些null的部分去掉,手动用REST API 发吧

写的Portable插件,写插件也没有说注意啥,对应null的字段都不知道是哪里来的 :sweat_smile:,这个工具着实让我花了些时间,最后个版本对比下来,2.X的根本没法用,好像和给的mirror事例不兼容,有没有在2.x版本上开发的详细教程呢?或者麻烦指导下1.14.7版本上关闭后重启启动不了

你的规则里一堆null,不是插件里的字段

但是为啥相同的插件在1.14.7的版本是可以正常创建的 :smiling_face_with_tear:

有关于Portable插件的开发的详细文档吗?

还请帮帮忙,1.14.7版本关闭规则后再开启就报错,只有重启ekuiper后才能重启规则,应该是有个线程没有关闭,但是啥原因没有关闭,还请指教下 :tulip: