Giter Club home page Giter Club logo

sql-agent's Issues

Exits after several minutes

I'm using sql-agent along with prometheus-sql. Sql-agent runs fine - but only for a few minutes, then it exits. I get the following output:

C:\hjmetrics\sql-agent>sql-agent.exe
2017/05/31 17:40:22 main.go:107: * Listening on localhost:5000...
Errors in file :
ORA-21500: internal error code, arguments: [17147], [0x6372098], [], [], [], [], [], []


----- Call Stack Trace -----
calling              call     entry                argument values in hex
location             type     point                (? means dubious value)
-------------------- -------- -------------------- ----------------------------
_skgudmp()+117       CALLrel  _kgdsdst()           68FEFF0 1 59CEB80 61E165D2
                                                   61E1676A 61E165D2
_kgeriv_int()+147    CALLreg  00000000             59CEB80 3
_kgeriv()+22         CALLrel  _kgeriv_int()        59CEB80 0 42FB 0 1 68FF0AC
_kgeric1()+20        CALLrel  _kgeriv()            59CEB80 0 42FB 1 68FF0AC
_kgherror()+223      CALLrel  _kgeric1()           59CEB80 0 42FB 2 6372098 0
__VInfreq__kgh_heap  CALLrel  _kgherror()          59CEB80 6FDA8AC 42FB 6372098
_sizes()+351
_kghrsp()+189        CALLrel  _kghfrmrg()          59CEB80 0 6FDA8AC 6372098 0
_kpuhhrsm()+198      CALLrel  _kghrsp()            59CEB80 6FDA8AC 6FD999C
_kpufhndl0()+529     CALLrel  _kpuhhrsm()          6FDA514 6FD999C
_kpufhndl()+13       CALLrel  _kpufhndl0()         6FDA514 4 0
_OCIHandleFree()+23  CALLrel  _kpufhndl()          6FDA514 4
_OCIHandleFree()+40  CALLptr  00000000             6FDA514 4
009635CD             CALLrel  009F9CF8             6FDA514 4 0 430301 2031EF74
                                                   2033C780
00000000             CALL???  00000000
068FFF31             CALLreg  00000000             6802AA4 6802AA4 0 0 20338280
                                                   0


call stack performance statistics:
total                  : 0.096000 sec
setup                  : 0.067000 sec
stack unwind           : 0.001000 sec
symbol translation     : 0.023000 sec
printing the call stack: 0.005000 sec
printing frame data    : 0.000000 sec
printing argument data : 0.000000 sec


----- End of Call Stack Trace -----

This occurred after about 10 minutes (I'm connecting to an Oracle database)

I've had to build it on Windows 7 using go install since I'm not using envirnment that has Docker available.

Which SSL arguments should I use?

Hello, everyone.
Started to use with prometheus-sql. On database server turned on TLS. (It's impossible to turn off on mysql by requirements)
Getting an error:
[some_query] 503 Service Unavailable: problem connecting to database: Error 3159: Connections using insecure transport are prohibited while --require_secure_transport=ON
In parameters I didn't find any arguments in settings except sslmode: disable. Can you point me please on configuration with SSL enabled?

I tried
sslmode: enable
sslmode: enabled
ssl_ca: /path/to/cert.pem
ssl_cert: /path/to/cert.pem
ssl-ca: /path/to/cert.pem
ssl-cert: /path/to/cert.pem etc.

my basic config:

connection:
        host: sql.apples.com
        port: 3306
        user: sql-agent
        password: superpassword
        database: specialdatabase
        #sslmode: enable?

driver.go: mssql semicolon delimited string format

I'm not a Go developer, but I'm trying to get this working with the mssql driver and I'm wondering if there is a typo here in strings.Join:

// MSSQL supports semicolon delimited key=value parameters.
// See https://github.com/denisenkom/go-mssqldb#connection-parameters
"mssql": func(params map[string]interface{}) string {
	toks := make([]string, len(params))
	i := 0

	for k, v := range params {
		toks[i] = fmt.Sprintf("%s=%v", k, v)
		i++
	}

	return strings.Join(toks, " ")
},

The comment above suggests that they should be semicolon delimited, but the strings.Join appears to be space delimiting them. Is that the case?

Cheers

Missing dependecy: lib/pq (?)

I'm trying to build this on Windows (I don't have a Docker environment available to me). I'm getting this:

C:\Users\username\go\src\github.com\chop-dbhi\sql-agent\cmd\sql-agent>go install
main.go:15:2: cannot find package "github.com/lib/pq" in any of:
        C:\Users\username\go\src\github.com\chop-dbhi\sql-agent\cmd\sql-agent\vendor\github.com\lib\pq (vendor tree)
        C:\Go\src\github.com\lib\pq (from $GOROOT)
        C:\Users\username\go\src\github.com\lib\pq (from $GOPATH)

If I download the zip of the master branch from https://github.com/lib/pq and put it in C:\Users\username\go\src\github.com\chop-dbhi\sql-agent\cmd\sql-agent\vendor\github.com\lib\pq, then the install completes, apparently successfully.

I don't know if this is happening because of the way I'm building it? I can submit a pull request if you want me to add lib/pq into the /vendor directory - is the current master branch the best one to use?

pq: unknown authentication response

Hello everyone,

I wanted to use the go program in combination with prometheus-sql to monitor a postgres database.
However, I get an error when trying to connect to the database.
following error:
503 Service Unavailable: problem connecting to database: pq: unknown authentication response: 10

Is it possible that the problem occurs due to a postgres go library that is too old in combination with a database version that is too new?

If so, could you please update the Postgres library in the program?

The Postgres go library used in this program is from 2018.

Regards,
xQuai

sql-agent dont respond

Hi.

I use sql-agent on docker with prometheus-sql. Periodicaly sql-agent stuck, only restart is helps.
No errors in log

15.01.2018 18:12:592018/01/15 14:12:59 main.go:107: * Listening on 0.0.0.0:5000...
16.01.2018 11:04:082018/01/16 07:04:08 main.go:107: * Listening on 0.0.0.0:5000...
16.01.2018 11:41:172018/01/16 07:41:17 main.go:107: * Listening on 0.0.0.0:5000...
17.01.2018 11:46:452018/01/17 07:46:45 main.go:107: * Listening on 0.0.0.0:5000...
22.01.2018 11:25:162018/01/22 07:25:16 main.go:107: * Listening on 0.0.0.0:5000...
23.01.2018 11:04:592018/01/23 07:04:59 main.go:107: * Listening on 0.0.0.0:5000...
23.01.2018 11:44:362018/01/23 07:44:36 main.go:107: * Listening on 0.0.0.0:5000...
23.01.2018 18:11:312018/01/23 14:11:31 main.go:107: * Listening on 0.0.0.0:5000...
23.01.2018 22:30:202018/01/23 18:30:20 main.go:107: * Listening on 0.0.0.0:5000...
24.01.2018 14:23:532018/01/24 10:23:53 main.go:107: * Listening on 0.0.0.0:5000...

docker-compose.yml

version: '2'
services:
  sql-agent:
    image: dbhi/sql-agent
    tty: true
    ports:
    - 5000:5000/tcp
    labels:
      io.rancher.container.pull_image: always

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.