Code Monkey home page Code Monkey logo

sphinx_exporter's Issues

Infinite recursion in `printerror()` ?

When the exporter is unable to connect to sphinx server at startup, the exporter dies due to a stack overflow. A gist of the stack trace is this:

INFO[0000] Starting sphinx_exporter (version=0.0.2, branch=master, revision=01fbd50db7193cef6ce37ed527e3a1c7494b6695)  source="main.go:658"
INFO[0000] Build context (go=go1.11.1, user=root@f7cd2537cfdd, date=20181031-08:51:54)  source="main.go:659"
INFO[0000] Starting HTTP server on :9247                 source="main.go:673"
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x8d296f, 0xe)
    /usr/local/go/src/runtime/panic.go:608 +0x72
runtime.newstack()
    /usr/local/go/src/runtime/stack.go:1008 +0x729
runtime.morestack()
    /usr/local/go/src/runtime/asm_amd64.s:429 +0x8f

goroutine 21 [running]:
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
    /go/src/github.com/foxdalas/sphinx_exporter/main.go:637 +0xbd fp=0xc0201c2328 sp=0xc0201c2320 pc=0x7d7e2d
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
    /go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c2388 sp=0xc0201c2328 pc=0x7d7dbd
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
    /go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c23e8 sp=0xc0201c2388 pc=0x7d7dbd
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
    /go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c2448 sp=0xc0201c23e8 pc=0x7d7dbd
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
    /go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c24a8 sp=0xc0201c2448 pc=0x7d7dbd
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
    /go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c2508 sp=0xc0201c24a8 pc=0x7d7dbd
[many repeated lines]
...additional frames elided...
created by github.com/foxdalas/sphinx_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather
    /go/src/github.com/foxdalas/sphinx_exporter/vendor/github.com/prometheus/client_golang/prometheus/registry.go:381 +0x302

Looking at main.go source code, I've the feeling there's an infinite recursion at line 639. May you explain the purpose of that line, please?

Thanks,
Marco

Docker container don't work

Steps to reproduce

# docker run --rm -it foxdalas/sphinx-exporter:v0.1.0
standard_init_linux.go:228: exec user process caused: no such file or directory

Then some debug:

# docker run --rm -it --entrypoint=sh foxdalas/sphinx-exporter:v0.1.0
/ # ls -lah /bin/sphinx_exporter 
-rwxr-xr-x    1 root     root        8.4M Dec 27 09:29 /bin/sphinx_exporter
/ # /bin/sphinx_exporter 
sh: /bin/sphinx_exporter: not found
/ # file /bin/sphinx_exporter 
/bin/sphinx_exporter: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=73P0s5YKkefPXvH5yrc0/pain-d_RTIRiUpco8NMS/h6Sxie90oBypkw18qH1J/saA34-lO2D5nUEce6gPW, stripped
/ # ls -lah /lib64/ld-linux-x86-64.so.2
ls: /lib64/ld-linux-x86-64.so.2: No such file or directory

We should install apk package libc6-compat with /lib64/ld-linux-x86-64.so.2, because we using alpine image or build sphinx_exporter with statically linked library.
https://pkgs.alpinelinux.org/contents?file=ld-linux-x86-64*&path=&name=&branch=v3.15&repo=main

busy buffer

ERROR: packets.go:428: busy buffer

Sphinx 2.1.9-id64-release

Don't work with sphinx 2.2.11

Try to use sphinx-exporter geting the error:

time="2022-02-07T09:52:09Z" level=error msg="sql: expected 5 destination arguments in Scan, not 14" source="main.go:608"
time="2022-02-07T09:52:24Z" level=error msg="Error 1040: Too many connections" source="main.go:432"

As I see it were broken in #10

License?

Hello !

Would you mind adding a license file to the repo ? I need this to be able to use the software.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.