[英]Unable to execute HTTP request: Connect to localhost:8000 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
I'm trying to install dynamodb
locally for docker .我试图安装
dynamodb
本地的码头工人。
I've written the below code from here .我已经从这里编写了以下代码。
docker run -p 8000:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -sharedD
Then I can reach localhost:8000/shell
然后我就可以访问
localhost:8000/shell
In my client java , I set the endpoint在我的客户端java 中,我设置了端点
AmazonDynamoDB client = AmazonDynamoDBClientBuilder
.standard()
.withCredentials(new EnvironmentVariableCredentialsProvider())
.withEndpointConfiguration(
new AwsClientBuilder.EndpointConfiguration("http://localhost:8000/", "eu-central-1")
).build();
but when I run it, log the following error.但是当我运行它时,记录以下错误。
Can anyone help me?谁能帮我? enter code here
在此处输入代码
Replace your endpoint configuration from:从以下位置替换您的端点配置:
http://localhost:8000
To:到:
http://host.docker.internal:8000
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.