sijms / go-ora

Pure go oracle client
MIT License
767 stars 168 forks source link

An EOF error is reported during ping #537

Closed yudelin6014 closed 3 months ago

yudelin6014 commented 3 months ago

code :

    if ci.Args == nil {
    ci.Args = utils.JsonMap{}
}
    connUrl := go_ora.BuildUrl(ci.Host, ci.Port, ci.ServiceName, ci.UserName, ci.PassWord, ci.Args.ToMapString())
db, err = sql.Open("oracle", connUrl)
if err != nil {
    err = fmt.Errorf("连接:%s,连接数据库错误:%s", ci.GetUniqueId(), err)
    return
}
    db.SetConnMaxIdleTime(time.Second * 10)
db.SetMaxIdleConns(5)
db.SetMaxOpenConns(5)
//db.SetConnMaxLifetime(time.Second*10)
err = ci.pingWithTimeout(db)
    return err

return err is EOF

sijms commented 3 months ago

if the connection use SSL you should specify wallet location + SSL = true

sijms commented 3 months ago

would you please give me more information or close the issue