Hey team, Observing attempts for RS to access s3 ...
# support
a
Hey team, Observing attempts for RS to access s3 when we don’t have backup or event replay setup. Followed this guide to comment out the env variables so RS does not use s3 for backups https://www.rudderstack.com/docs/user-guides/administrators-guide/bucket-configuration-settings/. We do not use s3 anywhere else and RS is still trying to access it, no errors in our tables relating to this. We would like to turn it off so we don’t keep getting the alerts. Appreciate support to stop these from happening.
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
q
Hi @acceptable-lion-84959 Can you share some logs where you are seeing this? It will enable us to look at the right place.
a
Hey @quiet-wolf-72320, we’re are seeing this in our AWS environment, getting these errors:
These are from DataDog
Please let me know if you need anything else, keen to close these off
do have these statsd related errors: 2023-02-03T001430.779Z ERROR stats stats/stats.go:165 error while setting statsd client: dial udp: lookup cloudwatch-statsd.amazon-cloudwatch.svc.cluster.local on
main one seems to be that RS is attempting to
GenerateDataKey
from the EKS node group and does not have permissions
h
@acceptable-lion-84959 Can you do a printenv on the rudder server pod and share the output if possible?
a
@helpful-island-54641 Here are the env vars, excluded all the port ones, these are what remain.
Copy code
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=blue-rudderstack-1
TERM=xterm
CONFIG_BACKEND_TOKEN=****
RUDDER_ADMIN_PASSWORD=****
RSERVER_JOBS_DB_BACKUP_ENABLED=false
JOBS_DB_USER=****
JOBS_DB_DB_NAME=****
STATSD_SERVER_URL=cloudwatch-statsd.amazon-cloudwatch.svc.cluster.local:8125
DEST_TRANSFORM_URL=http://blue-rudderstack-transformer:9090
POSTGRES_POD_NAME=blue-rudderstack-postgresql
INSTANCE_ID=blue-rudderstack-1
POSTGRES_HEADLESS_SVC=blue-rudderstack-postgresql-hl
JOBS_DB_HOST=This is expected to be set by docker entrypoint script
JOBS_DB_PORT=****
JOBS_DB_PASSWORD=****
COMPUTE_DB_HOST_IN_K8S=true
HOME=/root
h
Copy code
STATSD_SERVER_URL
Did you set this URL? These are causing the STATSD errors
RSERVER_JOBSDB_BACKUP_ENABLED=false
and
RSERVER_ENABLE_STATS=false
to have both backup and stat errors disabled
a
thanks @helpful-island-54641 is it better to disable stat with the environment variable or in the config here: https://github.com/rudderlabs/rudderstack-helm/blob/master/rudder-config.yaml#L6
h
@acceptable-lion-84959 both of them should be fine… would suggest the env way though
a
thanks @helpful-island-54641 i’ll implement above and let you know, hopefully stops this error
unfortunately, still getting these
h
Can you share me the logs of your rudder-server pod?
a
Here are some logs from the same time period as
UnauthorizedAPICalls
errors: We started getting them from 8:35 to 10:15, they seem to be happening every couple of hours (attached screenshot of the error count). This seems to be the most relevant error
Copy code
08:39:53.730
2023-02-07T21:39:53.730Z	ERROR	warehouse.archiver	archive/archiver.go:309	Error backing up staging files for upload:8196 : AccessDenied: Access Denied
08:39:53.730
2023-02-07T21:39:53.730Z	ERROR	tablearchiver	tablearchiver/tablearchiver.go:122	[TableJSONArchiver]: Error uploading local file dump to object storage: AccessDenied: Access Denied
08:39:53.730
	status code: 403, request id: VD69G26MNWJYJ870, host id: ****
08:39:53.730
2023-02-07T21:39:53.730Z	INFO	warehouse.archiver	archive/archiver.go:132	Completed backupRecords for uploadId: %!s(int64=8196), sourceId: ****, destinationId: ****, tableName: wh_staging_files,
08:39:53.730
	status code: 403, request id: VD69G26MNWJYJ870, host id: ****
08:39:53.734
2023-02-07T21:39:53.733Z	INFO	warehouse.archiver	archive/archiver.go:73	Starting backupRecords for uploadId: %!s(int64=8023), sourceId: ****, destinationId: ****, tableName: wh_staging_files,
08:39:54.790
2023-02-07T21:39:54.790Z	ERROR	tablearchiver	tablearchiver/tablearchiver.go:122	[TableJSONArchiver]: Error uploading local file dump to object storage: AccessDenied: Access Denied
08:39:54.790
2023-02-07T21:39:54.790Z	ERROR	warehouse.archiver	archive/archiver.go:309	Error backing up staging files for upload:8023 : AccessDenied: Access Denied
Please do let me know if need anymore logs @helpful-island-54641 I have tried to keep it to the most relevant one. This seems to be the best candidate relating to table archiving. Worth noting that our destination is BQ and we do stage files in GCS, we aren’t using s3 anywhere.
Error frequency:
h
Can you set this variable?
JOBS_BACKUP_STORAGE_PROVIDER=GCS
and provide
GOOGLE_APPLICATION_CREDENTIALS
in the env? This will ensure that your backups are stored to GCS
I don’t see a way in which you can stop the backups from happening. @average-tailor-86667 Can you check this?
a
@acceptable-lion-84959 Can u set this
RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS=false
to disable the backups from warehouse module as well.
a
@average-tailor-86667 just
RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS=false
? And no need for
JOBS_BACKUP_STORAGE_PROVIDER=GCS
and
GOOGLE_APPLICATION_CREDENTIALS
which wouldn’t be used, just checking for clarity
a
In addition to those we need to have
RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS=false
.
a
why
JOBS_BACKUP_STORAGE_PROVIDER=GCS
or
GOOGLE_APPLICATION_CREDENTIALS
if those wouldn’t be used? Would it be enough to just set
RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS=false
?
a
Sorry. I thought you were asking for
RSERVER_JOBSDB_BACKUP_ENABLED=false
Yeah we don’t need those.
Copy code
RSERVER_JOBSDB_BACKUP_ENABLED=false
RSERVER_ENABLE_STATS=false
RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS=false
These are sufficient
a
thanks Akash, will give this a go now. How are the backups different to staging files in GCS? Recovery if the whole db gets wiped?
a
When ``RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS`` is enabled we are only backing up
wh_staging_files
table because it’s the entry point for warehouse module.
a
What does it mean practically? Our staging files are still being saved in GCS, and in previous RS outages the unprocessed files will get processed after recovery. Backup here seems to be something else? Guessing it’s not related to the above since we haven’t configured backup before and the above mechanism works.
h
So we have location of the staging files as rows in the postgres but once the data is loaded into the warehouse we don’t clean up these staging files data at that instant but do backup these rows to object storage periodically
a
I think I understand, so it’s a backup of the staging files after they get processed before they get cleaned? However looking at the gcs bucket there are some files created back in April 2022, wouldn’t these be cleaned up?
what i’m trying to figure out is have we been using any of these backups already? It doesn’t seem like we have since we haven’t configured these values in the RS environment variables. But we do stage the files in GCS before they go to BQ and it seems like there is a ‘backup’ there
h
We don’t clean up the staging files in your GCS buckets, I don’t think we even take permissions to delete your staging object storage files. The backup you just disabled is just present to stop a table getting bloated up and has nothing to do with your staging files backup
a
RSERVER_WAREHOUSE_ARCHIVE_UPLOAD_RELATED_RECORDS
What is does is it only archives the wh_staging_files table since that table will grow huge. We don’t delete staging files from customer’s bucket.
a
Should we be enabling this? We have noticed that we get 1 incident every 3 months where postgres begins to act up, perhaps it’s because of this table becoming bloated?
a
Yes.
a
Thats good advice, I guess now I have the opposite question. We run RS in EKS and stage the files in GCS to a BQ destination. Where and how should we enable the backups?
Is that this section in the Administrator’s guide https://www.rudderstack.com/docs/user-guides/administrators-guide/bucket-configuration-settings/? Or is this something else