Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Timeout on apply.yml up --build #6

Open
sdoan99 opened this issue Feb 10, 2021 · 3 comments
Open

Error Timeout on apply.yml up --build #6

sdoan99 opened this issue Feb 10, 2021 · 3 comments

Comments

@sdoan99
Copy link

sdoan99 commented Feb 10, 2021

Thanks for putting the docker/terraform and guide together. Its great to have everything packaged into containers and auto created through a few scripts. Kill switch is nice too haha.

Tried to install jellyfin on aws but couldnt get the server past the firewall or appear on the site really.
This is also first time working with docker/tf. Ran into an error here

The docker-compose -f docker-compose.terraform.apply.yml up --build is getting timed out when trying to build aws_instance.jellyfin_server

spits out an i/o timeout then sends an error

[ec2-user@ip-172-31-18-5 instant-jellyfin]$ docker-compose -f docker-compose.ter                                                                                                                                                             raform.apply.yml up --build
Building with native build. Learn about native build in Compose here: https://do                                                                                                                                                             cs.docker.com/go/compose-native-build/
Building terraform
Sending build context to Docker daemon  158.3MB

Step 1/2 : FROM hashicorp/terraform:0.12.23
 ---> 04c08ada2f77
Step 2/2 : WORKDIR /instant-jellyfin
 ---> Using cache
 ---> c00c14394294
Successfully built c00c14394294
Successfully tagged instant-jellyfin_terraform:latest
Recreating instant-jellyfin_terraform_1 ... done
Attaching to instant-jellyfin_terraform_1
terraform_1  | aws_vpc.jellyfin_vpc: Creating...
terraform_1  | aws_key_pair.jellyfin_keys: Creating...
terraform_1  | aws_s3_bucket.jellyfin_backup: Creating...
terraform_1  | aws_iam_role.jellyfin_server_role: Creating...
terraform_1  | aws_s3_bucket.jellyfin_media: Creating...
terraform_1  | aws_key_pair.jellyfin_keys: Creation complete after 0s [id=jellyf                                                                                                                                                             in-key]
terraform_1  | aws_iam_role.jellyfin_server_role: Creation complete after 1s [id                                                                                                                                                             =jfenv1-jellyfin-server-role]
terraform_1  | aws_iam_instance_profile.jellyfin_instance_profile: Creating...
terraform_1  | aws_vpc.jellyfin_vpc: Creation complete after 1s [id=vpc-096f66ef                                                                                                                                                             d917d3c6c]
terraform_1  | aws_subnet.jellyfin_a: Creating...
terraform_1  | aws_lb_target_group.jellyfin_tg: Creating...
terraform_1  | aws_security_group.jellyfin_alb_sg: Creating...
terraform_1  | aws_internet_gateway.jellyfin_igw: Creating...
terraform_1  | aws_subnet.jellyfin_b: Creating...
terraform_1  | aws_s3_bucket.jellyfin_media: Creation complete after 2s [id=jfen                                                                                                                                                             v1-jellyfin-media]
terraform_1  | aws_s3_bucket.jellyfin_backup: Creation complete after 2s [id=jfe                                                                                                                                                             nv1-jellyfin-backup]
terraform_1  | aws_iam_role_policy.jellyfin_server_policy: Creating...
terraform_1  | aws_lb_target_group.jellyfin_tg: Creation complete after 1s [id=a                                                                                                                                                             rn:aws:elasticloadbalancing:us-west-2:616136446079:targetgroup/jfenv1-jellyfin-t                                                                                                                                                             g/ef3473ed012f446e]
terraform_1  | aws_iam_instance_profile.jellyfin_instance_profile: Creation comp                                                                                                                                                             lete after 1s [id=jfenv1-jellyfin-instance-profile]
terraform_1  | aws_internet_gateway.jellyfin_igw: Creation complete after 1s [id                                                                                                                                                             =igw-00b3f4ccc8e4cbcf2]
terraform_1  | aws_default_route_table.jellyfin_route: Creating...
terraform_1  | aws_subnet.jellyfin_b: Creation complete after 1s [id=subnet-0ab4                                                                                                                                                             b3f4dee2f5412]
terraform_1  | aws_subnet.jellyfin_a: Creation complete after 1s [id=subnet-0843                                                                                                                                                             c36690b173a4f]
terraform_1  | aws_default_route_table.jellyfin_route: Creation complete after 0                                                                                                                                                             s [id=rtb-02b32f2a078796381]
terraform_1  | aws_iam_role_policy.jellyfin_server_policy: Creation complete aft                                                                                                                                                             er 0s [id=jfenv1-jellyfin-server-role:jfenv1-jellyfin-server-policy]
terraform_1  | aws_security_group.jellyfin_alb_sg: Creation complete after 2s [i                                                                                                                                                             d=sg-0dd2239171a562963]
terraform_1  | aws_lb.jellyfin_alb: Creating...
terraform_1  | aws_security_group.jellyfin_server_sg: Creating...
terraform_1  | aws_security_group.jellyfin_server_sg: Creation complete after 1s                                                                                                                                                              [id=sg-06d9d0e4d8540cc8c]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [10s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [20s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [30s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [40s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [50s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [1m0s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [1m10s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [1m20s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [1m30s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [1m40s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [1m50s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Still creating... [2m0s elapsed]
terraform_1  | aws_lb.jellyfin_alb: Creation complete after 2m1s [id=arn:aws:ela                                                                                                                                                             sticloadbalancing:us-west-2:616136446079:loadbalancer/app/jfenv1-jellyfin-alb/4e                                                                                                                                                             8f9264bbda4534]
terraform_1  | aws_lb_listener.jellyfin_http_no_ssl[0]: Creating...
terraform_1  | aws_instance.jellyfin_server: Creating...
terraform_1  | aws_lb_listener.jellyfin_http_no_ssl[0]: Creation complete after                                                                                                                                                              0s [id=arn:aws:elasticloadbalancing:us-west-2:616136446079:listener/app/jfenv1-j                                                                                                                                                             ellyfin-alb/4e8f9264bbda4534/69c7a036274bd1ae]
terraform_1  | aws_instance.jellyfin_server: Still creating... [10s elapsed]
terraform_1  | aws_instance.jellyfin_server: Still creating... [20s elapsed]
terraform_1  | aws_instance.jellyfin_server: Still creating... [30s elapsed]
terraform_1  | aws_instance.jellyfin_server: Provisioning with 'remote-exec'...
terraform_1  | aws_instance.jellyfin_server (remote-exec): Connecting to remote                                                                                                                                                              host via SSH...
terraform_1  | aws_instance.jellyfin_server (remote-exec): Connecting to remote host via SSH...
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Host: 54.191.141.95
terraform_1  | aws_instance.jellyfin_server (remote-exec):   User: ec2-user
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Password: false
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Private key: true
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Certificate: false
terraform_1  | aws_instance.jellyfin_server (remote-exec):   SSH Agent: false
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Checking Host Key: false
terraform_1  | aws_instance.jellyfin_server: Still creating... [4m40s elapsed]
terraform_1  | aws_instance.jellyfin_server: Still creating... [4m50s elapsed]
terraform_1  | aws_instance.jellyfin_server: Still creating... [5m0s elapsed]
terraform_1  | aws_instance.jellyfin_server: Still creating... [5m10s elapsed]
terraform_1  | aws_instance.jellyfin_server (remote-exec): Connecting to remote host via SSH...
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Host: 54.191.141.95
terraform_1  | aws_instance.jellyfin_server (remote-exec):   User: ec2-user
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Password: false
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Private key: true
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Certificate: false
terraform_1  | aws_instance.jellyfin_server (remote-exec):   SSH Agent: false
terraform_1  | aws_instance.jellyfin_server (remote-exec):   Checking Host Key: false
terraform_1  | aws_instance.jellyfin_server: Still creating... [5m20s elapsed]
terraform_1  | aws_instance.jellyfin_server: Still creating... [5m30s elapsed]
terraform_1  |
terraform_1  |
terraform_1  | Error: timeout - last error: dial tcp 54.191.141.95:22: i/o timeout
terraform_1  |
terraform_1  |
instant-jellyfin_terraform_1 exited with code 1

@sdoan99 sdoan99 closed this as completed Feb 10, 2021
@sdoan99 sdoan99 reopened this Feb 10, 2021
@sdoan99 sdoan99 closed this as completed Feb 11, 2021
@sdoan99 sdoan99 reopened this Feb 12, 2021
@sdoan99 sdoan99 changed the title Failed to execute script docker-compose Timeout on apply.yml up --build Feb 12, 2021
@sdoan99 sdoan99 changed the title Timeout on apply.yml up --build Error Timeout on apply.yml up --build Feb 12, 2021
@sdoan99
Copy link
Author

sdoan99 commented Feb 18, 2021

hashicorp/terraform#17444

Similar to this terraform issue above.

Have verified that it is not a security group error as ssh incoming traffic is enabled for inbound.

Going to have to dig into terraform or some of the partial config details in the plans

@sdoan99
Copy link
Author

sdoan99 commented Feb 18, 2021

@jdtriska
Copy link
Owner

Hey @sdoan99, thanks for reporting this, I haven't tried deploying in a bit, so I'm not sure exactly what the issue could be. I'll try and see if I can reproduce. My first instinct would indeed be a username or credential issue, since I've had timeouts happen because of that before. Just to verify, you followed the instructions for generating SSH keys prior to building, planning, and applying?

Regarding the link you posted, I'm fairly certain the username is correct for the AMI this project uses (had to experiment with that when building the scripts). It's possible something's changed on the AWS side, but I'll need to take a look. Please feel free to post additional details or updates if you figured out what's going on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants