CD2 DAP Client Issues when running via CRON

Community Participant

I created a shell script that uses the DAP client to run the CD2 sync commands. The script works fine when run manually, but when I try to schedule it with CRON it fails with the stacktrace below.

DAP Client Version: 0.3.10

I simplified the script to run a single "dap list" command and I still receive the error


CRONOUTPUT: 2023-08-15 15:31:03,679 - ERROR - malformed HTTP response:
CRONOUTPUT: Forbidden; invalid authentication data.
CRONOUTPUT: 2023-08-15 15:31:03,680 - ERROR - malformed HTTP response
CRONOUTPUT: Traceback (most recent call last):
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/", line 138, in console_entry
CRONOUTPUT:     main()
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/", line 130, in main
CRONOUTPUT:   File "/usr/lib/python3.10/asyncio/", line 44, in run
CRONOUTPUT:     return loop.run_until_complete(main)
CRONOUTPUT:   File "/usr/lib/python3.10/asyncio/", line 649, in run_until_complete
CRONOUTPUT:     return future.result()
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/commands/", line 31, in execute
CRONOUTPUT:     executed = await super().execute(args)
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/commands/", line 49, in execute
CRONOUTPUT:     if await subcommand.execute(args):
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/commands/", line 45, in execute
CRONOUTPUT:     await self._execute_impl(args)
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/commands/", line 153, in _execute_impl
CRONOUTPUT:     tables = await session.get_tables(args.namespace)
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/", line 363, in get_tables
CRONOUTPUT:     table_list = await self._get(f"/dap/query/{namespace}/table", TableList)
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/", line 193, in _get
CRONOUTPUT:     await self.authenticate()
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/", line 328, in authenticate
CRONOUTPUT:     properties = await self._post_auth_request(self._credentials.basic_credentials)
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/", line 278, in _post_auth_request
CRONOUTPUT:     return await self._process(response, TokenProperties, suppress_output=True)
CRONOUTPUT:   File "/usr/local/lib/python3.10/dist-packages/dap/", line 298, in _process
CRONOUTPUT:     raise DAPClientError("malformed HTTP response")
CRONOUTPUT: dap.api.DAPClientError: malformed HTTP response





Labels (4)