Error! Failed to publish commerce data for ... to LMS - I already check the other related post

84 views
Skip to first unread message

Leo Zurick

unread,
Jun 10, 2019, 1:35:37 PM6/10/19
to General Open edX discussion
And i have no idea where to start. Please help how to debug this

Leo Zurick

unread,
Jun 10, 2019, 3:11:20 PM6/10/19
to General Open edX discussion
Jun 10 19:07:16 ironwood [service_variant=ecommerce][django.request] WARNING [ironwood  2542] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py:152] - $
Jun 10 19:07:16 ironwood [service_variant=ecommerce][django.request] WARNING [ironwood  2542] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py:152] - $
Jun 10 19:07:16 ironwood [service_variant=ecommerce][django.request] WARNING [ironwood  2542] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py:152] - $
Jun 10 19:07:17 ironwood [service_variant=ecommerce][django.request] WARNING [ironwood  2544] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py:152] - $
Jun 10 19:07:17 ironwood [service_variant=ecommerce][django.request] WARNING [ironwood  2544] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py:152] - $
Jun 10 19:07:17 ironwood [service_variant=ecommerce][django.request] WARNING [ironwood  2544] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py:152] - $
Jun 10 19:08:01 ironwood [service_variant=ecommerce][ecommerce.courses.models] INFO [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/courses/models.py:205] - Retrieved course seat child produc$
Jun 10 19:08:01 ironwood [service_variant=ecommerce][ecommerce.courses.models] INFO [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/courses/models.py:247] - Retrieved course seat product stoc$
Jun 10 19:08:01 ironwood [service_variant=ecommerce][ecommerce.courses.models] INFO [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/courses/models.py:205] - Retrieved course seat child produc$
Jun 10 19:08:01 ironwood [service_variant=ecommerce][ecommerce.courses.models] INFO [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/courses/models.py:247] - Retrieved course seat product stoc$
Jun 10 19:08:03 ironwood [service_variant=ecommerce][ecommerce.courses.publishers] ERROR [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/courses/publishers.py:112] - Failed to publish commerc$
Traceback (most recent call last):
  File "/edx/app/ecommerce/ecommerce/ecommerce/courses/publishers.py", line 100, in publish
    commerce_api_client = site.siteconfiguration.commerce_api_client
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/edx/app/ecommerce/ecommerce/ecommerce/core/models.py", line 457, in commerce_api_client
    return EdxRestApiClient(self.build_lms_url('/api/commerce/v1/'), jwt=self.access_token)
  File "/edx/app/ecommerce/ecommerce/ecommerce/core/models.py", line 384, in access_token
    token_type='jwt'
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/edx_rest_api_client/client.py", line 142, in get_oauth_access_token
    return get_oauth_access_token(url, client_id, client_secret, token_type=token_type)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/edx_rest_api_client/client.py", line 76, in get_oauth_access_token
    data = response.json()
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
JSONDecodeError: Expecting value: line 9 column 1 (char 8)
Jun 10 19:08:03 ironwood [service_variant=ecommerce][ecommerce.extensions.api.serializers] ERROR [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py:585] - Failed to$
Traceback (most recent call last):
  File "/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py", line 582, in save
    raise Exception(resp_message)
    GNU nano 2.5.3                                               File: /edx/var/log/ecommerce/edx.log                                                                                                      

  Jun 10 19:08:01 ironwood [service_variant=ecommerce][ecommerce.courses.models] INFO [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/courses/models.py:247] - Retrieved course seat product stoc$
  Jun 10 19:08:03 ironwood [service_variant=ecommerce][ecommerce.courses.publishers] ERROR [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/courses/publishers.py:112] - Failed to publish commerc$
  Traceback (most recent call last):
    File "/edx/app/ecommerce/ecommerce/ecommerce/courses/publishers.py", line 100, in publish
      commerce_api_client = site.siteconfiguration.commerce_api_client
    File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/edx/app/ecommerce/ecommerce/ecommerce/core/models.py", line 457, in commerce_api_client
      return EdxRestApiClient(self.build_lms_url('/api/commerce/v1/'), jwt=self.access_token)
    File "/edx/app/ecommerce/ecommerce/ecommerce/core/models.py", line 384, in access_token
      token_type='jwt'
    File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/edx_rest_api_client/client.py", line 142, in get_oauth_access_token
      return get_oauth_access_token(url, client_id, client_secret, token_type=token_type)
    File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/edx_rest_api_client/client.py", line 76, in get_oauth_access_token
      data = response.json()
    File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/requests/models.py", line 897, in json
      return complexjson.loads(self.text, **kwargs)
    File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/__init__.py", line 518, in loads
      return _default_decoder.decode(s)
    File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode
      obj, end = self.raw_decode(s)
    File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
      return self.scan_once(s, idx=_w(s, idx).end())
  JSONDecodeError: Expecting value: line 9 column 1 (char 8)
  Jun 10 19:08:03 ironwood [service_variant=ecommerce][ecommerce.extensions.api.serializers] ERROR [ironwood  2544] [/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py:585] - Failed to$
  Traceback (most recent call last):
    File "/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py", line 582, in save
      raise Exception(resp_message)
  Exception: Failed to publish commerce data for course-v1:edX+DemoX+Demo_Course to LMS.

Leo Zurick

unread,
Jun 10, 2019, 3:12:24 PM6/10/19
to General Open edX discussion
any idea?

Leo Zurick

unread,
Jun 10, 2019, 3:12:38 PM6/10/19
to General Open edX discussion
please help

Leo Zurick

unread,
Jun 10, 2019, 3:15:08 PM6/10/19
to General Open edX discussion
I tried to create a new one... same error
I tried to edit the one that comes with the installation  " course-v1:edX+DemoX+Demo_Course", same problem

Leo Zurick

unread,
Jun 10, 2019, 3:17:09 PM6/10/19
to General Open edX discussion
discover api seems to be running 
when i tried mysite.com:18381

I got


Screen Shot 2019-06-10 at 3.15.33 PM.png



Leo Zurick

unread,
Jun 10, 2019, 3:17:29 PM6/10/19
to General Open edX discussion
is that normal ?

Şükrü Kocakaya

unread,
Jul 9, 2019, 8:01:29 AM7/9/19
to General Open edX discussion
Hi Leo ,

I'm dealing with the same problem, did you find a solution for this ? 

ODS_steel

unread,
Jul 23, 2019, 7:55:52 AM7/23/19
to General Open edX discussion
Did anyone come up with a solution to this?

The default port within the ecommerce.yml and lms.env.json for the catalog API  ("COURSE_CATALOG_API_URL") is 8008. Is this a legacy default port - should we change this 18381?
Reply all
Reply to author
Forward
0 new messages