Pipe启动后报错:Scan error on column index 1, name "created_at"
wolgy opened this issue · 4 comments
wolgy commented
基本上是按照官方文档进行的傻瓜式搭建。除了mysql参数后面的∥seTime=True&loc=Local&timeout=1s
由于字符∥
报错被我截断了。
以下是报错内容。相关敏感内容做了脱敏处理
2020-08-07T06:10:13.802379689Z D 2020/08/07 14:10:13 confs.go:193: configurations [&model.Configuration{Server:"http://ip:5897", StaticServer:"http://ip:5897", StaticResourceVersion:"1596209481092", LogLevel:"debug", ShowSQL:false, SessionSecret:"xxx", SessionMaxAge:86400, RuntimeMode:"prod", SQLite:"", MySQL:"user:pw@(127.0.0.1:3306)/pipe?charset=utf8mb4", Postgres:"", Port:"5897", AxiosBaseURL:"/api", MockServer:"http://localhost:8888"}]
2020-08-07T06:10:13.805429718Z D 2020/08/07 14:10:13 themes.go:43: loaded [7] themes
2020-08-07T06:10:13.837058023Z D 2020/08/07 14:10:13 db.go:56: used [MySQL] as underlying database
2020-08-07T06:10:14.238637288Z I 2020/08/07 14:10:14 main.go:75: Pipe (v2.0.0) is running [http://ip:5897]
2020-08-07T14:10:17.163819382Z E 2020/08/07 22:10:17 blacklistcron.go:42: refresh blacklist IPs failed: [Get "https://hacpai.com/apis/blacklist/ip": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]
2020-08-07T15:11:41.701718425Z W 2020/08/07 23:11:41 oauthctl.go:101: can not get user by name [xxx]
2020-08-07T15:40:14.167840962Z E 2020/08/07 23:40:14 articlesrv.go:50: get platform most view articles failed: sql: Scan error on column index 1, name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time
2020-08-07T15:40:14.170797452Z E 2020/08/07 23:40:14 recommendcron.go:50: not found author of article [id=1596813101689, authorID=0]
2020-08-07T15:49:28.197014309Z E 2020/08/07 23:49:28 initsrv.go:70: checks platform init status failed: sql: Scan error on column index 1, name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time
2020-08-07T15:49:36.836880311Z W 2020/08/07 23:49:36 oauthctl.go:101: can not get user by name [xxx]
请问我该如何解决以让我的pipe正常运行?谢谢
88250 commented
你好,要正常使用 Pipe 的话服务器必须要能够访问黑客派社区,因为 Pipe 是社区网络的节点,黑客派是社区端节点,用户账号信息需要通过社区端才能读取。
wolgy commented
我telnet试了一下是服务器访问社区是正常的。应该不是不能访问社区的问题
root@vultr:~# telnet hacpai.com 80
Trying 118.31.188.179...
Connected to hacpai.com.
Escape character is '^]'.
Connection closed by foreign host.
root@vultr:~# telnet hacpai.com 443
Trying 118.31.188.179...
Connected to hacpai.com.
Escape character is '^]'.
88250 commented
那可能还是 jdbc 参数配置有点问题,用这句 --mysql="root:123456@(127.0.0.1:3306)/pipe?charset=utf8mb4&parseTime=True&loc=Local&timeout=1s"
wolgy commented
那可能还是 jdbc 参数配置有点问题,用这句
--mysql="root:123456@(127.0.0.1:3306)/pipe?charset=utf8mb4&parseTime=True&loc=Local&timeout=1s"
谢谢。不报错了