When attempting to trigger a test plan using the Bamboo REST API, a connection timeout is occurring. The code and corresponding error are shown below.
Code:
base_url = "http://bamboo.delawarenorth.com:8085/rest/api/latest/"
execution_response = requests.post(
base_url + "queue/EDC-NITCS",
auth=(args['<user>'], args['<password>']),
data="JOB1&ExecuteAllStages",
headers={'Accept': 'application/json'}
).json()
Error:
| 17-Jan-2023 17:40:32 | Traceback (most recent call last): |
| 17-Jan-2023 17:40:32 | File "scripts/validate_staging_environment.py", line 54, in <module> |
| 17-Jan-2023 17:40:32 | main(docopt(__doc__)) |
| 17-Jan-2023 17:40:32 | File "scripts/validate_staging_environment.py", line 32, in main |
| 17-Jan-2023 17:40:32 | headers={'Accept': 'application/json'}).json() |
| 17-Jan-2023 17:40:32 | File "/home/bamboo/.local/share/virtualenvs/19496961-76316673-E-qKXQIp/lib/python3.6/site-packages/requests/models.py", line 897, in json |
| 17-Jan-2023 17:40:32 | return complexjson.loads(self.text, **kwargs) |
| 17-Jan-2023 17:40:32 | File "/home/bamboo/.local/share/virtualenvs/19496961-76316673-E-qKXQIp/lib/python3.6/site-packages/simplejson/__init__.py", line 525, in loads |
| 17-Jan-2023 17:40:32 | return _default_decoder.decode(s) |
| 17-Jan-2023 17:40:32 | File "/home/bamboo/.local/share/virtualenvs/19496961-76316673-E-qKXQIp/lib/python3.6/site-packages/simplejson/decoder.py", line 372, in decode |
| 17-Jan-2023 17:40:32 | obj, end = self.raw_decode(s) |
| 17-Jan-2023 17:40:32 | File "/home/bamboo/.local/share/virtualenvs/19496961-76316673-E-qKXQIp/lib/python3.6/site-packages/simplejson/decoder.py", line 402, in raw_decode |
| 17-Jan-2023 17:40:32 | return self.scan_once(s, idx=_w(s, idx).end()) |
| 17-Jan-2023 17:40:32 | simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) |
My team has done the following:
- Stopped and started Bamboo.
- Re-created the issue in a local script (received a timeout).
- `curl`ed the endpoint (again received a timeout).
What are next steps we can take to resolve this issue?