Super weird. It looks like there’s a successful connection:
But then it fails 
For what it’s worth, when it fails, the API call it’s making is like the following:
2025.06.06 16:43:37 TRACE ce[][tracer] curl -iX POST 'http://localhost:9001/_bulk?timeout=1m' -d '{"index":{"_index":"issues","_id":"287fea52-9a6f-42eb-8c4b-f7e503acb1ad","routing":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"}}\n{"casa":[],"isNewCodeReference":false,"line":22,"project":"d5441aa5-cb1e-4f5b-a3c5-453189797dac","effort":0,"language":"py","sansTop25":[],"type":"CODE_SMELL","resolution":null,"branch":"80d8ea56-15df-4c70-9880-affa35a4f936","issueStatus":"OPEN","issueUpdatedAt":"2025-05-29T06:33:59.000Z","severityValue":0,"ruleUuid":"66a95406-f845-4401-babb-3145c59449be","owaspAsvs-4.0":[],"scope":"MAIN","dirPath":"pokedex","key":"287fea52-9a6f-42eb-8c4b-f7e503acb1ad","issueCreatedAt":"2022-04-25T14:40:06.000Z","severity":"INFO","stig-ASD_V5R3":[],"vulnerabilityProbability":1,"owaspTop10":[],"filePath":"pokedex/app.py","cleanCodeAttributeCategory":"INTENTIONAL","authorLogin":"guillaume.dequenne@sonarsource.com","join_issues":{"name":"issue","parent":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"},"impacts":[{"softwareQuality":"MAINTAINABILITY","severity":"INFO"}],"issueClosedAt":null,"tags":["cwe"],"owaspMobileTop10-2024":[],"cwe":["546"],"codeVariants":[],"sonarsourceSecurity":"others","component":"a7adada9-e0a9-4bba-8c00-90c7fb47940a","indexType":"issue","prioritizedRule":false,"pciDss-4.0":[],"pciDss-3.2":[],"assignee":null,"owaspTop10-2021":[],"isMainBranch":true,"status":"OPEN"}\n{"index":{"_index":"issues","_id":"3225692d-66e7-4e43-8381-863358ab85ca","routing":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"}}\n{"casa":["4.2.2"],"isNewCodeReference":false,"line":5,"project":"d5441aa5-cb1e-4f5b-a3c5-453189797dac","effort":5,"language":"py","sansTop25":["insecure-interaction"],"type":"SECURITY_HOTSPOT","resolution":null,"branch":"80d8ea56-15df-4c70-9880-affa35a4f936","issueStatus":null,"issueUpdatedAt":"2025-05-29T06:33:59.000Z","severityValue":3,"ruleUuid":"a80b04d2-c963-4f86-86d1-85f84ce0ab98","owaspAsvs-4.0":["13.2.3","4.2.2"],"scope":"MAIN","dirPath":"pokedex","key":"3225692d-66e7-4e43-8381-863358ab85ca","issueCreatedAt":"2022-04-25T14:38:30.000Z","severity":"CRITICAL","stig-ASD_V5R3":["V-222603"],"vulnerabilityProbability":3,"owaspTop10":["a6"],"filePath":"pokedex/app.py","cleanCodeAttributeCategory":"CONSISTENT","authorLogin":"guillaume.dequenne@sonarsource.com","join_issues":{"name":"issue","parent":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"},"impacts":[],"issueClosedAt":null,"tags":["cwe","django","flask"],"owaspMobileTop10-2024":[],"cwe":["352"],"codeVariants":[],"sonarsourceSecurity":"csrf","component":"a7adada9-e0a9-4bba-8c00-90c7fb47940a","indexType":"issue","prioritizedRule":false,"pciDss-4.0":["6.2.4"],"pciDss-3.2":["6.5.9"],"assignee":null,"owaspTop10-2021":["a1"],"isMainBranch":true,"status":"TO_REVIEW"}\n{"index":{"_index":"issues","_id":"48ea4f24-ded4-4bf0-879a-a0693fe9186d","routing":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"}}\n{"casa":[],"isNewCodeReference":false,"line":40,"project":"d5441aa5-cb1e-4f5b-a3c5-453189797dac","effort":1,"language":"py","sansTop25":[],"type":"SECURITY_HOTSPOT","resolution":null,"branch":"80d8ea56-15df-4c70-9880-affa35a4f936","issueStatus":null,"issueUpdatedAt":"2025-05-29T06:33:59.000Z","severityValue":1,"ruleUuid":"b61ee796-55a2-42da-8709-4e7b804405d7","owaspAsvs-4.0":[],"scope":"MAIN","dirPath":"pokedex","key":"48ea4f24-ded4-4bf0-879a-a0693fe9186d","issueCreatedAt":"2022-04-25T14:38:30.000Z","severity":"MINOR","stig-ASD_V5R3":[],"vulnerabilityProbability":1,"owaspTop10":["a3"],"filePath":"pokedex/app.py","cleanCodeAttributeCategory":"CONSISTENT","authorLogin":"guillaume.dequenne@sonarsource.com","join_issues":{"name":"issue","parent":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"},"impacts":[],"issueClosedAt":null,"tags":["cwe","error-handling","debug","user-experience"],"owaspMobileTop10-2024":[],"cwe":["489","215"],"codeVariants":[],"sonarsourceSecurity":"insecure-conf","component":"a7adada9-e0a9-4bba-8c00-90c7fb47940a","indexType":"issue","prioritizedRule":false,"pciDss-4.0":[],"pciDss-3.2":[],"assignee":null,"owaspTop10-2021":["a5"],"isMainBranch":true,"status":"TO_REVIEW"}\n{"index":{"_index":"issues","_id":"9504e412-fc2d-4717-a366-463230b0041d","routing":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"}}\n{"casa":[],"isNewCodeReference":false,"line":20,"project":"d5441aa5-cb1e-4f5b-a3c5-453189797dac","effort":20,"language":"py","sansTop25":[],"type":"CODE_SMELL","resolution":null,"branch":"80d8ea56-15df-4c70-9880-affa35a4f936","issueStatus":"OPEN","issueUpdatedAt":"2025-05-29T06:33:59.000Z","severityValue":2,"ruleUuid":"88aff08f-07c8-429e-bcea-0bf9a0c839b0","owaspAsvs-4.0":[],"scope":"MAIN","dirPath":"pokedex","key":"9504e412-fc2d-4717-a366-463230b0041d","issueCreatedAt":"2022-04-25T14:40:06.000Z","severity":"MAJOR","stig-ASD_V5R3":[],"vulnerabilityProbability":1,"owaspTop10":[],"filePath":"pokedex/helper.py","cleanCodeAttributeCategory":"INTENTIONAL","authorLogin":"guillaume.dequenne@sonarsource.com","join_issues":{"name":"issue","parent":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"},"impacts":[{"softwareQuality":"MAINTAINABILITY","severity":"MEDIUM"}],"issueClosedAt":null,"tags":["cwe","error-handling"],"owaspMobileTop10-2024":[],"cwe":["397"],"codeVariants":[],"sonarsourceSecurity":"others","component":"79203a79-b4b0-437f-813d-9bb784f1c842","indexType":"issue","prioritizedRule":false,"pciDss-4.0":[],"pciDss-3.2":[],"assignee":null,"owaspTop10-2021":[],"isMainBranch":true,"status":"OPEN"}\n{"index":{"_index":"issues","_id":"a251c2fb-8459-4c21-9f3b-29afa702dbf7","routing":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"}}\n{"casa":[],"isNewCodeReference":false,"line":38,"project":"d5441aa5-cb1e-4f5b-a3c5-453189797dac","effort":2,"language":"py","sansTop25":[],"type":"CODE_SMELL","resolution":null,"branch":"80d8ea56-15df-4c70-9880-affa35a4f936","issueStatus":"OPEN","issueUpdatedAt":"2025-05-29T06:33:59.000Z","severityValue":1,"ruleUuid":"ec9c7cc0-8f0e-4feb-bec0-3ac2a94032f2","owaspAsvs-4.0":[],"scope":"MAIN","dirPath":"pokedex","key":"a251c2fb-8459-4c21-9f3b-29afa702dbf7","issueCreatedAt":"2022-04-25T14:40:06.000Z","severity":"MINOR","stig-ASD_V5R3":[],"vulnerabilityProbability":1,"owaspTop10":[],"filePath":"pokedex/helper.py","cleanCodeAttributeCategory":"INTENTIONAL","authorLogin":"guillaume.dequenne@sonarsource.com","join_issues":{"name":"issue","parent":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"},"impacts":[{"softwareQuality":"MAINTAINABILITY","severity":"LOW"}],"issueClosedAt":null,"tags":["confusing"],"owaspMobileTop10-2024":[],"cwe":["unknown"],"codeVariants":[],"sonarsourceSecurity":"others","component":"79203a79-b4b0-437f-813d-9bb784f1c842","indexType":"issue","prioritizedRule":false,"pciDss-4.0":[],"pciDss-3.2":[],"assignee":null,"owaspTop10-2021":[],"isMainBranch":true,"status":"OPEN"}\n{"index":{"_index":"issues","_id":"ac9cb449-444e-4b54-b112-335daef82cbf","routing":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"}}\n{"casa":[],"isNewCodeReference":false,"line":21,"project":"d5441aa5-cb1e-4f5b-a3c5-453189797dac","effort":5,"language":"py","sansTop25":[],"type":"BUG","resolution":null,"branch":"80d8ea56-15df-4c70-9880-affa35a4f936","issueStatus":"OPEN","issueUpdatedAt":"2025-05-29T06:33:59.000Z","severityValue":2,"ruleUuid":"1c176d9f-89b1-4653-95db-05dc248d7684","owaspAsvs-4.0":[],"scope":"MAIN","dirPath":"pokedex","key":"ac9cb449-444e-4b54-b112-335daef82cbf","issueCreatedAt":"2022-04-25T14:40:06.000Z","severity":"MAJOR","stig-ASD_V5R3":[],"vulnerabilityProbability":1,"owaspTop10":[],"filePath":"pokedex/helper.py","cleanCodeAttributeCategory":"INTENTIONAL","authorLogin":"guillaume.dequenne@sonarsource.com","join_issues":{"name":"issue","parent":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"},"impacts":[{"softwareQuality":"RELIABILITY","severity":"MEDIUM"}],"issueClosedAt":null,"tags":["suspicious"],"owaspMobileTop10-2024":[],"cwe":["unknown"],"codeVariants":[],"sonarsourceSecurity":"others","component":"79203a79-b4b0-437f-813d-9bb784f1c842","indexType":"issue","prioritizedRule":false,"pciDss-4.0":[],"pciDss-3.2":[],"assignee":null,"owaspTop10-2021":[],"isMainBranch":true,"status":"OPEN"}\n{"index":{"_index":"issues","_id":"c746e291-ee64-4592-9afa-9884747d8935","routing":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"}}\n{"casa":[],"isNewCodeReference":false,"line":36,"project":"d5441aa5-cb1e-4f5b-a3c5-453189797dac","effort":2,"language":"py","sansTop25":[],"type":"BUG","resolution":null,"branch":"80d8ea56-15df-4c70-9880-affa35a4f936","issueStatus":"OPEN","issueUpdatedAt":"2025-05-29T06:33:59.000Z","severityValue":2,"ruleUuid":"cce4bd75-cfeb-42dc-aebd-74cab5754143","owaspAsvs-4.0":[],"scope":"MAIN","dirPath":"pokedex","key":"c746e291-ee64-4592-9afa-9884747d8935","issueCreatedAt":"2022-04-25T14:40:06.000Z","severity":"MAJOR","stig-ASD_V5R3":[],"vulnerabilityProbability":1,"owaspTop10":[],"filePath":"pokedex/helper.py","cleanCodeAttributeCategory":"INTENTIONAL","authorLogin":"guillaume.dequenne@sonarsource.com","join_issues":{"name":"issue","parent":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"},"impacts":[{"softwareQuality":"RELIABILITY","severity":"MEDIUM"}],"issueClosedAt":null,"tags":["error-handling"],"owaspMobileTop10-2024":[],"cwe":["unknown"],"codeVariants":[],"sonarsourceSecurity":"others","component":"79203a79-b4b0-437f-813d-9bb784f1c842","indexType":"issue","prioritizedRule":false,"pciDss-4.0":[],"pciDss-3.2":[],"assignee":null,"owaspTop10-2021":[],"isMainBranch":true,"status":"OPEN"}\n{"index":{"_index":"issues","_id":"d76453ad-27a7-4479-91b8-de50d1b291e9","routing":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"}}\n{"casa":[],"isNewCodeReference":false,"line":34,"project":"d5441aa5-cb1e-4f5b-a3c5-453189797dac","effort":30,"language":"py","sansTop25":[],"type":"SECURITY_HOTSPOT","resolution":null,"branch":"80d8ea56-15df-4c70-9880-affa35a4f936","issueStatus":null,"issueUpdatedAt":"2025-05-29T06:33:59.000Z","severityValue":3,"ruleUuid":"0b302247-4c76-47d6-9ca4-9f4eeb8984b3","owaspAsvs-4.0":["12.1.1"],"scope":"MAIN","dirPath":"pokedex","key":"d76453ad-27a7-4479-91b8-de50d1b291e9","issueCreatedAt":"2023-04-17T16:11:32.000Z","severity":"CRITICAL","stig-ASD_V5R3":[],"vulnerabilityProbability":2,"owaspTop10":["a1"],"filePath":"pokedex/helper.py","cleanCodeAttributeCategory":"CONSISTENT","authorLogin":"guillaume.dequenne@sonarsource.com","join_issues":{"name":"issue","parent":"auth_d5441aa5-cb1e-4f5b-a3c5-453189797dac"},"impacts":[],"issueClosedAt":null,"tags":["cwe","regex"],"owaspMobileTop10-2024":[],"cwe":["400","1333"],"codeVariants":[],"sonarsourceSecurity":"dos","component":"79203a79-b4b0-437f-813d-9bb784f1c842","indexType":"issue","prioritizedRule":false,"pciDss-4.0":[],"pciDss-3.2":[],"assignee":null,"owaspTop10-2021":[],"isMainBranch":true,"status":"TO_REVIEW"}\n'\n# HTTP/1.1 200 OK\n# X-elastic-product: Elasticsearch\n# content-type: application/vnd.elasticsearch+json;compatible-with=7\n# Transfer-Encoding: chunked\n#\n# {"errors":false,"took":0,"items":[{"index":{"_index":"issues","_id":"287fea52-9a6f-42eb-8c4b-f7e503acb1ad","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":1,"_primary_term":1,"_type":"_doc","status":201}},{"index":{"_index":"issues","_id":"3225692d-66e7-4e43-8381-863358ab85ca","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":2,"_primary_term":1,"_type":"_doc","status":201}},{"index":{"_index":"issues","_id":"48ea4f24-ded4-4bf0-879a-a0693fe9186d","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":3,"_primary_term":1,"_type":"_doc","status":201}},{"index":{"_index":"issues","_id":"9504e412-fc2d-4717-a366-463230b0041d","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":4,"_primary_term":1,"_type":"_doc","status":201}},{"index":{"_index":"issues","_id":"a251c2fb-8459-4c21-9f3b-29afa702dbf7","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":5,"_primary_term":1,"_type":"_doc","status":201}},{"index":{"_index":"issues","_id":"ac9cb449-444e-4b54-b112-335daef82cbf","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":6,"_primary_term":1,"_type":"_doc","status":201}},{"index":{"_index":"issues","_id":"c746e291-ee64-4592-9afa-9884747d8935","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":7,"_primary_term":1,"_type":"_doc","status":201}},{"index":{"_index":"issues","_id":"d76453ad-27a7-4479-91b8-de50d1b291e9","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":8,"_primary_term":1,"_type":"_doc","status":201}}]}
Could you try running this command from within your Docker container and see if you get a connection refused, or a “real” error (I would expect a 400 if it’s working well)
curl -iX POST 'http://localhost:9001/_bulk?timeout=1m' -d $'{}\\n\\n' -H 'Content-Type: application/vnd.elasticsearch+json'