Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Dataproc Agent reports failure when using initialization script

I am trying to set up a cluster with an initialization script, but I get the following error: [BAD JSON: JSON Parse error: Unexpected identifier "Google"] In the log folder the init script output log is absent. This seems rather strange as it seemed to work past week, and the error message does not seem related to the init script, but rather to the input arguments for the cluster creation. I used the following command:

gcloud beta dataproc clusters create <clustername> --bucket <bucket> --zone <zone> --master-machine-type n1-standard-1 --master-boot-disk-size 10 --num-workers 2 --worker-machine-type n1-standard-1 --worker-boot-disk-size 10 --project <projectname> --initialization-actions <gcs-uri of script>
like image 598
bjorndv Avatar asked Apr 09 '26 19:04

bjorndv


1 Answers

Apparently changing

#!/bin/sh 

to

#!/bin/bash

and removing all "sudo" occurrences did the trick.

like image 164
bjorndv Avatar answered Apr 17 '26 14:04

bjorndv