Opentelemetry, collector and Grafana Tempo - open-telemetry

I start my spring boot app like:
ExecStart=/bin/java -javaagent:./opentelemetry-javaagent.jar -jar /myapp/app.jar -Xmx4gi -Dotel.traces.exporter=otlp -Dotel.javaagent.debug=true -Dotel.metrics.exporter=logging -Dotel.exporter.otlp.endpoint=http://GRAFANA_TEMPO_IP:4317 -Dotel.exporter.otlp.traces.endpoint=GRAFANA_TEMPO_IP:4317 -Dotel.resource.attributes=service.name=app
Why it still sends traffic to: The request could not be executed. Full error message: Failed to connect to localhost/127.0.0.1:4317? Why it send to localhost if variables are defined when starting java app?
Do I need in this case collector from Opentelemetry, or can I use only an agent?

Related

Running go program on Google Cloud Run without listening for incoming HTTP requests

I wrote a Go program which doesn't need to retrieve external http calls at all by default. I tried to deploy it on Google Cloud Run and received the following error:
The user-provided container failed to start and listen on the port
defined provided by the PORT=8080 environment variable. Logs for this
revision might contain more information.
I understand it happens because my code doesn't provide a port. As this answer states:
container must listen for incoming HTTP requests on the port
that is defined by Cloud Run and provided in the $PORT environment
variable
My question is what can I do if wouldn't like define any ports and just want to run the same code I run locally? Is there an alternate solution to deploy my code without it, or I must add it anyway if I want run the code from Cloud Run?
For containers that do not require an HTTP listener (HTTP server), use Cloud Run Jobs.
Cloud Run Jobs is in preview.
Your Go program must exit with exit code 0 for success and non-zero for failure.
Your container should not listen on a port or start a web server.
Environment variables are different from Cloud Run.
Container instances run until the container instance exits, until the task timeout is reached, or until the container crashes. Task timeout default is 10 minutes, max is one hour.
Cloud Run - Create jobs

NIFI LIVYSESSION CONTROLLER SERVICE GIVING ERROR : READ TIMEOUT

I want to submit spark jobs from NIFI using Executivespark interactive processor, for that I am setting up livysession controller service.
The ip and port names are correct, when I try to connect it's throwing error as shown in the attachment can anyone help me configure the controller service ?
ERROR: Timeout connecting to Livy Service to retrieve sessions:java.net.SocketTimeoutException: Read Time Out
LivySessionControllerService

Unable to start message queue server

When I start the Messaging queue It shows:
Windows could not start the IBM MQ (Installation1) service on local
computer.
Error 1053: The service did not respond to the start or control
request in a timely fashion.
From the queue manager when I create with this code:
Command: "C:\DATA\TEMP\SoftwareInstallation\bin\crtmqm" -sa test
The following error occurs:
AMQ7257S: The MQ service for installation 'Installation1'
(C:\DATA\TEMP\SoftwareInstallation) must be running.
exitvalue = 74
The second error your are getting is because, unless the IBM MQ service is running, nothing related to it works. As far as the issue with the service not coming up is concerned it is to do with the windows account through which you are trying to start the service.
You can refer the below link to find a fix,
https://support.microsoft.com/en-in/help/886695/you-receive-an-error-1053-the-service-did-not-respond-to-the-start-or

Jaeger agent unable to connect to collector

I have started Jaeger standalone binary on a Linux box and am trying to run Jaeger agent binary on Mac that tries to connect to the Jaeger collector of the standalone process. However it keeps failing with "error":"tchannel error ErrCodeTimeout: timeout".
The problem is not with different OS versions as I get the same error when trying from another Linux box. I used telnet to confirm that the collector port was open for connection.
The stack trace is below-
./cmd/agent/agent- --collector.host-port=172.xx.2.4:14267
{"level":"info","ts":1542954225.5485492,"caller":"tchannel/builder.go:94","msg":"Enabling service discovery","service":"jaeger-collector"}
{"level":"info","ts":1542954225.5489438,"caller":"peerlistmgr/peer_list_mgr.go:111","msg":"Registering active peer","peer":"172.xx.2.4:14267"}
{"level":"info","ts":1542954225.5502574,"caller":"agent/main.go:62","msg":"Starting agent"}
{"level":"info","ts":1542954226.5518098,"caller":"peerlistmgr/peer_list_mgr.go:157","msg":"Not enough connected peers","connected":0,"required":1}
{"level":"info","ts":1542954226.552439,"caller":"peerlistmgr/peer_list_mgr.go:166","msg":"Trying to connect to peer","host:port":"172.xx.2.4:14267"}
{"level":"error","ts":1542954226.8054206,"caller":"peerlistmgr/peer_list_mgr.go:171","msg":"Unable to connect","host:port":"172.xx.2.4:14267","connCheckTimeout":0.25,"error":"tchannel error ErrCodeTimeout: timeout","stacktrace":"github.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr.(*PeerListManager).ensureConnections\n\t/Users/swarnim/go/src/github.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr/peer_list_mgr.go:171\ngithub.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr.(*PeerListManager).maintainConnections\n\t/Users/swarnim/go/src/github.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr/peer_list_mgr.go:101"}

Graphite docker image does not accept messages from Spring boot

There is a problem with Graphite Docker images I try to run on my PC. Containers start up gracefully but I'm not able to send any message so that it would be displayed under "Metrics" tab. Volumes Mounting doesn't help either. Default storage-schema.conf should accept all messages.
The message used for testing is such:
echo "test.bash.stats 42 date +%s" | nc localhost 2003.
Moreover, most of the time (but not always) after sending above listed message "400 Bad request" error is responded.
Following images has been tested:
https://hub.docker.com/r/hopsoft/graphite-statsd/
https://hub.docker.com/r/kamon/grafana_graphite/
Any ideas, I'm missing something to configure additionally?
Despite the above explained issue there is is question related to Spring Boot Metrics export to Graphite over StatsD.
As described here http://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-metrics.html in section 49.8.3 Example: Export to Statsd there is a requirement only to add com.timgroup:java-statsd-client as dependency and add property spring.metrics.export.statsd.host.
Unfortunately nothing is send to Graphite (docker image running on local PC https://github.com/kamon-io/docker-grafana-graphite). I have checked network with Wireshark (udp.port=8125). Is there maybe something missing to add into Spring boot project with metrics?

Resources