This message was deleted.
# ask-for-help
s
This message was deleted.
n
@Benjamin Tan if you can help me again with this, it would be much appreciated 🙏
b
what's in
provisioner "local-exec"
?
n
resource "aws_instance" "app_server" {
launch_template {
id = aws_launch_template.lt.id
}
provisioner "local-exec" {
command = <<-EOT
attempt_counter=0
max_attempts=80
printf 'waiting for server to start'
until $(curl --output /dev/null --silent --head --fail http://${self.public_ip}); do
if [ $attempt_counter -eq $max_attempts ];then
echo "Max attempts reached"
exit 1
fi
printf '.'
attempt_counter=$(($attempt_counter+1))
sleep 15
done
EOT
}
}
It's a script constantly checks if the instance has been launched and the service is working
b
Oh
So that's what's causing it
n
Yes, and the instance is launched and becomes active but the service fails to start
b
it's giving up after 80 tries when it cannot curl the public IP
n
And it's weird because it runs locally with docker
b
can u verify that
Copy code
http://${self.public_ip})
is accessible? do you need to specify a port? (like
3000
or whatever)
i'm not too sure about AWS + Terraform but what if u leave out the
curl
command in the first place? will the service still start?
n
The thing is that it was working before like this
b
this is on Kubernetes?
n
Copy code
http://${self.public_ip})
is accessible but the service is not running
b
got it
I'll try to get logs into the runners / api servers to see if there's any obvious errors
n
I'm using bentoctl
Where can i check the runner logs?
b
hmm. are the EC2 instances already spun up?
you can probably log into the EC2 console and check
n
Ok, just started the whole build process again and ended up with the same result.. The instance is created and running but the service fails to start
I connected to the instance
Done, just found the logs and it says
error processing tar file: write .....: no space left on device
Now i need to find out how to change the deployment_config to launch the instance with a bigger volume
b
awesome! at least you found the problem
n
Do you know if there's any configuration option that defines the volume size before running bentoctl apply?
Or do i have to modify the terraform script to create one?
b
Most likely in terraform
n
Done, fixed it
Thank you so much again for helping! 🙏
❤️ 1
b
Woot. What was it
n
The problem was the volume size. We were missing 3gb on the new instance and i had to play with the terraform files
But i learned how to check the log files now on the new instance at least, haha 😂 thank you!
b
Lol an important skill!
😆 1