Apparent VM startup script prob Google Cloud Fundamentals: Getting Started with Cloud Storage lab

I've had some problems with the Google Cloud Fundamentals: Getting Started with Cloud Storage and Cloud SQL lab (https://www.cloudskillsboost.google/paths/19/course_sessions/23739510/labs/531581).

you have to launch a default Debian GNU/Linux 12 (bookworm) instance with the following startup script included in the automation section:

 

apt-get update
apt-get install apache2 php php-mysql -y
service apache2 restart

 

No errors, everything continues fine until...

Task 5. Configure an application in a Compute Engine instance to use Cloud SQL
Upon trying the cd command via ssh I get the following error:
cd error.png
Whilst of course I can create the text file in nano and call it index.php, it's not accessible - the restart apache server command is useless given that the apache service isn't running:
apache restart error.png
So when you try to connect to the external IP address of the VM instance, well, it doesn't want to speak (no apache server running).
From the logs explorer for the VM instance I see that there has been a problem with the start-up script:
startup script failure.png

I mean, maybe I'm wrong, but this looks like a problem that's not on my end (unless copying across the script somehow modified it - tried twice, same result!)

Any thoughts, suggestions or spare credits? 😅

thanks for reading 👍

 

Solved Solved
0 4 133
1 ACCEPTED SOLUTION

Hi, DuncsMoncrieff.

As one idea is to SSH into VM and try to-reinstall Apache server manually (re-run sudo apt-get install apache ... the whole line). Then restart the server in VM....again with sudo.

Best,

MC

P.S. Apparently the start script was not executed as there is no Apache on the VM. 

View solution in original post

4 REPLIES 4
Top Labels in this Space