xmidt-org / xmidt

Highly scalable pipes for communicating with devices all over the place.
Apache License 2.0
17 stars 19 forks source link

How to handle redirection outside docker for mutiple talaria nodes #60

Open karthika-ab opened 2 years ago

karthika-ab commented 2 years ago

Hi, We are trying to bring up webpa using docker-compose with two talaria nodes.The setup works fine inside the docker and the get operations when tested with the simulator are all a success.But connecting to a parodus client outside the docker setup is giving 404 error.On inspecting the parodus logs,It is seen that the redirection URL is giving the docker-container id to the client and we are suspecting that might be the reason for the 404 error code.


`2021 Aug 03 07:56:16.653209 "parodus"[2719]: 210803-07:56:16.650252 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: ../../git/src/nopoll_conn.c:331 IPv4 address of 192.168.1.9 is 192.168.1.9
2021 Aug 03 07:56:16.653824 "parodus"[2719]:
2021 Aug 03 07:56:16.654436 "parodus"[2719]: 210803-07:56:16.650360 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: ../../git/src/nopoll_conn.c:377 Create socket with non blocking-mode
2021 Aug 03 07:56:16.794267 "parodus"[2719]: 210803-07:56:16.793505 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: ../../git/src/nopoll_conn.c:264 Result of wait after connect EINPROGRESS = 0
2021 Aug 03 07:56:16.795028 "parodus"[2719]:
2021 Aug 03 07:56:17.042720 "parodus"[2719]: 210803-07:56:17.042124 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: ../../git/src/nopoll_conn.c:3068 websocket server denied connection with: 307
2021 Aug 03 07:56:17.043565 "parodus"[2719]:
2021 Aug 03 07:56:17.044498 "parodus"[2719]: 210803-07:56:17.043017 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: ../../git/src/nopoll_conn.c:2915 Received uncomplete listener handshake reply
2021 Aug 03 07:56:17.045241 "parodus"[2719]: 210803-07:56:17.043237 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: ../../git/src/nopoll_conn.c:5230 nopoll_conn_wait_for_status_until_connection
2021 Aug 03 07:56:17.045924 "parodus"[2719]: 210803-07:56:17.043273 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: Received temporary redirection response message Redirect:http://22af9d543209:
2021 Aug 03 07:56:17.046673 "parodus"[2719]: 210803-07:56:17.043303 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: full url: http://22af9d543209:6200/api/v2/device
2021 Aug 03 07:56:17.047379 "parodus"[2719]: 210803-07:56:17.043329 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: server address copied from url
2021 Aug 03 07:56:17.048004 "parodus"[2719]: 210803-07:56:17.043357 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: server 22af9d543209, port 6200, http_match 1
2021 Aug 03 07:56:17.048622 "parodus"[2719]: 210803-07:56:17.043428 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: ../../git/src/nopoll_ctx.c:338 Unregistered connection id 2
2021 Aug 03 07:56:17.049235 "parodus"[2719]: 210803-07:56:17.043496 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: cloud_status set as offline after connection close
2021 Aug 03 07:56:17.049903 "parodus"[2719]: 210803-07:56:17.046318 [mod=PARODUS, lvl=INFO] [tid=2719] PARODUS: Waiting max delay 3 backoffRetryTime 3 secs 0 usecs`

Saw the mention of this possible issue here :https://github.com/xmidt-org/xmidt/tree/master/deploy/docker-compose#outside-docker But some more details on how to proceed on the above would be really helpful!!

Regards Karthika