Hi Team, Recently i have removed destination sync ...
# support
a
Hi Team, Recently i have removed destination sync to Postgress from different sources, as soon i i did it , the backed started crashing stating -
Copy code
2022-12-20T09:12:47.716Z	ERROR	warehouse	warehouse/warehouse.go:271	[WH] Failed in handle Upload jobs for worker: %!w(*pq.Error=&{FATAL 28P01 password authentication failed for user "****"            auth.c 336 auth_failed})
Hi Team, any update on this ?
@early-stone-68655
g
Is this related to the other thread on #open-source?
a
yes
h
@ambitious-breakfast-83504 is this still occurring? Can you share the crash stack trace
a
yes it occuring again and again
Copy code
rentomojo@Admins-MacBook-Pro rentomojo % kubectl logs -f --tail 100 rudder-stack-v1-rudderstack-0 -n rudder-stack -c rudderstack-backend
		  )
		ORDER BY
		  ST.id DESC;

2022-12-21T05:03:46.608Z	INFO	warehouse	warehouse/schema.go:94	[WH]: Fetching current schema from wh postgresql: 
		SELECT
		  schema
		FROM
		  wh_schemas ST
		WHERE
		  (
			ST.destination_id = '2JBZj9lWJpLypIP669HUDfOa04N'
			AND ST.namespace = 'rweb_prod'
			AND ST.source_id = '29vlqJBySxNu5bNhdDtk0VVBQBU'
		  )
		ORDER BY
		  ST.id DESC;

2022-12-21T05:03:46.623Z	INFO	warehouse	warehouse/upload.go:1868	[WH]: Starting batch processing 100 stage files for S3_DATALAKE:2JBghvXckRvAHXgaZ1oPm86vO3b
2022-12-21T05:03:46.627Z	INFO	warehouse	warehouse/upload.go:1868	[WH]: Starting batch processing 100 stage files for S3_DATALAKE:2JBghvXckRvAHXgaZ1oPm86vO3b
2022-12-21T05:03:46.639Z	INFO	warehouse	warehouse/warehouse.go:511	WH: S3_DATALAKE: Creating record in wh_uploads table: 
		INSERT INTO wh_uploads (
		  source_id, namespace, workspace_id, destination_id,
		  destination_type, start_staging_file_id,
		  end_staging_file_id, start_load_file_id,
		  end_load_file_id, status, schema,
		  error, metadata, first_event_at,
		  last_event_at, created_at, updated_at
		)
		VALUES
		  (
			$1, $2, $3, $4, $5, $6, $7, $8, $9, $10,
			$11, $12, $13, $14, $15, $16, $17
		  ) RETURNING id;

2022-12-21T05:03:46.655Z	INFO	warehouse	warehouse/upload.go:1868	[WH]: Starting batch processing 100 stage files for S3_DATALAKE:2JBghvXckRvAHXgaZ1oPm86vO3b
2022-12-21T05:03:46.655Z	INFO	warehouse	warehouse/upload.go:1946	[WH]: Publishing 7 staging files for S3_DATALAKE:2JBghvXckRvAHXgaZ1oPm86vO3b to PgNotifier
2022-12-21T05:03:46.656Z	INFO	warehouse	warehouse/warehouse.go:511	WH: S3_DATALAKE: Creating record in wh_uploads table: 
		INSERT INTO wh_uploads (
		  source_id, namespace, workspace_id, destination_id,
		  destination_type, start_staging_file_id,
		  end_staging_file_id, start_load_file_id,
		  end_load_file_id, status, schema,
		  error, metadata, first_event_at,
		  last_event_at, created_at, updated_at
		)
		VALUES
		  (
			$1, $2, $3, $4, $5, $6, $7, $8, $9, $10,
			$11, $12, $13, $14, $15, $16, $17
		  ) RETURNING id;

2022-12-21T05:03:46.659Z	INFO	warehouse	warehouse/upload.go:1946	[WH]: Publishing 17 staging files for S3_DATALAKE:2JBghvXckRvAHXgaZ1oPm86vO3b to PgNotifier
2022-12-21T05:03:46.663Z	INFO	warehouse	warehouse/upload.go:1946	[WH]: Publishing 17 staging files for S3_DATALAKE:2JBghvXckRvAHXgaZ1oPm86vO3b to PgNotifier
2022-12-21T05:03:46.666Z	INFO	warehouse.pgnotifier	pgnotifier/pgnotifier.go:538	PgNotifier: Inserting 7 records into pg_notifier_queue as batch: 422de2fb-0764-4705-a3f6-502e0fe66df9
2022-12-21T05:03:46.667Z	INFO	warehouse	warehouse/warehouse.go:511	WH: S3_DATALAKE: Creating record in wh_uploads table: 
		INSERT INTO wh_uploads (
		  source_id, namespace, workspace_id, destination_id,
		  destination_type, start_staging_file_id,
		  end_staging_file_id, start_load_file_id,
		  end_load_file_id, status, schema,
		  error, metadata, first_event_at,
		  last_event_at, created_at, updated_at
		)
		VALUES
		  (
			$1, $2, $3, $4, $5, $6, $7, $8, $9, $10,
			$11, $12, $13, $14, $15, $16, $17
		  ) RETURNING id;

2022-12-21T05:03:46.669Z	INFO	warehouse.pgnotifier	pgnotifier/pgnotifier.go:538	PgNotifier: Inserting 17 records into pg_notifier_queue as batch: d0832c62-f887-437a-b362-0aa29644f09d
2022-12-21T05:03:46.671Z	INFO	warehouse.pgnotifier	pgnotifier/pgnotifier.go:538	PgNotifier: Inserting 17 records into pg_notifier_queue as batch: 8424caae-d5aa-471c-bc5d-8c636c2c7b5c
2022-12-21T05:03:46.678Z	INFO	warehouse.pgnotifier	pgnotifier/pgnotifier.go:581	PgNotifier: Inserted 7 records into pg_notifier_queue as batch: 422de2fb-0764-4705-a3f6-502e0fe66df9
2022-12-21T05:03:46.763Z	INFO	warehouse.pgnotifier	pgnotifier/pgnotifier.go:581	PgNotifier: Inserted 17 records into pg_notifier_queue as batch: d0832c62-f887-437a-b362-0aa29644f09d
2022-12-21T05:03:46.763Z	INFO	warehouse	warehouse/upload.go:1868	[WH]: Starting batch processing 100 stage files for S3_DATALAKE:2JBZj9lWJpLypIP669HUDfOa04N
2022-12-21T05:03:46.770Z	INFO	warehouse	warehouse/upload.go:1946	[WH]: Publishing 21 staging files for S3_DATALAKE:2JBZj9lWJpLypIP669HUDfOa04N to PgNotifier
2022-12-21T05:03:46.771Z	INFO	warehouse.pgnotifier	pgnotifier/pgnotifier.go:538	PgNotifier: Inserting 21 records into pg_notifier_queue as batch: fff69fa2-91a4-4b93-be7a-20aebd8a56a3
2022-12-21T05:03:46.780Z	INFO	warehouse.pgnotifier	pgnotifier/pgnotifier.go:581	PgNotifier: Inserted 17 records into pg_notifier_queue as batch: 8424caae-d5aa-471c-bc5d-8c636c2c7b5c
2022-12-21T05:03:46.788Z	INFO	warehouse.pgnotifier	pgnotifier/pgnotifier.go:581	PgNotifier: Inserted 21 records into pg_notifier_queue as batch: fff69fa2-91a4-4b93-be7a-20aebd8a56a3
2022-12-21T05:03:46.795Z	INFO	warehouse	warehouse/upload.go:1868	[WH]: Starting batch processing 100 stage files for S3_DATALAKE:2JBZj9lWJpLypIP669HUDfOa04N
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1e64a3f]

goroutine 5694 [running]:
github.com/rudderlabs/rudder-server/services/controlplane.(*Client).DestinationHistory(0x0, {0x2c9da90, 0xc000058048}, {0xc004bcd0e0, 0x1b})
	/rudder-server/services/controlplane/client.go:170 +0x7f
github.com/rudderlabs/rudder-server/warehouse.(*UploadJobT).destinationRevisionIDMap(0xc000e0adc0)
	/rudder-server/warehouse/upload.go:1799 +0x2cc
github.com/rudderlabs/rudder-server/warehouse.(*UploadJobT).createLoadFiles(0xc000e0adc0, 0x1)
	/rudder-server/warehouse/upload.go:1873 +0x305
github.com/rudderlabs/rudder-server/warehouse.(*UploadJobT).run(0xc000e0adc0)
	/rudder-server/warehouse/upload.go:439 +0x12eb
github.com/rudderlabs/rudder-server/warehouse.(*HandleT).handleUploadJob(...)
	/rudder-server/warehouse/warehouse.go:284
github.com/rudderlabs/rudder-server/warehouse.(*HandleT).initWorker.func1()
	/rudder-server/warehouse/warehouse.go:269 +0x146
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
	/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5
h
Are you using a self hosted control plane or the rudder hosted one? What’s the server version you are on?
a
rudder-hoste controlPlane
im using helm charts to deploy the backend : so it would have latest server version
Copy code
backend:
  image:
    repository: rudderlabs/rudder-server
    version: latest
    pullPolicy: Always
  controlPlaneJSON: false
is there anything to do, so i can stop this crashing of backend ?
h
Can you set
RSERVER_WAREHOUSE_RUNNING_MODE = degraded
This should stop the crash but the delivery to warehouse would be stalled
a
where should i set this value ?
in the env of server ?
and im not finding the key in the code base of rudder-server
even in the latest code i didn;t find the key
all i could find is this key only :
Copy code
RSERVER_WAREHOUSE_MODE
h
You wouldn’t find this key because for env we convert a snake cased variable to this form
Warehouse.runningMode is what you should search for
a
got it , i will quickly add and deploy it
or instead of this, i can just turn off sync to this destination from the controlPlane right ?
@helpful-island-54641?!
h
Yes that should help too
@average-tailor-86667 can you look into this
a
I think backend is crashing when its trying to sync data into aws S3 datalake after every 30 mins
with the above error that i have shared
some nil pointer exception while processing the data
a
@ambitious-breakfast-83504 We added a fix for this. Can u restart the pods to fetch the latest updated image.
a
Yes @average-tailor-86667 will do it, Thanks a lot for the quick resolution, great work team 👏
🙌 1
e
Kudos team 🙌 And thanks Subramony for reporting this
👍 1