Issue with installing stackstorm

1,295 views
Skip to first unread message

Surajit Roy

unread,
Jul 9, 2015, 7:51:05 AM7/9/15
to stack...@googlegroups.com
Have anyone seen this error

# Installing st2web
webui/font/
webui/font/ststanley-embedded.css
webui/font/ststanley-ie7.css
webui/font/ststanley.woff
webui/font/ststanley-ie7-codes.css
webui/font/ststanley.ttf
webui/font/ststanley.css
webui/font/ststanley.svg
webui/font/ststanley.eot
webui/font/ststanley-codes.css
webui/font/animation.css
webui/index.html
webui/js/
webui/js/templates.js
webui/js/components.js
webui/js/modules.js
webui/img/
webui/img/logo.svg
webui/config.js
webui/css/
webui/css/style.css
###########################################################################################
# Migrating rules (pack inclusion).
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/st2common/bin/migrate_rules_to_include_pack.py", line 151, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/st2common/bin/migrate_rules_to_include_pack.py", line 141, in main
    username=username, password=password)
  File "/usr/lib/python2.7/dist-packages/st2common/models/db/__init__.py", line 35, in db_setup
    username=username, password=password)
  File "/usr/local/lib/python2.7/dist-packages/mongoengine/connection.py", line 161, in connect
    return get_connection(alias)
  File "/usr/local/lib/python2.7/dist-packages/mongoengine/connection.py", line 124, in get_connection
    raise ConnectionError("Cannot connect to database %s :\n%s" % (alias, e))
mongoengine.connection.ConnectionError: Cannot connect to database default :
[Errno 111] Connection refused


I tried everything but not able to find the root cause.

Thanks
Surajit

James Fryman

unread,
Jul 9, 2015, 11:21:39 AM7/9/15
to Surajit Roy, stack...@googlegroups.com
Hi Surajit.

Thanks for writing in. I am sorry you are having problems! Let's see if we can't sort you out.

First, can I get some details on your install? Are you using st2_deploy.sh to install? Likewise, what kind of server are you installing this on?

The error you have below seems to indicate that the services are unable to connect to MongoDB. I would check a few things first:

1. Is the MongoDB service up and running? 
2. Do you have any firewall rules preventing connection to the default port?

Let me know what you find.

-James


--
You received this message because you are subscribed to the Google Groups "StackStorm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stackstorm+...@googlegroups.com.
To post to this group, send email to stack...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stackstorm/CAAxzCObDULwWJAbddG5AeWq%2BaYDFOAitt0K6sgp8REUxmhtPuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Surajit Roy

unread,
Jul 10, 2015, 7:44:37 AM7/10/15
to James Fryman, stack...@googlegroups.com
I tried with st2_deploy.sh. I figured out a space issue. But is strange, I had this installation go fine in a same VM with same space.
 But my goal is to automate the deployment via ansible. I was trying the manual step to see what packages we have to to our local apt repo.
In that also on the last step where I have to get the st2 debian packages I got an error

Setting up st2api (0.11.0-6) ...
Setting up st2auth (0.11.0-6) ...
dpkg: dependency problems prevent configuration of python-st2client:
 python-st2client depends on python-prettytable; however:
  Package python-prettytable is not installed.
 python-st2client depends on python-yaml; however:
  Package python-yaml is not installed.
 python-st2client depends on python-dateutil; however:
  Package python-dateutil is not installed.
 python-st2client depends on python-jsonpath-rw; however:
  Package python-jsonpath-rw is not installed.

dpkg: error processing package python-st2client (--install):
 dependency problems - leaving unconfigured

Let me know if you can help.
Also want to know if you guys have some kind of ansible playbooks already for this deployment.

Thanks
Surajit

Surajit Roy

unread,
Jul 10, 2015, 7:48:54 AM7/10/15
to James Fryman, stack...@googlegroups.com
I resolved this via apt-get -f install.
And then restarted the all the st2 services "st2ctl restart"

Getting this error now to generate the token

 st2 auth testu -p testp
ERROR: HTTPConnectionPool(host='localhost', port=9100): Max retries exceeded with url: /tokens (Caused by <class 'socket.error'>: [Errno 111] Connection refused)


Surajit Roy

unread,
Jul 10, 2015, 7:53:15 AM7/10/15
to James Fryman, stack...@googlegroups.com
st2ctl reload
Registering content...[flags = --register-sensors --register-actions]
2015-07-10 03:27:56,617 INFO [-] Connecting to database "st2" @ "0.0.0.0:27017" as user "None".
2015-07-10 03:27:56,696 INFO [-] =========================================================
2015-07-10 03:27:56,696 INFO [-] ############## Registering sensors ######################
2015-07-10 03:27:56,697 INFO [-] =========================================================
2015-07-10 03:27:56,819 INFO [-] Registered 1 sensors.
2015-07-10 03:27:56,819 INFO [-] =========================================================
2015-07-10 03:27:56,820 INFO [-] ############## Registering actions ######################
2015-07-10 03:27:56,820 INFO [-] =========================================================
2015-07-10 03:27:57,177 INFO [-] Registered 37 actions.
##### st2 components status #####
st2actionrunner is not running.
st2api is not running.
st2auth is not running.
st2sensorcontainer is not running.
st2rulesengine is not running.
mistral is not running.
st2web is not running.
st2resultstracker is not running.
st2notifier is not running.

I see mistral not running. How can we make it run and will that fix ths connection error?

Surajit Roy

unread,
Jul 10, 2015, 7:54:26 AM7/10/15
to James Fryman, stack...@googlegroups.com
I am on ubuntu 14.0.4 64 bit.
I got the debian packages from

Patrick Hoolboom

unread,
Jul 10, 2015, 10:35:06 AM7/10/15
to Surajit Roy, James Fryman, stack...@googlegroups.com
`sudo st2ctl restart` should restart all of the components.  The connection error you mentioned a few messages up is simply because non of the services are running.

Surajit Roy

unread,
Jul 13, 2015, 3:50:41 AM7/13/15
to Patrick Hoolboom, James Fryman, stack...@googlegroups.com
I have tried that.

sudo st2ctl restart

Stopping st2actionrunner | actionrunner.
st2actionrunner is not running
Stopping st2api | st2api.
st2api is not running
Stopping st2auth | st2auth.
st2auth is not running
Stopping st2sensorcontainer | sensor_container.
st2sensorcontainer is not running
Stopping st2rulesengine | rules_engine.
st2rulesengine is not running
mistral is not running
st2web is not running
Stopping st2resultstracker | st2resultstracker.
st2resultstracker is not running
Stopping st2notifier | st2notifier.
st2notifier is not running
mistral: unrecognized service

Not able to understand where to look at, is there a log which can show me whats happening.
I have followed the steps for manual installation of Debian.



Surajit Roy

unread,
Jul 13, 2015, 3:53:15 AM7/13/15
to Patrick Hoolboom, James Fryman, stack...@googlegroups.com
I got this after the restart


sudo st2ctl status
##### st2 components status #####
st2actionrunner PID: 1570
st2actionrunner PID: 1571
st2actionrunner PID: 1572
st2actionrunner PID: 1573
st2actionrunner PID: 1574
st2actionrunner PID: 1575
st2actionrunner PID: 1576
st2actionrunner PID: 1577
st2actionrunner PID: 1578
st2actionrunner PID: 1579
st2api PID: 1581
st2auth PID: 1580
st2sensorcontainer PID: 1582
st2rulesengine PID: 1585
mistral is not running.
st2web is not running.
st2resultstracker PID: 1583
st2notifier PID: 1584


Its showing mistral is not running.
st2web not running.

Surajit Roy

unread,
Jul 13, 2015, 4:39:19 AM7/13/15
to Patrick Hoolboom, James Fryman, stack...@googlegroups.com
I am getting an error while creating the token

2015-07-13 01:37:13,654 140361782823984 AUDIT log [-] Access denied to anonymous user. (remote_addr='127.0.0.1')
2015-07-13 01:37:13,654 140361782823984 DEBUG log [-] API call failed: None
2015-07-13 01:37:13,654 140361782823984 DEBUG log [-] Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pecan/core.py", line 625, in __call__
    self.invoke_controller(controller, args, kwargs, state)
  File "/usr/local/lib/python2.7/dist-packages/pecan/core.py", line 531, in invoke_controller
    result = controller(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/st2common/models/api/base.py", line 160, in callfunction
    result = f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/st2auth/controllers/auth.py", line 46, in post
    return self._handle_proxy_auth(request=request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/st2auth/controllers/auth.py", line 64, in _handle_proxy_auth
    self._abort_request()
  File "/usr/lib/python2.7/dist-packages/st2auth/controllers/auth.py", line 117, in _abort_request
    pecan.abort(status_code, message)
  File "/usr/local/lib/python2.7/dist-packages/pecan/core.py", line 119, in abort
    **kw
HTTPUnauthorized: Invalid or missing credentials

James Fryman

unread,
Jul 13, 2015, 9:39:27 AM7/13/15
to Surajit Roy, Patrick Hoolboom, stack...@googlegroups.com
Hi again, Surajit!

Apologies you are still having problems. This looks like it is an issue having to do with Authentication. Once you have Authentication enabled, all clients (including the CLI and WebUI) require a username/password. Under what circumstances are you running into this error?

Let me provide a few hints while you provide additional details...

How have you currently configured authentication? Have you successfully configured and tested with curl to make sure the authentication subsystem works properly? Take a look at http://docs.stackstorm.com/authentication.html#testing to make sure that you can properly send/receive a token. 

To that end, please take a look at http://docs.stackstorm.com/cli.html#cli-configuration. There is a section in the st2 configuration file labeled "credentials" that you will need to ensure a valid username/password for Authentication has been setup.

Please let us know how this goes. Thanks!

-James

Surajit Roy

unread,
Jul 15, 2015, 5:19:58 AM7/15/15
to James Fryman, Patrick Hoolboom, stack...@googlegroups.com
Thanks

Do you guys have any ansible playbook or chef cookbook to install stackstorm rather than thest2_deploy.sh?

James Fryman

unread,
Jul 15, 2015, 9:37:56 AM7/15/15
to Surajit Roy, Patrick Hoolboom, stack...@googlegroups.com
Absolutely we do!

We have:

* Salt (under development!)

Try it out with any of those deploy methods, and as always we're here to help.

Cheers!

-James

Surajit Roy

unread,
Jul 16, 2015, 12:09:38 AM7/16/15
to James Fryman, Patrick Hoolboom, stack...@googlegroups.com
Thanks James. 
I think st2 is a great product, I was planning to develop our own self healing tool using Zaqar with similar lines of event handling.
Then I went to Vancouver and came across st2.

Awesome product, I am trying it our with a great vision of the change the way operations work.
Reply all
Reply to author
Forward
0 new messages