jaegertracing / jaeger-openshift

Support for deploying Jaeger into OpenShift
https://jaegertracing.io/
Apache License 2.0
57 stars 37 forks source link

Connect to jaeger-collector with jaeger-agent #107

Closed veterr closed 5 years ago

veterr commented 5 years ago

I was able to start the solution if connecting directly to jaeger-collector. Now I need to connect to jaeger-collector with jaeger-agent. Jaeger-collector runs remotely in openshift, and I launch jaeger-agent locally. I exposed jaeger-collector route, it has following data: host: jaeger-collector-adc-jaeger.apps.test-ose.ca.sbrf.ru This target port will route to Service Port 14267 → Container Port 14267 (TCP).

I tried to start jaeger-agent executable with command: jaeger-agent.exe --collector.host-port=jaeger-collector-adc-jaeger.apps.test-ose.ca.sbrf.ru:80

and it falls with error: {"level":"error","ts":1554996474.4958582,"caller":"peerlistmgr/peer_list_mgr.go: 171","msg":"Unable to connect","host:port":"jaeger-collector-adc-jaeger.apps.test-ose.ca.sbrf.ru:80","connCheckTimeout":0.25,"error":"unexpected EOF","stacktrace":"github.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr.*PeerListManager)

What am I doing wrong? In the readme I saw that "If you want to use the Agent then use ExternalIP or NodePort to expose the Collector service.". Does it mean that I should communicate with my openshift admins, then add externalIPs:

section to .yaml file, and then start jaeger-agent executable like this: jaeger-agent.exe --collector.host-port=XX.YY.ZZ.WW:80 ?

jpkrohling commented 5 years ago

It looks like your agent can connect to the collector, but the connection is being killed. I'm not sure this is a scenario we tested before, and there's potentially a networking component between the agent and collector that might be killing the connection. Note that this is a long-lived TChannel connection using Thrift: anything that you have in the middle, such as load balancers, might be having a bad influence in the connection.

veterr commented 5 years ago

Thank you, our openshift admins helped me today. We followed the instruction in "readme.md" - "If you want to use the Agent then use ExternalIP or NodePort to expose the Collector service.". We exposed collector using NodePort: oc expose deployment jaeger-collector --type=LoadBalancer --name=jaeger-collector-tchannel Then in console I navigated to Services->jaeger-collector-tchannel and found the port assigned to 14267/TCP, say 31227. Then I was able to start jaeger-agent with command: jaeger-agent.exe --collector.host-port=jaeger-collector-adc-jaeger.apps.test-ose.ca.sbrf.ru:31227

jpkrohling commented 5 years ago

Nice to hear that you got it working! Just make sure your collector isn't exposed to the public internet :)