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