目前,我使用docker-compose.yaml 檔案和Collector-gateway.yaml 檔案作為otel 收集器,將追蹤資訊傳送給jaeger。我想要實現的是使用 postgresql 實現資料持久化,並且我正在嘗試使用這個 github repo:text。但是,在使用 docker-compose up 啟動 docker 容器時,我不斷遇到此錯誤。
錯誤日誌:
jaeger-postgresql-jaeger-all-in-one-1 | {"level":"fatal","ts":1696996008.1216166,"caller":"./main.go:110","msg":"Failed to init storage factory","error":"grpc-plugin builder failed to create a store: error attempting to connect to plugin rpc client: fork/exec /etc/cmd/jaeger-pg-store: exec format error","stacktrace":"main.main.func1\n\t./main.go:110\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/[email protected]/command.go:940\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/[email protected]/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/[email protected]/command.go:992\nmain.main\n\t./main.go:243\nruntime.main\n\truntime/proc.go:267"}
有關我的程式碼的更多上下文 docker-compose.yaml:
version: "3" services: # Jaeger jaeger-all-in-one: image: jaegertracing/all-in-one:latest ports: - "16686:16686" - "14268" - "14250" environment: - SPAN_STORAGE_TYPE=grpc-plugin - COLLECTOR_OTLP_ENABLED=true volumes: - ./jaeger-pg-store:/etc/cmd/jaeger-pg-store - ./collector-gateway.yaml:/etc/collector-gateway.yaml command: ["--grpc-storage-plugin.binary=/etc/cmd/jaeger-pg-store", "--grpc-storage-plugin.configuration-file=/etc/collector-gateway.yaml"] # Collector collector-gateway: image: otel/opentelemetry-collector-contrib:0.53.0 volumes: - ./collector-gateway.yaml:/etc/collector-gateway.yaml - ./jaeger-pg-store:/etc/cmd command: [ "--config=/etc/collector-gateway.yaml"] ports: - "1888:1888" # pprof extension - "13133:13133" # health_check extension - "4317:4317" # OTLP gRPC receiver - "4318:4318" # OTLP HTTP receiver - "55670:55679" # zpages extension depends_on: - jaeger-all-in-one links: - jaeger-all-in-one
自從我在 mac 系統上使用以來,我嘗試使用 CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin 建立 jaeger-plugin-store 。總的來說,我還是比較新的。
奇怪的是,當我按照自述文件中的正常說明進行操作時,該說明從二進位檔案中將jaeger-all-in-one 作為可執行檔運行,而不是透過docker-compose 運行,它可以工作,但無法檢測到我的postgres 資料庫。但是,我最好想用我的 docker-compose 檔案來運行它。
正確答案
相關錯誤是
fork/exec /etc/cmd/jaeger-pg-store: exec format error
這表示二進位格式不相容。當您在 Docker 容器中運行時,您的二進位檔案具有與本機電腦不同的作業系統視圖,即您使用的 Docker 映像是為 Linux 建置的,但您試圖將其指向為 MacOS 建置的插件二進位檔案。您還需要為 Linux 建立插件二進位。
以上是jaeger-all-in-one docker-compose.yaml 配置用於將追蹤儲存到 postgresql的詳細內容。更多資訊請關注PHP中文網其他相關文章!

Golang更適合高並發任務,而Python在靈活性上更有優勢。 1.Golang通過goroutine和channel高效處理並發。 2.Python依賴threading和asyncio,受GIL影響,但提供多種並發方式。選擇應基於具體需求。

Golang和C 在性能上的差異主要體現在內存管理、編譯優化和運行時效率等方面。 1)Golang的垃圾回收機制方便但可能影響性能,2)C 的手動內存管理和編譯器優化在遞歸計算中表現更為高效。

selectgolangforhighpperformanceandcorrency,ifealforBackendServicesSandNetwork程序; selectpypypythonforrapiddevelopment,dataScience和machinelearningDuetoitsverserverserverserversator versator anderticality andextility andextentensivelibraries。

Golang和Python各有优势:Golang适合高性能和并发编程,Python适用于数据科学和Web开发。Golang以其并发模型和高效性能著称,Python则以简洁语法和丰富库生态系统著称。

Golang和Python分別在哪些方面更易用和學習曲線更平緩? Golang更適合高並發和高性能需求,學習曲線對有C語言背景的開發者較平緩。 Python更適合數據科學和快速原型設計,學習曲線對初學者非常平緩。

Golang和C 在性能競賽中的表現各有優勢:1)Golang適合高並發和快速開發,2)C 提供更高性能和細粒度控制。選擇應基於項目需求和團隊技術棧。

Golang適合快速開發和並發編程,而C 更適合需要極致性能和底層控制的項目。 1)Golang的並發模型通過goroutine和channel簡化並發編程。 2)C 的模板編程提供泛型代碼和性能優化。 3)Golang的垃圾回收方便但可能影響性能,C 的內存管理複雜但控制精細。

goimpactsdevelopmentpositationality throughspeed,效率和模擬性。 1)速度:gocompilesquicklyandrunseff,IdealforlargeProjects.2)效率:效率:ITScomprehenSevestAndardArdardArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdArdEcceSteral Depentencies,增強的Depleflovelmentimency.3)簡單性。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

禪工作室 13.0.1
強大的PHP整合開發環境

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

Dreamweaver CS6
視覺化網頁開發工具