Skip to content

Ubuntu 20.04 Codedeploy v1.1.2 #264

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

Closed
RichardCorcoran opened this issue Aug 10, 2020 · 8 comments
Closed

Ubuntu 20.04 Codedeploy v1.1.2 #264

RichardCorcoran opened this issue Aug 10, 2020 · 8 comments
Labels

Comments

@RichardCorcoran
Copy link

RichardCorcoran commented Aug 10, 2020

Codedeploy-agent v1.1.2 claims to support Ubuntu 20.04, however when trying to install it on a fresh install of Ubuntu 20.04 the same error as with previous versions occurs.
This error is:
$ sudo ./install
Traceback (most recent call last):
8: from ./install:34:in <main>' 7: from ./install:34:in new'
6: from /usr/lib/ruby/2.7.0/logger.rb:389:in initialize' 5: from /usr/lib/ruby/2.7.0/logger.rb:389:in new'
4: from /usr/lib/ruby/2.7.0/logger/log_device.rb:18:in initialize' 3: from /usr/lib/ruby/2.7.0/logger/log_device.rb:83:in set_dev'
2: from ./install:22:in method_missing' 1: from ./install:22:in map'
./install:23:in block in method_missing': undefined method path' for #<IO:> (NoMethodError)

@brndnblck
Copy link
Contributor

Thank you for the report @RichardCorcoran. Our own internal integration tests for Ubuntu 20.04 didn't run into this issue, but we've seen a few similar reports and we'd like to investigate more.

Can you share with us:

  • Relevant information about your Ruby 2.7 installation? (eg. Is it the system ruby and contents of ruby -v)
  • What steps can we take to reproduce the issue?

@luiszimmermann
Copy link

This happens with me in Ubuntu 20.04,

  • Launch instance with the Ubuntu Server 20.04 LTS (HVM), SSD Volume Type - ami-083aa2af86ff2bd11 (sa-east-1)
  • apt update & apt full-upgrade
  • apt install ruby
    • ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
  • wget https://aws-codedeploy-sa-east-1.s3.amazonaws.com/latest/install
  • chmod +x
  • ./install auto output:
Traceback (most recent call last):
	8: from ./install:34:in `<main>'
	7: from ./install:34:in `new'
	6: from /usr/lib/ruby/2.7.0/logger.rb:389:in `initialize'
	5: from /usr/lib/ruby/2.7.0/logger.rb:389:in `new'
	4: from /usr/lib/ruby/2.7.0/logger/log_device.rb:18:in `initialize'
	3: from /usr/lib/ruby/2.7.0/logger/log_device.rb:83:in `set_dev'
	2: from ./install:22:in `method_missing'
	1: from ./install:22:in `map'
./install:23:in `block in method_missing': undefined method `path' for #<IO:<STDOUT>> (NoMethodError)

@luiszimmermann
Copy link

Tried with ruby 2.7.1 (installed with rbenv) ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux], same error.

@luiszimmermann
Copy link

Removing the usage of Proxy in line 34 made the script to work, but the output only goes to the tmp file and not in the terminal. At least the installation works.

@log = Logger.new(File.open(log_file_path, 'a+'))

@paulthorburn
Copy link

paulthorburn commented Aug 25, 2020

I had submitted and a bug with the same issue, my fault for not providing more detail in it but i get the same error as Luis on Ubuntu 20.04. I used https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html as a reference but it has not been updated for 20.04 yet. I was able to install CodeDepoly with dpkg which seems to work.

Broken:
sudo apt-get install ruby

ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

wget https://aws-codedeploy-us-west-2.s3.us-west-2.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto

Traceback (most recent call last):
	8: from ./install:34:in `<main>'
	7: from ./install:34:in `new'
	6: from /usr/lib/ruby/2.7.0/logger.rb:389:in `initialize'
	5: from /usr/lib/ruby/2.7.0/logger.rb:389:in `new'
	4: from /usr/lib/ruby/2.7.0/logger/log_device.rb:18:in `initialize'
	3: from /usr/lib/ruby/2.7.0/logger/log_device.rb:83:in `set_dev'
	2: from ./install:22:in `method_missing'
	1: from ./install:22:in `map'
./install:23:in `block in method_missing': undefined method `path' for #<IO:<STDOUT>> (NoMethodError)

Working:
apt-get update
apt-get install -y ruby
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/releases/codedeploy-agent_1.2.0-1866_all.deb
dpkg -i codedeploy-agent_1.2.0-1866_all.deb
systemctl start codedeploy-agent
systemctl enable codedeploy-agent

@philstrong
Copy link
Contributor

Working on a fix, should be part of next release of the agent

@philstrong
Copy link
Contributor

Issue is fixed in 1.3.2

diodonfrost added a commit to diodonfrost/ansible-role-amazon-codedeploy that referenced this issue May 24, 2021
Codedeploy agent can now be installed in
a ubuntu 20.04 container.

This commit adds github-ci workflow with
Ubuntu 20.04

aws/aws-codedeploy-agent#264 (comment)
@nbro10
Copy link

nbro10 commented Dec 14, 2023

@philstrong Is this really fixed? Because the documentation here still says

Writing the output to a temporary log file is a workaround that should be used while we address a known bug with the install script on Ubuntu Server 20.04.

So, do I still need to use sudo ./install auto > /tmp/logfile instead of sudo ./install auto

Can someone update the documentation if this is fixed?

This problem is also mentioned in this SO post

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

No branches or pull requests

6 participants