Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection refused error when initialising Synchronizer but curl works fine #245

Open
av-mandiant opened this issue Oct 27, 2023 · 1 comment

Comments

@av-mandiant
Copy link

Split Synchronizer - Version: 5.4.0

Unable to use synchronizer service in kubernetes setup.

I'm getting connect-refused error from synchronizer container but if I exec inside the container and do a curl call to same URL it passes with HTTP 200 status code.

===Log snippet from container===

➜  ~/code git:(synchronizer_setup) $ kubectl logs -f split-synchronizer-87856ddf8-v7v9c          

     __      ____        _ _ _
    / /__   / ___| _ __ | (_) |_
   / / \ \  \___ \| '_ \| | | __|
   \ \  \ \  ___) | |_) | | | |_
    \_\ / / |____/| .__/|_|_|\__|
       /_/        |_|

       

Split Synchronizer - Version: 5.4.0 (18b8201) 
Split-Sync - DEBUG - 2023/10/27 00:14:48 client.go:60: [GET]  https://sdk.split.io/api/splitChanges?since=1698365688257
Split-Sync - DEBUG - 2023/10/27 00:14:48 client.go:64: Authorization [ApiKey]:  <api-key>
Split-Sync - DEBUG - 2023/10/27 00:14:48 client.go:73: Headers: map[Accept-Encoding:[gzip] Content-Type:[application/json] Splitsdkmachineip:[<ip>] Splitsdkmachinename:[<ip>] Splitsdkversion:[SplitSyncProducerMode-5.4.0]]
Split-Sync - ERROR - 2023/10/27 00:14:48 client.go:79: Error requesting data to API:  https://sdk.split.io/api/splitChanges?since=1698365688257 Get "https://sdk.split.io/api/splitChanges?since=1698365688257": dial tcp 151.101.3.9:443: connect: connection refused
Split-Sync - ERROR - 2023/10/27 00:14:48 http_fetchers.go:55: Error fetching split changes  Get "https://sdk.split.io/api/splitChanges?since=1698365688257": dial tcp 151.101.3.9:443: connect: connection refused
Split-Sync - ERROR - 2023/10/27 00:14:48 main.go:73: Failed to initialize the split sync:  initialization error: invalid SDK key

===Output from CURL===

➜  ~/code git:(synchronizer_setup) $ kubectl exec -it split-synchronizer-68d9d75f75-c99pk -- bash
split-synchronizer-68d9d75f75-c99pk:/# curl -i  https://sdk.split.io/api/splitChanges?since=1698365757211 -H "Authorization: Bearer $SPLIT_SYNC_APIKEY"
HTTP/2 200 
content-type: application/json; charset=utf-8
..<lot of other headers>...
date: Fri, 27 Oct 2023 00:39:33 GMT
content-length: 56

{"till":1698365757211,"since":1698365757211,"splits":[]}split-synchronizer-68d9d75f75-c99pk:/# 
exit

@agustinona
Copy link

Hi @av-mandiant a connection refused error would indicate some kind of networking issue. Are you running a networking sidecar (like istio) for your container or is there any other network provisioning that needs to complete upon spinning up the container before making requests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants