I wonder if it has anything to do with the cache settings in lms.env.json?
Below is a copy of the default settings I have in place. 

Do I need to replace "localhost:11211" with domain.com:11211?


"CACHES": {
        "celery": {
            "BACKEND": 
"django.core.cache.backends.memcached.MemcachedCache", 
            "KEY_FUNCTION": "util.memcache.safe_key", 
            "KEY_PREFIX": "celery", 
            "LOCATION": [
                "localhost:11211"
            ], 
            "TIMEOUT": "7200"
        }, 
        "configuration": {
            "BACKEND": 
"django.core.cache.backends.memcached.MemcachedCache", 
            "KEY_FUNCTION": "util.memcache.safe_key", 
            "KEY_PREFIX": "ip-172-31-27-102", 
            "LOCATION": [
                "localhost:11211"
            ]
        }, 
        "course_structure_cache": {
            "BACKEND": 
"django.core.cache.backends.memcached.MemcachedCache", 
            "KEY_FUNCTION": "util.memcache.safe_key", 
            "KEY_PREFIX": "course_structure", 
            "LOCATION": [
                "localhost:11211"
            ], 
            "TIMEOUT": "7200"
        }, 
        "default": {
            "BACKEND": 
"django.core.cache.backends.memcached.MemcachedCache", 
            "KEY_FUNCTION": "util.memcache.safe_key", 
            "KEY_PREFIX": "default", 
            "LOCATION": [
                "localhost:11211"
            ], 


On Wednesday, 24 July 2019 11:29:44 UTC+7, ODS_steel wrote:
>
> Hi,
>
> I am trying to create a new course on the ecommerce platform but encounter 
> the following error: "Error! Failed to publish commerce data for 
> course-v1:SamsungUni+Sam001+2019Q4 to LMS." (see below for screenshot)
>
> [image: Selection_145.png]
>
>
>
> I am using ubuntu 16.04 on AWS and ironwood.master (V2).
>
>
> The *ecommerce log* outputs indicate the following:
>
>
> Jul 24 04:11:59 ip-172-31-27-102 
> [service_variant=ecommerce][ecommerce.courses.publishers] ERROR 
> [ip-172-31-27-102  32431] 
> [/edx/app/ecommerce/ecommerce/ecommerce/courses/publishers.py:112] - Failed 
> to publish commerce data for [course-v1:SamsungUni+Sam001+2019Q4] to LMS.
>
> 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)
>
> Jul 24 04:11:59 ip-172-31-27-102 
> [service_variant=ecommerce][ecommerce.extensions.api.serializers] ERROR 
> [ip-172-31-27-102  32431] 
> [/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py:585] 
> - Failed to save and publish [course-v1:SamsungUni+Sam001+2019Q4]: [Failed 
> to publish commerce data for course-v1:SamsungUni+Sam001+2019Q4 to LMS.]
>
> 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:SamsungUni+Sam001+2019Q4 to LMS.
>
>
>
>
>
>
> The *LMS log* outputs indicate the following:
>
>
> Jul 24 04:24:53 ip-172-31-27-102 
> [service_variant=lms][openedx.core.djangoapps.catalog.utils][env:sandbox] 
> WARNING [ip-172-31-27-102  32580] [utils.py:103] - Failed to get program 
> UUIDs from the cache for site example.com.
>
>
>
>
> I tried changing the WT_PUBLIC_SIGNING_JWK_SET to null in the lms.env.json 
> and cms.env.json files (as suggested in this post 
> <https://groups.google.com/d/msg/edx-code/cgMseEEKGAg/fJ93_7I-DQAJ>) but 
> it doesn't seem to be working
>
>
>
> I set up ecommerce using the installation instructions here 
> <https://openedx.atlassian.net/wiki/spaces/OpenOPS/pages/110330276/How+to+Install+and+Start+the+E-Commerce+Service+in+Native+Installations>
>
>
> Can anyone suggest any solutions please?
>
>
> Thanks in advance
>
>
>

-- 
***Please note! This Google Group has been deprecated - visit 
https://discuss.openedx.org/
--- 
You received this message because you are subscribed to the Google Groups 
"General Open edX discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to edx-code+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/edx-code/70e542b9-20f3-4440-ae77-35e1d2e2cc76%40googlegroups.com.

Reply via email to