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

Can't execute job on created EC2 #77

Closed
afedotov-align opened this issue Oct 18, 2021 · 4 comments
Closed

Can't execute job on created EC2 #77

afedotov-align opened this issue Oct 18, 2021 · 4 comments

Comments

@afedotov-align
Copy link

Hi colleagues,

After instance creation job couldn't be run on EC2 machine.
Instances could be created and terminated in my VPC, outbound traffic is allowed on port 443 with security group.
What can be the cause and where I should start troubleshooting?

Thanks, Artem.

AWS EC2 instance i-xxxxxxxx is up and running
Waiting 30s for the AWS EC2 instance to be registered in GitHub as a new self-hosted runner
Checking every 10s if the GitHub self-hosted runner is registered
Checking...
Checking...
Checking... (x N times)
Error: GitHub self-hosted runner registration error
Error: A timeout of 5 minutes is exceeded. Your AWS EC2 instance was not able to register itself in GitHub as a new self-hosted runner.
@afedotov-align
Copy link
Author

Hi colleagues,

Some additional details:
I also tried to use runner-home-dir option. I prepared AMI based on @machulav steps in #38 (comment) but still facing the same behaviour. I also tried to set up actions-runner directory not in root folder but got the same behaviour.

I suspect something with user permissions on created EC2. When I log in on created EC2 while build hanging and trying to execute

./config.sh --url https://github.com/aligntech/sandbox --token XXX
output:
2ZK
Must not run with sudo

Please also see logs from ./_diag/Runner_20211019-122418-utc.log

[2021-10-19 12:24:19Z INFO ConfigurationManager] Is configured: False
[2021-10-19 12:24:19Z ERR  Terminal] WRITE ERROR: An error occurred: Not configured
[2021-10-19 12:24:19Z ERR  Listener] System.InvalidOperationException: Not configured
   at GitHub.Runner.Listener.Configuration.ConfigurationManager.LoadSettings()
   at GitHub.Runner.Listener.Runner.ExecuteCommand(CommandSettings command)
   at GitHub.Runner.Listener.Program.MainAsync(IHostContext context, String[] args)

Thanks, Artem.

@afedotov-align
Copy link
Author

Hello everyone,

I was finally managed to figure out the cause of the issue!

./bin/installdependencies.sh must be run while preparing AMI for build

I used centos-release-7-9.2009.1.el7.centos.x86_64.

I suppose it could be mentioned in preparation steps, because it's not really obvious. Or this step could be added to steps for client installation.

Thanks, Artem.

@Shan-KulK
Copy link

Shan-KulK commented Feb 24, 2022

I get this output when I run ./bin/installdependencies.sh:

--------OS Information--------
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
------------------------------
"centos rhel fedora"
Can't detect current OS type based on /etc/os-release.
Can't install dotnet core dependencies.
You can manually install all required dependencies based on following documentation
https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x

The instance AMI is Amazon Linux 2. Can you please explain what you mean by "I used centos-release-7-9.2009.1.el7.centos.x86_64."? Thanks!

@ouraluukas
Copy link

@Shan-KulK a bit late but did you ever get it to work? Getting the same output as you.

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

3 participants