Skip to content

[Bug]: Sending a test package seems to fail #71

@LorenzoTettamanti

Description

@LorenzoTettamanti

Describe the bug

lorenzo@Lorenzo:~/CortexBrain/Scripts$ ./test-connections.sh
Checking cortexflow proxy inside the proxy pod: cortexflow-proxy-789584dd5c-h2ck7
🔨 checking env variables
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=cortexflow-proxy-789584dd5c-h2ck7
DNS_SERVER_HOST=kube-dns.kube-system.svc.cluster.local:53
PROXY_SERVICE_PORT_5053_UDP=udp://10.110.118.82:5053
PROXY_SERVICE_PORT_5053_UDP_PROTO=udp
PROXY_SERVICE_PORT_5053_UDP_PORT=5053
PROXY_SERVICE_PORT_5053_UDP_ADDR=10.110.118.82
KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_PORT_443_TCP_ADDR=10.96.0.1
PROXY_SERVICE_PORT=tcp://10.110.118.82:9090
PROXY_SERVICE_SERVICE_PORT_DNS=5053
KUBERNETES_SERVICE_HOST=10.96.0.1
KUBERNETES_PORT_443_TCP=tcp://10.96.0.1:443
KUBERNETES_PORT_443_TCP_PORT=443
PROXY_SERVICE_SERVICE_HOST=10.110.118.82
PROXY_SERVICE_SERVICE_PORT_METRICS=9090
PROXY_SERVICE_PORT_9090_TCP_PROTO=tcp
PROXY_SERVICE_PORT_9090_TCP_PORT=9090
PROXY_SERVICE_PORT_9090_TCP_ADDR=10.110.118.82
KUBERNETES_SERVICE_PORT=443
PROXY_SERVICE_SERVICE_PORT=9090
KUBERNETES_PORT=tcp://10.96.0.1:443
KUBERNETES_PORT_443_TCP_PROTO=tcp
PROXY_SERVICE_PORT_9090_TCP=tcp://10.110.118.82:9090
HOME=/root
✅ Netstat is installed.
✅ Netcat is installed.
✅ Curl is installed.
✅ Nslookup is installed.

🔨 Testing netstat command
tcp        0      0 0.0.0.0:9090            0.0.0.0:*               LISTEN      1/cortexflow-proxy

🔨 testing if the process is in execution
root           1  0.0  0.1 555680  8312 ?        Ssl  08:57   0:00 cortexflow-proxy
🔨 testing using netcat
Connection to proxy-service.cortexflow.svc.cluster.local (10.110.118.82) 9090 port [tcp/*] succeeded!
🔨 Checking if the proxy is listening in the 5053 port
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:5053            0.0.0.0:*                           1/cortexflow-proxy

🔨 Sending a test package with netcat

🔨 Testing the DNS resolution manually with nslookup
;; Got recursion not available from 10.96.0.10
;; Got recursion not available from 10.96.0.10
;; Got recursion not available from 10.96.0.10
;; Got recursion not available from 10.96.0.10
Server:         10.96.0.10
Address:        10.96.0.10#53

Name:   proxy-service.cortexflow.svc.cluster.local
Address: 10.110.118.82
;; Got recursion not available from 10.96.0.10


🔨 Testing curl command
❌ Error in http response ERROR: 404
❌ Service does not exists or is not exposed

🔨 Testing /health endpoint
❌ Error in http response ERROR: 404
❌ Service does not exists or is not exposed

🔨 Testing /metrics endpoint
✅ Server is working
 Checking /metrics endpoint
*   Trying 127.0.0.1:9090...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to localhost (127.0.0.1) port 9090 (#0)
> GET /metrics HTTP/1.1
> Host: localhost:9090
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-type: text/plain; charset=utf-8
< content-length: 0
< date: Thu, 06 Mar 2025 09:12:49 GMT
<
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host localhost left intact

🔨 Testing /status endpoint
❌ Error in http response ERROR: 404
❌ Service does not exists or is not exposed


Testing outside the proxy pod
🔨 Testing using a temporary test pod and nslookup
Server:         10.96.0.10
Address:        10.96.0.10:53

Name:   proxy-service.cortexflow.svc.cluster.local
Address: 10.110.118.82


pod "test-pod" deleted
Error from server (NotFound): pods "test-pod" not found

🔨 Sending a 'test' message using netcat and a temporary test pod
nc: getaddrinfo for host "proxy-service.cortexflow.svc.cluster.local" port 5053: Name or service not known
pod "test-pod" deleted

Additional Info

tests performed using test-connections.sh script

Metadata

Metadata

Labels

bugSomething isn't workingrustPull requests that update Rust code

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions