[英]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.