Closed samuelpraveen closed 8 years ago
@samuelpraveen Some rules depends on triggers which are registered via sensors or triggers (in Slack case, trigger is registered via sensor).
Please run register content flag with --register-sensors --register-triggers
flag. This way all the necessary triggers which are used by rules will be registered as well.
Note to myself / us : We should consider catching TriggerDoesNotExistException
exception in scenario like this and throw a more user-friendly exception (something along the lines I have written above).
@Kami: @samuelpraveen did run it with --register-triggers flag indeed. See https://stackstorm-community.slack.com/files/samuelp/F28SP5ZU3/-.txt. I think there is a legit bug somewhere.
@Kami: @lakshmi-kannan: running with --register-sensors and --register-triggers flag was fine. snippet is below
root@ubuntu:/opt/stackstorm/virtualenvs# st2ctl reload --register-triggers Registering content...[flags = --register-triggers] 2016-09-08 10:26:05,814 INFO [-] Connecting to database "st2" @ "0.0.0.0:27017" as user "None". 2016-09-08 10:26:05,906 INFO [-] ========================================================= 2016-09-08 10:26:05,906 INFO [-] ############## Registering triggers ##################### 2016-09-08 10:26:05,906 INFO [-] ========================================================= 2016-09-08 10:26:06,110 INFO [-] Registered 1 triggers.
st2actionrunner PID: 10730 st2actionrunner PID: 10733 st2actionrunner PID: 10736 st2actionrunner PID: 10739 st2api PID: 7242 st2api PID: 7248 st2stream PID: 10754 st2stream PID: 10991 st2auth PID: 10761 st2auth PID: 10995 st2garbagecollector PID: 10768 st2notifier PID: 10775 st2resultstracker PID: 10782 st2rulesengine PID: 10789 st2sensorcontainer PID: 10800 st2chatops PID: 10813 mistral-server PID: 10847 mistral-api PID: 10835 mistral-api PID: 10931 mistral-api PID: 10932 root@ubuntu:/opt/stackstorm/virtualenvs# root@ubuntu:/opt/stackstorm/virtualenvs# root@ubuntu:/opt/stackstorm/virtualenvs# st2ctl reload --register-sensors Registering content...[flags = --register-sensors] 2016-09-08 10:26:35,411 INFO [-] Connecting to database "st2" @ "0.0.0.0:27017" as user "None". 2016-09-08 10:26:35,507 INFO [-] ========================================================= 2016-09-08 10:26:35,507 INFO [-] ############## Registering sensors ###################### 2016-09-08 10:26:35,507 INFO [-] ========================================================= 2016-09-08 10:26:35,993 INFO [-] Registered 5 sensors.
st2actionrunner PID: 10730 st2actionrunner PID: 10733 st2actionrunner PID: 10736 st2actionrunner PID: 10739 st2api PID: 7242 st2api PID: 7248 st2stream PID: 10754 st2stream PID: 10991 st2auth PID: 10761 st2auth PID: 10995 st2garbagecollector PID: 10768 st2notifier PID: 10775 st2resultstracker PID: 10782 st2rulesengine PID: 10789 st2sensorcontainer PID: 10800 st2chatops PID: 10813 mistral-server PID: 10847 mistral-api PID: 10835 mistral-api PID: 10931 mistral-api PID: 10932
root@ubuntu:/opt/stackstorm/packs# st2ctl reload --register-rules Registering content...[flags = --register-rules] 2016-09-07 09:57:17,650 INFO [-] Connecting to database "st2" @ "0.0.0.0:27017" as user "None". 2016-09-07 09:57:17,750 INFO [-] ========================================================= 2016-09-07 09:57:17,750 INFO [-] ############## Registering rules ######################## 2016-09-07 09:57:17,750 INFO [-] ========================================================= 2016-09-07 09:57:18,065 WARNING [-] Failed to register rules: A simple trigger should have been created when registering triggertype. Cannot create trigger: {'type': 'slack.message', 'parameters': {}, 'pack': 'slack'}. Traceback (most recent call last): File "/usr/bin/st2-register-content", line 22, in
sys.exit(content_loader.main(sys.argv[1:]))
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 354, in main
register_content()
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 329, in register_content
register_rules()
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 224, in register_rules
raise e
st2common.exceptions.triggers.TriggerDoesNotExistException: A simple trigger should have been created when registering triggertype. Cannot create trigger: {'type': 'slack.message', 'parameters': {}, 'pack': 'slack'}.
st2 components status
st2actionrunner PID: 10730 st2actionrunner PID: 10733 st2actionrunner PID: 10736 st2actionrunner PID: 10739 st2api PID: 10747 st2api PID: 10981 st2stream PID: 10754 st2stream PID: 10991 st2auth PID: 10761 st2auth PID: 10995 st2garbagecollector PID: 10768 st2notifier PID: 10775 st2resultstracker PID: 10782 st2rulesengine PID: 10789 st2sensorcontainer PID: 10800 st2chatops PID: 10813 mistral-server PID: 10847 mistral-api PID: 10835 mistral-api PID: 10931
mistral-api PID: 10932
root@ubuntu:/opt/stackstorm/packs# mongo MongoDB shell version: 3.2.9 connecting to: test Welcome to the MongoDB shell. For interactive help, type "help". For more comprehensive documentation, see http://docs.mongodb.org/ Questions? Try the support group http://groups.google.com/group/mongodb-user Server has startup warnings: 2016-09-02T21:10:44.288+0530 I CONTROL [initandlisten] 2016-09-02T21:10:44.288+0530 I CONTROL [initandlisten] * WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. 2016-09-02T21:10:44.288+0530 I CONTROL [initandlisten] * We suggest setting it to 'never' 2016-09-02T21:10:44.288+0530 I CONTROL [initandlisten] 2016-09-02T21:10:44.288+0530 I CONTROL [initandlisten] * WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2016-09-02T21:10:44.288+0530 I CONTROL [initandlisten] * We suggest setting it to 'never' 2016-09-02T21:10:44.288+0530 I CONTROL [initandlisten]