質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

Q&A

1回答

419閲覧

StackStormをDockerでインストールできない

Green_man

総合スコア18

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

0グッド

0クリップ

投稿2018/04/20 01:10

編集2022/01/12 10:55

#質問内容
以下のコマンドを打ちDockerを構築しDocker内でStackStormをインストールしようとしたところいつもインストールが失敗してしまいます。

どなたかお知恵をお貸しいただけたら助かります。

#試したこと
【Docker構築】
・nacs2Dockerを構築
#docker run --privileged -it -d -v /root/share/:/share/ --name nacs2 nacs_init_proxy /sbin/init
#docker exec -it nacs2 /bin/bash

・StackStormをインストール
curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=st2admin --password=nacs.n@c5

他にもプロキシを利用しているのでyum,rpm,curl,gitでのプロキシ設定は設定済です
#構築環境
OS:Centos7.4
カーネル:3.10.0-693.21.1.el7.x86_64
Docker:1.13.1

#エラーメッセージ
エラーが発生している部分を抜き出しました

[root@be9bdb662aa9 /]# curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=st2admin --password=nacs.n@c5 *** Detected Distro is CentOS Linux *** *** Detected distro version 7 *** Downloading deployment script from: https://raw.githubusercontent.com/StackStorm/st2-packages/v2.7/scripts/st2bootstrap-el7.sh... Running deployment script for st2 ... OS specific script cmd: bash st2bootstrap-el7.sh --stable --user=st2admin --password=**** 中略 20180420T095151+0000 pymongo.**__errors__**.OperationFailure: not authorized on st2 to execute command { createIndexes: "user_d_b", indexes: [ { unique: true, background: false, sparse: false, key: { name: 1 }, name: "name_1" } ], writeConcern: {} } 20180420T095151+0000 ##### st2 components status ##### 20180420T095151+0000 st2actionrunner is not running. 20180420T095151+0000 st2api is not running. 20180420T095151+0000 st2stream is not running. 20180420T095151+0000 st2auth is not running. 20180420T095151+0000 st2garbagecollector is not running. 20180420T095151+0000 st2notifier is not running. 20180420T095151+0000 st2resultstracker is not running. 中略 20180420T095153+0000 mistral-server is not running. 20180420T095154+0000 mistral.api is not running. 20180420T095154+0000 Registering content...[flags = --config-file /etc/st2/st2.conf --register-all] 20180420T095157+0000 2018-04-20 09:51:57,726 INFO [-] Connecting to database "st2" @ "127.0.0.1:27017" as user "stackstorm". 20180420T095200+0000 2018-04-20 09:52:00,413__** __ERROR__**__ [-] Conflict while trying to save in DB. 20180420T095200+0000 Traceback (most recent call last): 20180420T095200+0000 File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/persistence/base.py", line 174, in add_or_update 20180420T095200+0000 model_object = cls._get_impl().add_or_update(model_object) 20180420T095200+0000 File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/models/db/__init__.py", line 402, in add_or_update 20180420T095200+0000 instance.save() 20180420T095200+0000 File "/opt/stackstorm/st2/lib/python2.7/site-packages/mongoengine/document.py", line 364, in save 20180420T095200+0000 raise N__**otUniqueError**__(message % six.text_type(err)) 20180420T095200+0000 NotUniqueError: Tried to save duplicate unique keys (E11000 duplicate key __**error**__ collection: st2.trigger_d_b index: uid_1 dup key: { : "trigger:core:st2.generic.actiontrigger:99914b932bd37a50b983c5e7c90ae93b" }) 20180420T095201+0000 2018-04-20 09:52:01,096 INFO [-] ========================================================= 20180420T095201+0000 2018-04-20 09:52:01,096 INFO [-] ############## Registering triggers ##################### 20180420T095201+0000 2018-04-20 09:52:01,096 INFO [-] ========================================================= 20180420T095201+0000 2018-04-20 09:52:01,324 INFO [-] Registered 0 triggers. 中略 20180420T095216+0000 --api-version API_VERSION 20180420T095216+0000 API version to use. Get ST2_API_VERSION from the 20180420T095216+0000 environment variables by default. 20180420T095216+0000 --cacert CACERT Path to the CA cert bundle for the SSL endpoints. Get 20180420T095216+0000 ST2_CACERT from the environment variables by default. 20180420T095216+0000 If this is not provided, then SSL cert will not be 20180420T095216+0000 verified. 20180420T095216+0000 --config-file CONFIG_FILE 20180420T095216+0000 Path to the CLI config file 20180420T095216+0000 --print-config Parse the config file and print the values 20180420T095216+0000 --skip-config Don't parse and use the CLI config file 20180420T095216+0000 --debug Enable debug mode 20180420T095216+0000 **__ERROR: 401 Client Error: Unauthorized__** 20180420T095216+0000 Unable to retrieve detailed message from the HTTP response. Expecting value: line 1 column 1 (char 0) 20180420T095216+0000 for url: http://127.0.0.1:9100/tokens 20180420T095216+0000 20180420T095216+0000 ############### ERROR ############### 20180420T095216+0000 # Failed on Verify st2 # 20180420T095216+0000 #####################################

#補足(2018/04/23追記)
https://docs.stackstorm.com/install/rhel7.html#
に従いコマンドを打った所インストールは成功しましたがその後の
データベース作成で以下のエラーが出てしまいました。

[root@d7cad0763624 /]# /opt/stackstorm/mistral/bin/mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running upgrade -> 001, Kilo release CRITI [Mistral] Unhandled error Traceback (most recent call last): File "/opt/stackstorm/mistral/bin/mistral-db-manage", line 11, in <module> sys.exit(main()) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/db/sqlalchemy/migration/cli.py", line 137, in main CONF.command.func(config, CONF.command.name) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/db/sqlalchemy/migration/cli.py", line 62, in do_upgrade do_alembic_command(config, cmd, revision, sql=CONF.command.sql) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/db/sqlalchemy/migration/cli.py", line 43, in do_alembic_command getattr(alembic_cmd, cmd)(config, *args, **kwargs) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/alembic/command.py", line 254, in upgrade script.run_env() File "/opt/stackstorm/mistral/lib/python2.7/site-packages/alembic/script/base.py", line 427, in run_env util.load_python_file(self.dir, 'env.py') File "/opt/stackstorm/mistral/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file module = load_module_py(module_id, path) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/alembic/util/compat.py", line 141, in load_module_py mod = imp.load_source(module_id, path, fp) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/db/sqlalchemy/migration/alembic_migrations/env.py", line 84, in <module> run_migrations_online() File "/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/db/sqlalchemy/migration/alembic_migrations/env.py", line 76, in run_migrations_online context.run_migrations() File "<string>", line 8, in run_migrations File "/opt/stackstorm/mistral/lib/python2.7/site-packages/alembic/runtime/environment.py", line 836, in run_migrations self.get_context().run_migrations(**kw) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/alembic/runtime/migration.py", line 330, in run_migrations step.migration_fn(**kw) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/db/sqlalchemy/migration/alembic_migrations/versions/001_kilo.py", line 47, in upgrade sa.UniqueConstraint('name', 'project_id') File "<string>", line 8, in create_table File "<string>", line 3, in create_table File "/opt/stackstorm/mistral/lib/python2.7/site-packages/alembic/operations/ops.py", line 1120, in create_table return operations.invoke(op) 中略 File "/opt/stackstorm/mistral/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context context) File "/opt/stackstorm/mistral/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute cursor.execute(statement, parameters) ProgrammingError: (psycopg2.ProgrammingError) relation "workbooks_v2" already exists [SQL: '\nCREATE TABLE workbooks_v2 (\n\tcreated_at TIMESTAMP WITHOUT TIME ZONE, \n\tupdated_at TIMESTAMP WITHOUT TIME ZONE, \n\tscope VARCHAR(80), \n\tproject_id VARCHAR(80), \n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(80), \n\tdefinition TEXT, \n\tspec TEXT, \n\ttags TEXT, \n\tPRIMARY KEY (id), \n\tUNIQUE (name, project_id)\n)\n\n'] (Background on this error at: http://sqlalche.me/e/f405)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ディストリビューション/バージョンでインストール方法が違うので怒られているみたいですね。

RHEL7系はこれ
https://docs.stackstorm.com/install/rhel7.html#

Dockerイメージもあるみたいですよ。
https://docs.stackstorm.com/install/docker.html

投稿2018/04/22 16:46

mosapride

総合スコア1480

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

Green_man

2018/04/23 08:41

コメントありがとうございます 提示していただいたURLにしたがいコマンドを打った所データベースの作成で再度エラーが出てしまいました。 "workbooks_v2" already exists など既に何かデータが存在しているのでしょうか? 基本的な知識不足のため恐縮ですがご助言ただけたら助かります 詳細は追加した補足ページに記載させていただきました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問