작성
·
662
0
게이트 웨이를 도커에만 올리면 에러가 나옵니다
500 Server Error for HTTP POST "/user-service/login"
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:8889
유레카에서 유저 서비스 클릭 시 : /127.0.0.1:8889
요렇게 나오는데
http://localhost:8888/user-service/default에서는
{
token.expireDate: 20002666,
order_service.url: "http://order-service/order-service/%s/orders",
order_service.exception.user_empty: "user's ord exist3333",
user_service.url: "http://user-service/user",
user_service.exception.user_empty: "user_Empty",
token.secret: "1234"
}
gateway.host: "172.18.0.6",
token.expireDate: 20002666,
이렇게 나옵니다
http://localhost:8000/user-service/default
이건 에러가 나구요
도커의 네트워크는 추가 했구요
"Containers": {
"11a12dd45aaa3274226b1b462e1997b50e9b7ed61b405595c0c3b89393d6e036": {
"Name": "rabbitmq",
"EndpointID": "3425a23e5c021d2bcc307bed1d9b4ac03c17b92d4828f8b633469d8bbe8df8ac",
"MacAddress": "02:42:ac:12:00:04",
"IPv4Address": "172.18.0.4/16",
"IPv6Address": ""
},
"28da3474585596f6a3a435e48cfc9084e7d397fafaea751537ac7c82ac81bfd1": {
"Name": "user-service1",
"EndpointID": "543022aef70070d571f9d193151af692e59c5bc752feb15b5a0d75d23338ff34",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
},
"47dbfe92f425d933ca6e72018eb11b95f0cba48434be9b28f571570787db0d02": {
"Name": "gateway-service",
"EndpointID": "f3cfa36a9b73a2a925d62f0d8045d51dd8bdb4afe3b2926cae6a4997bac92114",
"MacAddress": "02:42:ac:12:00:06",
"IPv4Address": "172.18.0.6/16",
"IPv6Address": ""
},
"b4910d66fee36364691710a189c79f47c2a7fac7675166bbb102b6dfba83ef80": {
"Name": "eureka",
"EndpointID": "23d981be13ce1a1e7f1f4b85ea61553a13d73dfcf5af6039e6befa68d0cea497",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/16",
"IPv6Address": ""
},
"e5326aa441bdcf8133c66384251212b14d1d0a452291a462a667de21e3f23c6c": {
"Name": "config",
"EndpointID": "5f8de35288b1d51927f840e050203671ff0c880b0b8f39c2dd614055c49306bc",
"MacAddress": "02:42:ac:12:00:05",
"IPv4Address": "172.18.0.5/16",
"IPv6Address": ""
}
어디가 문제일까요?
답변 1
0
instance-id: ${spring.application.name}:${spring.application.instance_id}:${random.value}
#hostname: 127.0.0.1
호스트네임을 주석처리후 다시 도커 생성하니 연결이 잘되네요...
안녕하세요, 이도원입니다.
hostname을 명시적으로 지정하시면, 해당 호스트명으로만 접속해서 사용해야 할 수 있습니다.
감사합니다.