I have this error in the logs ```{"log":"2023-03-1...
# support
a
I have this error in the logs
Copy code
{
  "log": "2023-03-13T09:11:51.947Z\tWARN\tbackend-config\tbackend-config/single_workspace.go:81\tFailed to fetch config from API with error: Get \"https://api.rudderstack.com/workspaceConfig?fetchAll=true\": context deadline exceeded (Client.Timeout exceeded while awaiting headers), retrying after 362.505776ms\n",
  "stream": "stdout",
  "time": "2023-03-13T09:11:51.948065231Z"
}
any idea what this could be?
It was running fine for weeks, nothing changed and suddenly it’s not working anymore. Restarting doesn’t fix the issue I’m using the standard docker-compose file, only updated the workspace token (weeks ago)
Server has enough disk space (only 35% utilized) and top reveals no strange CPU things (<1 cpu being utilized)
h
Can you share the version which is being used?
Also you can try setting this env variable
Copy code
RSERVER_HTTP_CLIENT_BACKEND_CONFIG_TIMEOUT=2m
a
Sure, I’m using rudder-compose.yml however, how can I check this?
will do
h
You can hit
Copy code
dataplane-url/version
endpoint to get the version
a
but the rudder-server isn’t running, I can’t visit
ip:8080
or
ip:8080/something
also getting these when I’m using docker-compose up in the logs, but not sure if they’re breaking
Copy code
backend_1           | 2023-03-13T09:27:05.951Z	ERROR	processor.transformer	transformer/transformer.go:174	Unable to make a transfomer build version call with error : Get "http://d-transformer:9090/transformerBuildVersion": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T09:27:05.951Z	ERROR	utils.misc	misc/misc.go:1165	Unable to make a warehouse databricks build version call with error : Get "http://localhost:8082/databricksVersion": dial tcp 127.0.0.1:8082: connect: connection refused
as well as
Copy code
backend_1           | 2023/03/13 09:28:05 bugsnag/sessions/publisher.publish invalid API key: ''
every minute or so
h
No worries.. can you set the env I just gave you and check if it’s working fine?
a
hmm I’m not getting this error now, but still can’t reach the rudder-server
h
Can you post the logs you are getting now?
a
yes, here are the logs from running docker compose https://rudderstack.slack.com/files/T01E4PJL5J7/F04UAMX1B7S
and this is from rudder-server (it is running)
Copy code
{"log":"2023-03-13T09:27:11.235Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:1501\u0009WH: Warehouse master service waiting for BackendConfig before starting on 8082\n","stream":"stdout","time":"2023-03-13T09:27:11.235694308Z"}
{"log":"2023-03-13T09:27:11.236Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:1522\u0009WH: Starting warehouse master service in 8082\n","stream":"stdout","time":"2023-03-13T09:27:11.236248613Z"}
{"log":"2023-03-13T09:27:11.238Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:137\u0009[WH-Jobs]: Initializing async job runner\n","stream":"stdout","time":"2023-03-13T09:27:11.239073365Z"}
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:169\u0009[WH-Jobs]: Cleaning up the zombie asyncjobs\n","stream":"stdout","time":"2023-03-13T09:27:11.239114694Z"}
{"log":"2023-03-13T09:27:11.238Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:1071\u0009Starting a new Warehouse Destination Router: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.239679277Z"}
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:880\u0009WH: Warehouse Router started: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.23971631Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:146\u0009[WH-Jobs]: successfully cleanup async table with error\n","stream":"stdout","time":"2023-03-13T09:27:11.281692721Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:188\u0009[WH-Jobs]: Starting async job runner\n","stream":"stdout","time":"2023-03-13T09:27:11.284352604Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:300\u0009Received updated workspace config\n","stream":"stdout","time":"2023-03-13T09:27:11.29198Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:370\u0009Releasing config subscriber lock: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.292090859Z"}
[root@ip-172-31-8-161 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea]# tail 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea-json.log
{"log":"2023-03-13T09:27:11.236Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:1522\u0009WH: Starting warehouse master service in 8082\n","stream":"stdout","time":"2023-03-13T09:27:11.236248613Z"}
{"log":"2023-03-13T09:27:11.238Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:137\u0009[WH-Jobs]: Initializing async job runner\n","stream":"stdout","time":"2023-03-13T09:27:11.239073365Z"}
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:169\u0009[WH-Jobs]: Cleaning up the zombie asyncjobs\n","stream":"stdout","time":"2023-03-13T09:27:11.239114694Z"}
{"log":"2023-03-13T09:27:11.238Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:1071\u0009Starting a new Warehouse Destination Router: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.239679277Z"}
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:880\u0009WH: Warehouse Router started: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.23971631Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:146\u0009[WH-Jobs]: successfully cleanup async table with error\n","stream":"stdout","time":"2023-03-13T09:27:11.281692721Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:188\u0009[WH-Jobs]: Starting async job runner\n","stream":"stdout","time":"2023-03-13T09:27:11.284352604Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:300\u0009Received updated workspace config\n","stream":"stdout","time":"2023-03-13T09:27:11.29198Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:370\u0009Releasing config subscriber lock: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.292090859Z"}
{"log":"2023/03/13 09:28:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:28:05.951454192Z"}
[root@ip-172-31-8-161 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea]# tail 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea-json.log
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:169\u0009[WH-Jobs]: Cleaning up the zombie asyncjobs\n","stream":"stdout","time":"2023-03-13T09:27:11.239114694Z"}
{"log":"2023-03-13T09:27:11.238Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:1071\u0009Starting a new Warehouse Destination Router: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.239679277Z"}
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:880\u0009WH: Warehouse Router started: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.23971631Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:146\u0009[WH-Jobs]: successfully cleanup async table with error\n","stream":"stdout","time":"2023-03-13T09:27:11.281692721Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:188\u0009[WH-Jobs]: Starting async job runner\n","stream":"stdout","time":"2023-03-13T09:27:11.284352604Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:300\u0009Received updated workspace config\n","stream":"stdout","time":"2023-03-13T09:27:11.29198Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:370\u0009Releasing config subscriber lock: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.292090859Z"}
{"log":"2023/03/13 09:28:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:28:05.951454192Z"}
{"log":"2023/03/13 09:29:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:29:05.953858227Z"}
{"log":"2023/03/13 09:30:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:30:05.9514319Z"}
[root@ip-172-31-8-161 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea]# tail 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea-json.log
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:169\u0009[WH-Jobs]: Cleaning up the zombie asyncjobs\n","stream":"stdout","time":"2023-03-13T09:27:11.239114694Z"}
{"log":"2023-03-13T09:27:11.238Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:1071\u0009Starting a new Warehouse Destination Router: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.239679277Z"}
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:880\u0009WH: Warehouse Router started: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.23971631Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:146\u0009[WH-Jobs]: successfully cleanup async table with error\n","stream":"stdout","time":"2023-03-13T09:27:11.281692721Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:188\u0009[WH-Jobs]: Starting async job runner\n","stream":"stdout","time":"2023-03-13T09:27:11.284352604Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:300\u0009Received updated workspace config\n","stream":"stdout","time":"2023-03-13T09:27:11.29198Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:370\u0009Releasing config subscriber lock: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.292090859Z"}
{"log":"2023/03/13 09:28:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:28:05.951454192Z"}
{"log":"2023/03/13 09:29:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:29:05.953858227Z"}
{"log":"2023/03/13 09:30:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:30:05.9514319Z"}
[root@ip-172-31-8-161 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea]# ^C
[root@ip-172-31-8-161 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea]# tail 69c979550a2109c9a16a2731c6f760e82dd5df12ac0832ce64564cde279346ea-json.log
{"log":"2023-03-13T09:27:11.238Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:1071\u0009Starting a new Warehouse Destination Router: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.239679277Z"}
{"log":"2023-03-13T09:27:11.239Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:880\u0009WH: Warehouse Router started: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.23971631Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:146\u0009[WH-Jobs]: successfully cleanup async table with error\n","stream":"stdout","time":"2023-03-13T09:27:11.281692721Z"}
{"log":"2023-03-13T09:27:11.281Z\u0009INFO\u0009asyncjob\u0009jobs/runner.go:188\u0009[WH-Jobs]: Starting async job runner\n","stream":"stdout","time":"2023-03-13T09:27:11.284352604Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:300\u0009Received updated workspace config\n","stream":"stdout","time":"2023-03-13T09:27:11.29198Z"}
{"log":"2023-03-13T09:27:11.291Z\u0009INFO\u0009warehouse\u0009warehouse/warehouse.go:370\u0009Releasing config subscriber lock: S3_DATALAKE\n","stream":"stdout","time":"2023-03-13T09:27:11.292090859Z"}
{"log":"2023/03/13 09:28:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:28:05.951454192Z"}
{"log":"2023/03/13 09:29:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:29:05.953858227Z"}
{"log":"2023/03/13 09:30:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:30:05.9514319Z"}
{"log":"2023/03/13 09:31:05 bugsnag/sessions/publisher.publish invalid API key: ''\n","stream":"stdout","time":"2023-03-13T09:31:05.950985528Z"}
docker ps
Copy code
CONTAINER ID   IMAGE                                  COMMAND                  CREATED       STATUS                   PORTS                                                           NAMES
69c979550a21   rudderlabs/rudder-server:latest        "sh -c '/wait-for db…"   2 weeks ago   Up 8 minutes             0.0.0.0:8080->8080/tcp, :::8080->8080/tcp                       ec2-user_backend_1
9b8379d04872   rudderlabs/rudder-transformer:latest   "/sbin/tini -- npm s…"   2 weeks ago   Up 8 minutes (healthy)   0.0.0.0:9090->9090/tcp, :::9090->9090/tcp                       ec2-user_d-transformer_1
d072fe366b98   postgres:15-alpine                     "docker-entrypoint.s…"   2 weeks ago   Up 8 minutes             0.0.0.0:6432->5432/tcp, :::6432->5432/tcp                       ec2-user_db_1
f8a723d85358   prom/statsd-exporter:v0.22.4           "/bin/statsd_exporter"   2 weeks ago   Up 8 minutes (healthy)   0.0.0.0:9102->9102/tcp, :::9102->9102/tcp, 9125/tcp, 9125/udp   ec2-user_metrics-exporter_1
h
I don’t see any panic logs in the one you have pasted….Is the server up or still crash looping?
a
No me neither.. It’s really strange, in docker ps I can see rudder-server is running fine
but I can’t connect to it. Port 8080 is open of course (it was running fine for 2 weeks and it stopped randomly on a Sunday)
h
can you enter the container and hit the /health endpoint
a
I entered the rudder-server container and tried to, but I can’t hit a localhost endpoint either
Copy code
Mem: 1346512K used, 6688800K free, 18072K shrd, 2088K buff, 596488K cached
CPU:  40% usr   5% sys   0% nic  25% idle   0% io   0% irq   0% sirq
Load average: 0.94 0.72 0.46 7/364 34
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
    1     0 root     S    12.0g 156%   0   0% /rudder-server
   22     0 root     S     2588   0%   1   0% /bin/bash
   34    22 root     R     1612   0%   1   0% top
bash-5.1# wget http://localhost:8080
Connecting to localhost:8080 (127.0.0.1:8080)
wget: can't connect to remote host (127.0.0.1): Connection refused
bash-5.1# wget http://localhost
Connecting to localhost (127.0.0.1:80)
wget: can't connect to remote host (127.0.0.1): Connection refused
bash-5.1# wget http://localhost:8080/health
Connecting to localhost:8080 (127.0.0.1:8080)
wget: can't connect to remote host (127.0.0.1): Connection refused
bash-5.1#
the rudder-server process is running though
I found this in the /tmp of the rudder-server, does it help?
Copy code
bash-5.1# cat /tmp/error_store.json
{
 "Errors": [
  {
   "StartTime": 1676902425,
   "CrashTime": 1678635461,
   "ReadableStartTime": "2023-02-20 14:13:45 +0000 UTC",
   "ReadableCrashTime": "2023-03-12 15:37:41 +0000 UTC",
   "Message": "could not acquire a dslist read lock: context deadline exceeded",
   "StackTrace": "goroutine 1361 [running]:\ngithub.com/rudderlabs/rudder-server/utils/misc.RecordAppError({0x2caaec0, 0xc020a54f40})\n\t/rudder-server/utils/misc/misc.go:183 +0x92\ngithub.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1.1()\n\t/rudder-server/utils/misc/misc.go:1205 +0x305\nsync.(*Once).doSlow(0x0?, 0x7?)\n\t/usr/local/go/src/sync/once.go:74 +0xc2\nsync.(*Once).Do(...)\n\t/usr/local/go/src/sync/once.go:65\ngithub.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1()\n\t/rudder-server/utils/misc/misc.go:1196 +0xbc\npanic({0x2298640, 0xc03452e500})\n\t/usr/local/go/src/runtime/panic.go:884 +0x212\ngithub.com/rudderlabs/rudder-server/router/internal/jobiterator.(*Iterator).HasNext(0xc0364925a0)\n\t/rudder-server/router/internal/jobiterator/jobiterator.go:134 +0x3ce\ngithub.com/rudderlabs/rudder-server/router.(*HandleT).readAndProcess(0xc000e3d800)\n\t/rudder-server/router/router.go:1700 +0x3db\ngithub.com/rudderlabs/rudder-server/router.(*HandleT).generatorLoop(0xc000e3d800, {0x2ccb870, 0xc000e73e00})\n\t/rudder-server/router/router.go:1632 +0x22d\ngithub.com/rudderlabs/rudder-server/router.(*HandleT).Start.func1()\n\t/rudder-server/router/router.go:1952 +0x1ce\ngithub.com/rudderlabs/rudder-server/utils/misc.WithBugsnag.func1()\n\t/rudder-server/utils/misc/misc.go:1217 +0x70\ngolang.org/x/sync/errgroup.(*Group).Go.func1()\n\t/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64\ncreated by golang.org/x/sync/errgroup.(*Group).Go\n\t/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5\n",
   "Code": 101
  },
  {
   "StartTime": 1678695730,
   "CrashTime": 1678695760,
   "ReadableStartTime": "2023-03-13 08:22:10 +0000 UTC",
   "ReadableCrashTime": "2023-03-13 08:22:40 +0000 UTC",
   "Message": "error while running changesets that run always in 'gw' jobsdb tables: run migration from template directory \"jobsdb_always\", migration failed: CREATE INDEX CONCURRENTLY cannot run inside a transaction block in line 0: \n    CREATE INDEX CONCURRENTLY IF NOT EXISTS \"idx_gw_jobs_320_ws\" ON \"gw_jobs_320\" (workspace_id);\n\n    CREATE INDEX CONCURRENTLY IF NOT EXISTS \"idx_gw_jobs_321_ws\" ON \"gw_jobs_321\" (workspace_id);\n (details: pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block)",
   "StackTrace": "goroutine 100 [running]:\ngithub.com/rudderlabs/rudder-server/utils/misc.RecordAppError({0x2caaec0, 0xc005500af0})\n\t/rudder-server/utils/misc/misc.go:183 +0x92\ngithub.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1.1()\n\t/rudder-server/utils/misc/misc.go:1205 +0x305\nsync.(*Once).doSlow(0x467e65?, 0xc000a48238?)\n\t/usr/local/go/src/sync/once.go:74 +0xc2\nsync.(*Once).Do(...)\n\t/usr/local/go/src/sync/once.go:65\ngithub.com/rudderlabs/rudder-server/utils/misc.BugsnagNotify.func1()\n\t/rudder-server/utils/misc/misc.go:1196 +0xbc\npanic({0x2298640, 0xc01e5e9e40})\n\t/usr/local/go/src/runtime/panic.go:884 +0x212\ngithub.com/rudderlabs/rudder-server/jobsdb.(*HandleT).runAlwaysChangesets(0xc01ebef8c0, 0x1?)\n\t/rudder-server/jobsdb/setup.go:43 +0x194\ngithub.com/rudderlabs/rudder-server/jobsdb.(*HandleT).init.func5.1.1({0x2cae240, 0x4015208})\n\t/rudder-server/jobsdb/jobsdb.go:833 +0xbf\ngithub.com/rudderlabs/rudder-server/jobsdb/internal/lock.(*Locker).WithLock(0xc082aaedf8, 0xc000a552a0)\n\t/rudder-server/jobsdb/internal/lock/lock.go:56 +0x93\ngithub.com/rudderlabs/rudder-server/jobsdb.(*HandleT).init.func5.1()\n\t/rudder-server/jobsdb/jobsdb.go:799 +0x3d\ngithub.com/rudderlabs/rudder-server/jobsdb.(*HandleT).withDistributedLock(0xc000074800?, {0x2ccb8a8, 0xc000056040}, 0xc01e4458c0, {0x269b26c, 0xe}, 0xc000a553a0)\n\t/rudder-server/jobsdb/jobsdb.go:3671 +0x1aa\ngithub.com/rudderlabs/rudder-server/jobsdb.(*HandleT).init.func5(0xc01e445640?)\n\t/rudder-server/jobsdb/jobsdb.go:795 +0x5a\ngithub.com/rudderlabs/rudder-server/jobsdb.(*HandleT).WithTx(0xc01ebef8c0?, 0xc000a554b8)\n\t/rudder-server/jobsdb/jobsdb.go:1730 +0x97\ngithub.com/rudderlabs/rudder-server/jobsdb.(*HandleT).init(0xc01ebef8c0)\n\t/rudder-server/jobsdb/jobsdb.go:793 +0x44a\ngithub.com/rudderlabs/rudder-server/jobsdb.newOwnerType({0x2686eb8, 0x4}, {0x2685e7e, 0x2}, {0xc000a55d88, 0x5, 0x0?})\n\t/rudder-server/jobsdb/jobsdb.go:705 +0xd3\ngithub.com/rudderlabs/rudder-server/jobsdb.NewForRead(...)\n\t/rudder-server/jobsdb/jobsdb.go:684\ngithub.com/rudderlabs/rudder-server/app/apphandlers.",
   "Code": 101
  }
 ]
}bash-5.1#
it crashed indeed yesterday
because of
could not acquire a dslist read lock: context deadline exceeded
and then today again because of
error while running changesets that run always in 'gw' jobsdb tables: run migration from template directory…
h
Can you check
/data/rudderstack/recovery_Data.json
contents and paste it ?
a
it’s in the /tmp right of this?
Copy code
bash-5.1# cd /tmp
bash-5.1# ls
destination                        recovery_data.json                 rudder-server.sock                 rudder-warehouse-staging-uploads   transformation
error_store.json                   rudder-archives                    rudder-warehouse-json-uploads-tmp  source
bash-5.1# cat recovery_data.json
{
 "StartTimes": [
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  0
 ],
 "ReadableStartTimes": [
  "1970-01-01 00:00:00 +0000 UTC",
  "1970-01-01 00:00:00 +0000 UTC",
  "1970-01-01 00:00:00 +0000 UTC",
  "1970-01-01 00:00:00 +0000 UTC",
  "1970-01-01 00:00:00 +0000 UTC",
  "1970-01-01 00:00:00 +0000 UTC",
  "1970-01-01 00:00:00 +0000 UTC",
  "1970-01-01 00:00:00 +0000 UTC"
 ],
 "DegradedModeStartTimes": null,
 "ReadableDegradedModeStartTimes": null,
 "Mode": "normal"
}bash-5.1#
there’s no /data in the rudder container nor in the server that launched the docker containers
h
One last thing… you would have tables with names
Copy code
<some-string>_runalways_migrations
and
Copy code
<some-string>_schema_migrations
Can you check if any of these tables has
dirty
column set to true
a
Ok check, I’m not really sure how I go there. Enter the psql container and then log in? I tried all the user/pass combinations that I could think of in the rudder-compose.yml but psql says the table doesn’t exist
Copy code
[root@ip-172-31-8-161 ec2-user]# docker exec -it d0 /bin/bash
d072fe366b98:/# psql -U rudder
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  database "rudder" does not exist
d072fe366b98:/# psql -U root -W
Password:
d072fe366b98:/# psql -U rudder -W
Password:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  database "rudder" does not exist
d072fe366b98:/# psql -U db -W
Password:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "db" does not exist
d072fe366b98:/# psql -U postgres
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "postgres" does not exist
d072fe366b98:/# psql -U postgres -W
Password:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "postgres" does not exist
d072fe366b98:/#
d072fe366b98:/# psql -U rudder -W
Password:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  database "rudder" does not exist
d072fe366b98:/# psql^CU rudder -W
d072fe366b98:/# psql
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "root" does not exist
h
use database as
jobsdb
and user as
rudder
a
worked 🙂
Copy code
jobsdb=# select *
from rt_runalways_migrations
where false;
 version | dirty
---------+-------
(0 rows)

jobsdb=# select *
from rt_schema_migrations
where false;
 version | dirty
---------+-------
(0 rows)
they have the dirty column yes
h
You can also set this
RSERVER_SQLMIGRATOR_FORCE_SET_LOWER_VERSION=true
and try again?
a
now those errors do pop up in the logs of running rudderstack
Copy code
backend_1           | 2023/03/13 10:05:00 notifying bugsnag: error while running changesets that run always in 'gw' jobsdb tables: run migration from template directory "jobsdb_always", migration failed: CREATE INDEX CONCURRENTLY cannot run inside a transaction block in line 0:
backend_1           |     CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_gw_jobs_320_ws" ON "gw_jobs_320" (workspace_id);
backend_1           |
backend_1           |     CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_gw_jobs_321_ws" ON "gw_jobs_321" (workspace_id);
backend_1           |  (details: pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block)
backend_1           | 2023/03/13 10:05:00 bugsnag.Notify: bugsnag/payload.deliver: invalid api key: ''
backend_1           | 2023/03/13 10:05:00 bugsnag/sessions/publisher.publish invalid API key: ''
backend_1           | panic: error while running changesets that run always in 'gw' jobsdb tables: run migration from template directory "jobsdb_always", migration failed: CREATE INDEX CONCURRENTLY cannot run inside a transaction block in line 0:
backend_1           |     CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_gw_jobs_320_ws" ON "gw_jobs_320" (workspace_id);
backend_1           |
backend_1           |     CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_gw_jobs_321_ws" ON "gw_jobs_321" (workspace_id);
backend_1           |  (details: pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block) [recovered]
backend_1           | 	panic: error while running changesets that run always in 'gw' jobsdb tables: run migration from template directory "jobsdb_always", migration failed: CREATE INDEX CONCURRENTLY cannot run inside a transaction block in line 0:
backend_1           |     CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_gw_jobs_320_ws" ON "gw_jobs_320" (workspace_id);
backend_1           |
backend_1           |     CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_gw_jobs_321_ws" ON "gw_jobs_321" (workspace_id);
backend_1           |  (details: pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block) [recovered]
backend_1           | 	panic: error while running changesets that run always in 'gw' jobsdb tables: run migration from template directory "jobsdb_always", migration failed: CREATE INDEX CONCURRENTLY cannot run inside a transaction block in line 0:
backend_1           |     CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_gw_jobs_320_ws" ON "gw_jobs_320" (workspace_id);
backend_1           |
backend_1           |     CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_gw_jobs_321_ws" ON "gw_jobs_321" (workspace_id);
backend_1           |  (details: pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block)
h
I think you are on an older version which isn’t stable
Can you use the
1.6.4
version for rudder-server?
a
the server (like the instance on aws ec2) is 2 weeks old in the meantime I tried to just spin up a completely new server, install docker and docker-compose, put the workspace token in and run that. It also doesn’t work, the server is reachable with a GET request but track events hang. In the logs is this:
Copy code
backend_1           | 2023-03-13T10:10:46.530Z	INFO	router.TIKTOK_ADS.network	router/network.go:218	Network Handler Startup
backend_1           | 2023-03-13T10:10:46.534Z	INFO	router.TIKTOK_ADS.network	router/network.go:230	forceHTTP1: false
backend_1           | 2023-03-13T10:10:46.536Z	INFO	router.TIKTOK_ADS.network	router/network.go:244	TIKTOK_ADS:   defaultTransportCopy.MaxIdleConns: 100
backend_1           | 2023-03-13T10:10:46.537Z	INFO	router.TIKTOK_ADS.network	router/network.go:245	defaultTransportCopy.MaxIdleConnsPerHost: 100
backend_1           | 2023-03-13T10:10:46.537Z	INFO	router.TIKTOK_ADS.network	router/network.go:246	netClientTimeout: 10s
backend_1           | 2023-03-13T10:10:46.542Z	INFO	router.TIKTOK_ADS	router/router.go:1935	Starting router: TIKTOK_ADS
backend_1           | 2023-03-13T10:10:46.542Z	INFO	router	manager/manager.go:126	Starting a new Batch Destination Router: S3
backend_1           | 2023-03-13T10:10:46.543Z	INFO	router.TIKTOK_ADS	router/router.go:1620	Generator started for TIKTOK_ADS and destinationID TIKTOK_ADS
backend_1           | 2023-03-13T10:10:46.544Z	INFO	batchrouter.S3	batchrouter/batchrouter.go:2287	BRT: Batch Router started: S3
backend_1           | 2023-03-13T10:10:46.562Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:46.562Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
backend_1           | 2023-03-13T10:10:46.764Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:46.765Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
backend_1           | 2023-03-13T10:10:46.967Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:46.968Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
backend_1           | 2023-03-13T10:10:47.170Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:47.170Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
d-transformer_1     | Master (pid: 18) has started
d-transformer_1     | Worker (pid: 38) is online
backend_1           | 2023-03-13T10:10:47.372Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:47.373Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
backend_1           | 2023-03-13T10:10:47.574Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:47.575Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
backend_1           | 2023-03-13T10:10:47.777Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:47.778Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
backend_1           | 2023-03-13T10:10:47.980Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:47.981Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
backend_1           | 2023-03-13T10:10:48.183Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:10:48.184Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
maybe there is something wrong with tiktok ads? was that updated?
rudder-server is running on latest
Copy code
CONTAINER ID   IMAGE                                  COMMAND                  CREATED       STATUS                     PORTS     NAMES
69c979550a21   rudderlabs/rudder-server:latest        "sh -c '/wait-for db…"   2 weeks ago   Exited (2) 8 minutes ago             ec2-user_backend_1
on the server we’re debugging I can try to just rm -rf all containers and run docker-compose again, but that’s the same as the new server
h
It seems like your server is unable to talk with the transformer container… did something change with regards to this?
Copy code
http://d-transformer:9090/features
This endpoint seems unreachable
a
no nothing changed, we didn’t update any transformations since like a month or so ago
h
What do you mean when you say the track events are stuck? You mean they aren’t delivered to the destination?
a
might be a delay thing btw the transformer
Copy code
backend_1           | 2023-03-13T10:18:11.713Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:18:11.713Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
backend_1           | 2023-03-13T10:18:11.915Z	ERROR	processor	processor/processor.go:665	error sending request - %sGet "http://d-transformer:9090/features": dial tcp 172.18.0.4:9090: connect: connection refused
backend_1           | 2023-03-13T10:18:11.916Z	INFO	processor	processor/processor.go:628	Fetched transformer features from http://d-transformer:9090 (retry: true)
d-transformer_1     | Worker (pid: 32) has started
d-transformer_1     | App started. Listening on port: 9090
backend_1           | 2023-03-13T10:18:12.704Z	INFO	backend-config	backend-config/backend-config.go:213	Workspace Config changed
backend_1           | 2023-03-13T10:18:12.704Z	INFO	router	manager/manager.go:136	Starting a new Destination: MP
backend_1           | 2023-03-13T10:18:12.704Z	INFO	router.MP	router/router.go:1814	Router started: MP
backend_1           | 2023-03-13T10:18:12.705Z	INFO	router.MP.network	router/network.go:218	Network Handler Startup
backend_1           | 2023-03-13T10:18:12.705Z	INFO	router.MP.network	router/network.go:230	forceHTTP1: false
no actually it’s working now
no idea, maybe it was still spinning up. So the new server works
but the old one is still broken, I guess after a dirty migration something?
h
yes… you might have to manually clean up things to get the old one up
a
ok thanks a lot for the help, just one more question: how can something like this happen randomly? We were not at work yesterday
h
The crash log which I see was something we fixed over a month ago…not sure how did you end up pulling that image tag. But I suggest you refrain from using the
latest
tag on production and use server versioning
1
instead
a
Strange indeed as the instance was only 2 weeks old, maybe it came back somehow? That’s a good tip, I was just following the docker readme on your website. I know it’s better to have KS for prod, we had it in kubernetes mode before but we don’t have a KS expert in our company so I was running it as long as it works. However “just using KS to have something that is like a load balancer” is way too overkill. The cluster hanged every few months and at some point point a pod ate up $1000 of bandwidth because it was sending statistics to another pod (inside the VPC). At that point we were like ok either we need a KS expert or we go back to simple docker
anyway, we’re back up. Really appreciate the help on this, thanks so much!
🙌 1
✅ 1
h
You could use the free version instead if your event load isn’t very high
a
we’re doing around 3.5M events a month 🙂 tbh $750/mo is really steep
h
I guess there’s a 500$/month plan now but will leave it upto you
a
BTW I got the same exact error on 2023-03-13T091342.876Z. I guess, but I could be wrong, that Rudderstack definitely have some kind of problem on their fetchAll API, also because the error speaks :“Client.Timeout exceeded while awaiting headers” so is the Client that goes in timeout because api.rudderstack.com is not sending headers. And it happens very often during a day.