Error while installing latest devstack

494 views
Skip to first unread message

frank

unread,
Aug 13, 2015, 11:09:49 AM8/13/15
to Open edX operations
here i'm posting the error log appeared during the installation of edx developer stack.Please help me to fix this.

==> default: TASK: [local_dev | create OAuth2 Clients] ************************************* 
==> default: failed: [localhost] => (item={'id': u'some-secret', 'url_root': u'http://localhost:8002', 'secret': u'some-secret', 'name': u'ecommerce'}) => {"changed": true, "cmd": "/edx/bin/python.edxapp /edx/bin/manage.edxapp lms --settings=aws create_oauth2_client http://localhost:8002 \"http://localhost:8002/complete/edx-oidc/\" confidential --client_name ecommerce --client_id some-secret --client_secret some-secret --trusted", "delta": "0:00:07.195584", "end": "2015-08-13 15:00:50.995958", "item": {"id": "some-secret", "name": "ecommerce", "secret": "some-secret", "url_root": "http://localhost:8002"}, "rc": 1, "start": "2015-08-13 15:00:43.800374", "warnings": []}
==> default: stderr: 2015-08-13 11:00:49,783 INFO 5625 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
==> default: Unknown command: 'create_oauth2_client'
==> default: Type 'manage.edxapp help' for usage.
==> default: 
==> default: FATAL: all hosts have already failed -- aborting
==> default: 
==> default: PLAY RECAP ******************************************************************** 
==> default:            to retry, use: --limit @/root/vagrant-devstack.retry
==> default: localhost                  : ok=349  changed=86   unreachable=0    failed=1   
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

frank

unread,
Aug 14, 2015, 2:11:46 AM8/14/15
to Open edX operations
i'm stuck with this issue. have any one faced this ? please help me to fix this.

Dmitriy Sakryukin

unread,
Sep 23, 2015, 7:05:01 AM9/23/15
to Open edX operations
I resolved this problem. I found script that throws error afterwards I compared with older repositories in githab.
Script is located in  /edx/app/edx_ansible/edx_ansible/playbooks/roles/local_dev/tasks/main.yml

You should comment string from '- name: create OAuth2 Clients' to 'when: item.name != ''None'
and in general ansible script (/edx/app/edx_ansible/edx_ansible/playbooks/vagrant-devstack.yml) you should comment steps that already was completed. it is from '- edx_ansible' to 'browsermob-proxy'.

Next step : vagrant provision

четверг, 13 августа 2015 г., 21:09:49 UTC+6 пользователь frank написал:

Ed Zarecor

unread,
Sep 23, 2015, 8:17:33 AM9/23/15
to Open edX operations
Dmitry,

Could you PR your change please?  Would be most helpful.

Best,

Ed.

Dmitriy Sakryukin

unread,
Sep 23, 2015, 8:37:12 AM9/23/15
to Open edX operations
of course:
/edx/app/edx_ansible/edx_ansible/playbooks/roles/local_dev/tasks/main.yml You can check this script here https://github.com/edx/configuration/tree/master/playbooks/roles/local_dev/tasks changing branch
...
#- name: create OAuth2 Clients
#  shell: >
#    {{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp lms --settings=aws
#    create_oauth2_client
#    {{ item.url_root }}
#    "{{ item.url_root }}/complete/edx-oidc/"
#    confidential
#    --client_name {{ item.name }}
#    --client_id {{ item.id }}
#    --client_secret {{ item.secret }}
#    --trusted
#  sudo_user: "{{ edxapp_user }}"
#  environment: "{{ edxapp_environment }}"
#  with_items: localdev_oauth2_clients
#  when: item.name != 'None'



/edx/app/edx_ansible/edx_ansible/playbooks/vagrant-devstack.yml I commented rows in this file because when you will try to provision then vagrant will throw git error about your local copy differ from repository. And I commented rows that successfully finished .

- name: Configure instance(s)
  hosts: all
  sudo: True
  gather_facts: True
  vars:
    migrate_db: 'yes'
    openid_workaround: true
    devstack: true
    disable_edx_services: true
    mongo_enable_journal: false
    EDXAPP_NO_PREREQ_INSTALL: 0
    COMMON_MOTD_TEMPLATE: 'devstack_motd.tail.j2'
    COMMON_SSH_PASSWORD_AUTH: "yes"
    ENABLE_LEGACY_ORA: !!null
    EDXAPP_LMS_BASE: 127.0.0.1:8000
    EDXAPP_OAUTH_ENFORCE_SECURE: false
    EDXAPP_LMS_BASE_SCHEME: http
  roles:
#    - edx_ansible
#    - edxlocal
#    - mongo
#    - edxapp
#    - oraclejdk
#    - elasticsearch
#    - forum
#    - ecommerce
#    - role: notifier
#      NOTIFIER_DIGEST_TASK_INTERVAL: "5"
#    - role: ora
#      when: ENABLE_LEGACY_ORA
#    - browsers
#    - browsermob-proxy
    - local_dev
    - demo


David Baumgold

unread,
Sep 23, 2015, 10:40:38 AM9/23/15
to Open edX operations
Dmitriy, I believe that Ed is asking you to make a pull request to the edx/configuration repository, so that your change can be merged into it. GitHub has some good documentation on how to fork a repository and make a pull request, if you're unfamiliar with the process.

David Baumgold
Developer Advocate, edX

Dmitriy Sakryukin

unread,
Sep 24, 2015, 1:01:35 AM9/24/15
to Open edX operations
Thank you, David. I wrong understand PR abbreviation, thanks for the definition. I will try to do PR in the next days

среда, 23 сентября 2015 г., 20:40:38 UTC+6 пользователь David Baumgold написал:

陈俊州

unread,
Nov 5, 2015, 6:33:16 AM11/5/15
to Open edX operations
The error message that I have occurred to you is as follows:
TASK: [oauth_client_setup | create OAuth2 Clients] ****************************
failed: [localhost] => (item={'id': u'ecommerce-key', 'url_root': u'http://localhost:8002', 'secret': u'ecommerce-secret', 'name': u'ecommerce'}) => {"changed": true, "cmd": "/edx/bin/python.edxapp /edx/bin/manage.edxapp lms --settings=aws create_oauth2_client http://localhost:8002 \"http://localhost:8002/complete/edx-oidc/\" confidential --client_name ecommerce --client_id ecommerce-key --client_secret ecommerce-secret --trusted", "delta": "0:00:05.115100", "end": "2015-11-05 02:06:50.624637", "item": {"id": "ecommerce-key", "name": "ecommerce", "secret": "ecommerce-secret", "url_root": "http://localhost:8002"}, "rc": 1, "start": "2015-11-05 02:06:45.509537", "warnings": []}
stderr: 2015-11-04 21:06:49,501 INFO 26845 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
Unknown command: 'create_oauth2_client'

Type 'manage.edxapp help' for usage.
skipping: [localhost] => (item={'id': u'{# INSIGHTS_OAUTH2_KEY #}', 'url_root': u'{# INSIGHTS_BASE_URL #}', 'secret': u'{# INSIGHTS_OAUTH2_SECRET #}', 'name': u'None'})
failed: [localhost] => (item={'id': u'programs-key', 'url_root': u'http://localhost:8004', 'secret': u'programs-secret', 'name': u'programs'}) => {"changed": true, "cmd": "/edx/bin/python.edxapp /edx/bin/manage.edxapp lms --settings=aws create_oauth2_client http://localhost:8004 \"http://localhost:8004/complete/edx-oidc/\" confidential --client_name programs --client_id programs-key --client_secret programs-secret --trusted", "delta": "0:00:02.033712", "end": "2015-11-05 02:06:52.881524", "item": {"id": "programs-key", "name": "programs", "secret": "programs-secret", "url_root": "http://localhost:8004"}, "rc": 1, "start": "2015-11-05 02:06:50.847812", "warnings": []}
stderr: 2015-11-04 21:06:52,666 INFO 26876 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
Unknown command: 'create_oauth2_client'

Type 'manage.edxapp help' for usage.
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************

           to retry, use: --limit @/root/vagrant-devstack.retry
localhost                  : ok=5    changed=0    unreachable=0    failed=1

 
"create_oauth2_client" command defined in edx-oauth2-provider . execute command:
sudo su edxapp
source
/edx/app/edxapp/venvs/edxapp/bin/active
pip install git
+https://github.com/edx/edx-oauth2-...@0.5.7#egg=oauth2-provider==0.5.7

and edit /edx/app/edxapp/edx-platform/lms/envs/common.py: add edx-oauth2-provider in INSTALL_APPS. and install again:
(edx_ansible)root@precise64:/edx/app/edx_ansible/edx_ansible/playbooks# ansible-playbook -i localhost, -c local vagrant-devstack.yml -e configuration_version=master  --start-at-task="oauth_client_setup | create OAuth2 Clients"
PLAY [Configure instance(s)] **************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [oauth_client_setup | create OAuth2 Clients] ****************************
changed: [localhost] => (item={'id': u'ecommerce-key', 'url_root': u'http://localhost:8002', 'secret': u'ecommerce-secret', 'name': u'ecommerce'})
skipping: [localhost] => (item={'id': u'{# INSIGHTS_OAUTH2_KEY #}', 'url_root': u'{# INSIGHTS_BASE_URL #}', 'secret': u'{# INSIGHTS_OAUTH2_SECRET #}', 'name': u'None'})
changed: [localhost] => (item={'id': u'programs-key', 'url_root': u'http://localhost:8004', 'secret': u'programs-secret', 'name': u'programs'})
PLAY RECAP ********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0

it's success~


在 2015年8月13日星期四 UTC+8下午11:09:49,frank写道:
Reply all
Reply to author
Forward
0 new messages