Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws dynamodb list-tables --endpoint-url https://localhost:8000 doesn't work in ubuntu 20.04 #8363

Closed
dallas1287 opened this issue Nov 26, 2023 · 2 comments
Assignees
Labels
closed-for-staleness dynamodb response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@dallas1287
Copy link

Describe the bug

I'm trying to use dynamodb-local in a docker container on an ubuntu 20.04 machine. But it can't connect to the exposed port. I'm using the same setup on a windows machine and the same containers and the dynamodb list-tables command works just fine at the local endpoint. The aws dynmodb list-tables command works fine when pointed at actual tables in the cloud and that returns immediately but it can't connect to the local endpoint.

Expected Behavior

the local endpoint works the same as the cloud endpoint and the same behavior as my windows instnace

Current Behavior

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 277, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/botocore/httpsession.py", line 254, in send
urllib_response = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 376, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
raise value
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 423, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 330, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: AWSHTTPConnectionPool(host='localhost', port=8000): Read timed out. (read timeout=60)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/botocore/retryhandler.py", line 269, in _should_retry
return self._checker(attempt_number, response, caught_exception)
File "/usr/lib/python3/dist-packages/botocore/retryhandler.py", line 316, in call
checker_response = checker(attempt_number, response,
File "/usr/lib/python3/dist-packages/botocore/retryhandler.py", line 222, in call
return self._check_caught_exception(
File "/usr/lib/python3/dist-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
raise caught_exception
File "/usr/lib/python3/dist-packages/botocore/endpoint.py", line 200, in _do_get_response
http_response = self._send(request)
File "/usr/lib/python3/dist-packages/botocore/endpoint.py", line 269, in _send
return self.http_session.send(request)
File "/usr/lib/python3/dist-packages/botocore/httpsession.py", line 289, in send
raise ReadTimeoutError(endpoint_url=request.url, error=e)
botocore.exceptions.ReadTimeoutError: Read timeout on endpoint URL: "http://localhost:8000/"

Reproduction Steps

spin up a standard docker container for dynamodb-local and then run
aws dynamodb list-tables --endpoint-url http://localhost:8000

Possible Solution

No response

Additional Information/Context

No response

CLI version used

2.12.6

Environment details (OS name and version, etc.)

Ubuntu 20.04 LTS

@dallas1287 dallas1287 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 26, 2023
@tim-finnigan tim-finnigan self-assigned this Nov 28, 2023
@tim-finnigan
Copy link
Contributor

Hi @dallas1287 thanks for reaching out. I found a few related issues such as #5531 and aws/aws-sdk-js-v3#4294. Have you tried passing in fake credentials as described in #5531 (comment), or changing localhost to 127.0.0.1 as suggested in aws/aws-sdk-js-v3#4294 (comment)? Can you also confirm that no firewall configurations are preventing your connection?

@tim-finnigan tim-finnigan added dynamodb response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 28, 2023
Copy link

github-actions bot commented Dec 3, 2023

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Dec 3, 2023
@github-actions github-actions bot closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness dynamodb response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants