-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Labels
Description
Checklist
- I have verified that the issue exists against the
masterbranch of Celery. - This has already been asked to the discussion group first.
- I have read the relevant section in the
contribution guide
on reporting bugs. - I have checked the issues list
for similar or identical bug reports. - I have checked the pull requests list
for existing proposed fixes. - I have checked the commit log
to find out if the bug was already fixed in the master branch. - I have included all related issues and possible duplicate issues
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
- I have included the output of
celery -A proj reportin the issue.
(if you are not able to do this, then at least specify the Celery
version affected). - I have verified that the issue exists against the
masterbranch of Celery. - I have included the contents of
pip freezein the issue. - I have included all the versions of all the external dependencies required
to reproduce this bug.
Optional Debugging Information
- I have tried reproducing the issue on more than one Python version
and/or implementation. - I have tried reproducing the issue on more than one message broker and/or
result backend. - I have tried reproducing the issue on more than one version of the message
broker and/or result backend. - I have tried reproducing the issue on more than one operating system.
- I have tried reproducing the issue on more than one workers pool.
- I have tried reproducing the issue with autoscaling, retries,
ETA/Countdown & rate limits disabled. - I have tried reproducing the issue after downgrading
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
- [Fix #5436] Store extending result in all backends #5661
- ElasticSearch can't parse celery result correctly #5660
Possible Duplicates
Environment & Settings
Celery version:
4.4.7
celery report Output:
types in document index requests is deprecated, use the typeless endpoints instead (/{index}/_doc/{id}, /{index}/_doc, or /{index}/_create/{id}).
warnings.warn(message, category=ElasticsearchDeprecationWarning)
[2020-08-18 09:14:06,421: ERROR/MainProcess] Pool callback raised exception: RequestError(400, 'illegal_argument_exception', {'error': {'root_cause': [{'type': 'illegal_argument_exception', 'reason': 'mapper [result.args] of different type, current_type [long], merged_type [text]'}], 'type': 'illegal_argument_exception', 'reason': 'mapper [result.args] of different type, current_type [long], merged_type [text]'}, 'status': 400})
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/billiard/pool.py", line 1796, in safe_apply_callback
fun(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/celery/worker/request.py", line 528, in on_failure
store_result=self.store_errors,
File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 160, in mark_as_failure
traceback=traceback, request=request)
File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 407, in store_result
request=request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 758, in _store_result
self.set(self.get_key_for_task(task_id), self.encode(meta))
File "/usr/local/lib/python3.7/site-packages/celery/backends/elasticsearch.py", line 109, in set
datetime.utcnow().isoformat()[:-3]
File "/usr/local/lib/python3.7/site-packages/celery/backends/elasticsearch.py", line 126, in _index
**kwargs
File "/usr/local/lib/python3.7/site-packages/elasticsearch/client/utils.py", line 139, in _wrapped
return func(*args, params=params, headers=headers, **kwargs)
File "/usr/local/lib/python3.7/site-packages/elasticsearch/client/__init__.py", line 380, in index
body=body,
File "/usr/local/lib/python3.7/site-packages/elasticsearch/transport.py", line 352, in perform_request
timeout=timeout,
File "/usr/local/lib/python3.7/site-packages/elasticsearch/connection/http_urllib3.py", line 256, in perform_request
self._raise_error(response.status, raw_data)
File "/usr/local/lib/python3.7/site-packages/elasticsearch/connection/base.py", line 288, in _raise_error
status_code, error_message, additional_info
elasticsearch.exceptions.RequestError: RequestError(400, 'illegal_argument_exception', 'mapper [result.args] of different type, current_type [long], merged_type [text]')
Steps to Reproduce
Required Dependencies
- Minimal Python Version: 3.7
- Minimal Celery Version: 4.4.0
- Minimal OS and/or Kernel Version: ubuntu
Python Packages
pip freeze Output:
uvicorn==0.11.3
fastapi>=0.61.0
fastapi_permissions==0.2.6
python_multipart==0.0.5
email_validator==1.0.5
requests==2.23.0
celery==4.4.7
Other Dependencies
Details
N/A
Minimally Reproducible Test Case
Details
Expected Behavior
Expected to Save the result backend as Object to elastic search, So I will be able to use it in the dashboard.
Actual Behavior
The result object is saved as text, and after trying all the solutions found after the search, I still have errors and not able to the result backend to elastic search.
Reactions are currently unavailable