alfg/openencoder

Server keeps restarting

kitobelix opened this issue · 5 comments

Hello Alfg!

I'm trying to deploy on pure docker environment. But I have this error "{"level":"fatal","msg":"sql: no rows in result set","time":"2020-05-11T16:37:32Z"}" and server keeps restarting while I'm logged in with ADMIN user.
Where do you suggest I should look to fix it?

Let me attach some logs:

11/5/2020 15:41:24Running with 2 CPUs 11/5/2020 15:41:24{"level":"info","msg":"started server on port: 8080","time":"2020-05-11T18:41:24Z"} 11/5/2020 15:41:25{"level":"info","msg":"setting database connectionString.","time":"2020-05-11T18:41:25Z"} 11/5/2020 15:41:25{"level":"fatal","msg":"sql: no rows in result set","time":"2020-05-11T18:41:25Z"} 11/5/2020 15:41:28Starting server... 11/5/2020 15:41:28Running with 2 CPUs 11/5/2020 15:41:28{"level":"info","msg":"started server on port: 8080","time":"2020-05-11T18:41:28Z"} 11/5/2020 15:41:29{"level":"info","msg":"setting database connectionString.","time":"2020-05-11T18:41:29Z"} 11/5/2020 15:41:29[GIN] 2020/05/11 - 18:41:29 | 200 | 4.942546ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:41:29{"level":"fatal","msg":"sql: no rows in result set","time":"2020-05-11T18:41:29Z"} 11/5/2020 15:41:32Starting server... 11/5/2020 15:41:32Running with 2 CPUs 11/5/2020 15:41:32{"level":"info","msg":"started server on port: 8080","time":"2020-05-11T18:41:32Z"} 11/5/2020 15:41:32{"level":"info","msg":"setting database connectionString.","time":"2020-05-11T18:41:32Z"} 11/5/2020 15:41:32[GIN] 2020/05/11 - 18:41:32 | 200 | 5.967989ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:41:32[GIN] 2020/05/11 - 18:41:32 | 200 | 8.348691ms | 181.46.9.75 | GET /api/health 11/5/2020 15:41:36[GIN] 2020/05/11 - 18:41:36 | 200 | 4.125285ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:41:41[GIN] 2020/05/11 - 18:41:41 | 200 | 5.575486ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:41:41[GIN] 2020/05/11 - 18:41:41 | 200 | 6.23941ms | 181.46.9.75 | GET /api/health 11/5/2020 15:41:46[GIN] 2020/05/11 - 18:41:46 | 200 | 4.085713ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:41:51[GIN] 2020/05/11 - 18:41:51 | 200 | 4.305256ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:41:51[GIN] 2020/05/11 - 18:41:51 | 200 | 4.922377ms | 181.46.9.75 | GET /api/health 11/5/2020 15:41:51{"level":"fatal","msg":"sql: no rows in result set","time":"2020-05-11T18:41:51Z"} 11/5/2020 15:41:54Starting server... 11/5/2020 15:41:54Running with 2 CPUs 11/5/2020 15:41:54{"level":"info","msg":"started server on port: 8080","time":"2020-05-11T18:41:54Z"} 11/5/2020 15:41:55{"level":"info","msg":"setting database connectionString.","time":"2020-05-11T18:41:55Z"} 11/5/2020 15:41:55{"level":"fatal","msg":"sql: no rows in result set","time":"2020-05-11T18:41:55Z"} 11/5/2020 15:41:58Starting server... 11/5/2020 15:41:58Running with 2 CPUs 11/5/2020 15:41:58{"level":"info","msg":"started server on port: 8080","time":"2020-05-11T18:41:58Z"} 11/5/2020 15:41:59{"level":"info","msg":"setting database connectionString.","time":"2020-05-11T18:41:59Z"} 11/5/2020 15:41:59[GIN] 2020/05/11 - 18:41:59 | 200 | 27.094147ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:41:59{"level":"fatal","msg":"sql: no rows in result set","time":"2020-05-11T18:41:59Z"} 11/5/2020 15:42:02Starting server... 11/5/2020 15:42:02Running with 2 CPUs 11/5/2020 15:42:02{"level":"info","msg":"started server on port: 8080","time":"2020-05-11T18:42:02Z"} 11/5/2020 15:42:02{"level":"info","msg":"setting database connectionString.","time":"2020-05-11T18:42:02Z"} 11/5/2020 15:42:02[GIN] 2020/05/11 - 18:42:02 | 200 | 13.871544ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:42:02[GIN] 2020/05/11 - 18:42:02 | 200 | 5.691828ms | 181.46.9.75 | GET /api/health 11/5/2020 15:42:06[GIN] 2020/05/11 - 18:42:06 | 200 | 3.965372ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:42:11[GIN] 2020/05/11 - 18:42:11 | 200 | 4.031694ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:42:11[GIN] 2020/05/11 - 18:42:11 | 200 | 3.572422ms | 181.46.9.75 | GET /api/health 11/5/2020 15:42:16[GIN] 2020/05/11 - 18:42:16 | 200 | 4.029028ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:42:21[GIN] 2020/05/11 - 18:42:21 | 200 | 3.923469ms | 181.46.9.75 | GET /api/stats 11/5/2020 15:42:21[GIN] 2020/05/11 - 18:42:21 | 200 | 4.64435ms | 181.46.9.75 | GET /api/health 11/5/2020 15:42:21{"level":"fatal","msg":"sql: no rows in result set","time":"2020-05-11T18:42:21Z"} 11/5/2020 15:42:24Starting server... 11/5/2020 15:42:24Running with 2 CPUs 11/5/2020 15:42:24{"level":"info","msg":"started server on port: 8080","time":"2020-05-11T18:42:24Z"}

Don't worry about this. I've managed to track the error. Thing is that I haven't filled every value required in settings (even the non really required, like Slack webhook or Digitalocean Token). When I managed to script they on the postgres init scripts, this error was gone instantly.

alfg commented

Ah, glad you figured it out. Eventually I would like to improve the installation through an install/setup script or something.

alfg commented

@jmartincufre can this be closed?

Go on, close it. Thank you for all of your contributions.