You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please……. I have problem with sftp-gcs, when I run it in k8s.
I've got the key for the service account in the json file which was downloaded when creating the key.
The service account has StorageAdmin role on the bucket and roles/logging-admin
>kubectl logs sftp-gsc-6dd46fb85c-7vpp5
2022-02-23T12:03:34.399Z warn: [sftp-gcs] Unable to find/access a system host key, using the application default host key.
2022-02-23T12:03:34.412Z info: [sftp-gcs] ****************************************
2022-02-23T12:03:34.412Z info: [sftp-gcs] *** Google Cloud Storage SFTP Server ***
2022-02-23T12:03:34.412Z info: [sftp-gcs] ****************************************
2022-02-23T12:03:34.412Z info: [sftp-gcs] Using bucket: gs://sftp-cs-dev
2022-02-23T12:03:34.412Z info: [sftp-gcs] Listening on port 9022
2022-02-23T12:03:34.412Z info: [sftp-gcs] Username: test
2022-02-23T12:03:34.413Z info: [sftp-gcs] Password: ********
2022-02-23T12:03:34.413Z info: [sftp-gcs] Public key file: Not set
2022-02-23T12:03:34.413Z info: [sftp-gcs] Service account key file: gcloud-key.json
(node:1) UnhandledPromiseRejectionWarning: Error: 7 PERMISSION_DENIED: The caller does not have permission
at Object.callErrorFromStatus ([/usr/src/app/node_modules/@grpc/grpc-js/build/src/call.js:31:26](mailto:/usr/src/app/node_modules/@grpc/grpc-js/build/src/call.js:31:26))
at Object.onReceiveStatus ([/usr/src/app/node_modules/@grpc/grpc-js/build/src/client.js:180:52](mailto:/usr/src/app/node_modules/@grpc/grpc-js/build/src/client.js:180:52))
at Object.onReceiveStatus ([/usr/src/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141](mailto:/usr/src/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141))
at Object.onReceiveStatus ([/usr/src/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181](mailto:/usr/src/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181))
at [/usr/src/app/node_modules/@grpc/grpc-js/build/src/call-stream.js:182:78](mailto:/usr/src/app/node_modules/@grpc/grpc-js/build/src/call-stream.js:182:78)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Howdy my friend. At first blush, this looks like a problem with the SFTP-GCS server application (this package) not being able to read the gcloud-key.json file. I'm not a K8S hero ... so I'm going to need your help in debugging in that area. Do I understand that this file is "local" in your file system and "burnt" / "copied" into the Docker container? My first set of questions for us to examine are:
What are the Linux file permissions on that file?
What Linux userid is the demon running under within the container within K8S?
For example, if the file on the file system is defined to have permissions
-rw------- root root
That would say that only root has permissions to read the file. However, if the demon runs as a userid other than root, it would not be able to open the file and we would get the error described. This does feel like a mystery though as I have always felt that Container hosted apps run as root and that should have no permission checks. We should try an experiment by setting your gcloud-key.json to 777
chmod 777 gcloud-key.json
and re-building the container and trying again. I'm not suggesting this as the ultimate solution, but it will verify that it is as Linux file permissions issue.
If it would help, I'll make myself available for a screen share at a convenient time for both of us ... [email protected]
Hi,
Please……. I have problem with sftp-gcs, when I run it in k8s.
I've got the key for the service account in the json file which was downloaded when creating the key.
The service account has StorageAdmin role on the bucket and roles/logging-admin
Docker file is:
Yaml for k8s is:
Thank you for help
Robert
The text was updated successfully, but these errors were encountered: