Skip to content

Installation broken on Ubuntu 20.04 #239

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
autarchprinceps opened this issue Apr 6, 2020 · 24 comments
Closed

Installation broken on Ubuntu 20.04 #239

autarchprinceps opened this issue Apr 6, 2020 · 24 comments

Comments

@autarchprinceps
Copy link

Following the official guide to installing fails on Ubuntu 20.04 with the following error:
Traceback (most recent call last):
8: from /tmp/codedeploy-agent-install:33:in <main>' 7: from /tmp/codedeploy-agent-install:33: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 /tmp/codedeploy-agent-install:21:in method_missing' 1: from /tmp/codedeploy-agent-install:21:in map'
/tmp/codedeploy-agent-install:22:in block in method_missing': undefined method path' for #<IO:> (NoMethodError)

@C2L2C
Copy link

C2L2C commented Apr 27, 2020

Yup, same issue.

@Helen1987
Copy link
Contributor

CodeDeploy Agent does not support Ubuntu 20.x so far. Check our documentation. The support is in our plan

@C2L2C
Copy link

C2L2C commented Apr 28, 2020

Is there a timeline when the supported version will be released?

@cmllamosas
Copy link

@Helen1987 there are some other related (or duplicated) issues #242, #243, it will be great to give us support on this support request.

@lifeeth
Copy link

lifeeth commented May 1, 2020

A possible workaround:

  • A compatible ruby version could be installed using snap - snap install ruby --channel=2.5/stable --classic and then proceed to install using the manual instructions in the README
  • This might mess up things if you are using any other package / code that rely on system ruby
  • Gist with all the steps needed to run codedeploy agent as a systemd service https://gist.github.com/lifeeth/557722cd62eb41010807ad1a2ce6ba41

@osterik
Copy link

osterik commented May 2, 2020

worked for me: repack .deb package and add ruby 2.7 as compatible instead of outdated 2.0:

apt-get update
apt-get install -y ruby
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/releases/codedeploy-agent_1.0-1.1597_all.deb
mkdir codedeploy-agent_1.0-1.1597_ubuntu20
dpkg-deb -R codedeploy-agent_1.0-1.1597_all.deb codedeploy-agent_1.0-1.1597_ubuntu20
sed 's/2.0/2.7/' -i ./codedeploy-agent_1.0-1.1597_ubuntu20/DEBIAN/control
dpkg-deb -b codedeploy-agent_1.0-1.1597_ubuntu20
dpkg -i codedeploy-agent_1.0-1.1597_ubuntu20.deb
systemctl start codedeploy-agent
systemctl enable codedeploy-agent

tnx to @takenoko-str for this AWS CodeDeploy Agent install script (Ubuntu 18 LTS)

@cmllamosas
Copy link

@osterik that snippet works fine, thank you.

@sapphirecat
Copy link

Is there a time frame where this is expected to be resolved, or should I consider CodeDeploy to be deprecated/abandoned?

@Helen1987
Copy link
Contributor

@sapphirecat, CodeDeploy is not deprecated. We are actively working on changing our release process for the Agent. The fix will be released as soon as we switch to a new release process

@fleaz
Copy link

fleaz commented May 24, 2020

Not to sound rude but the last release is from late 2018, there where just a hand full of commits since then, the most recent Ubuntu version you support is 16.04, and angry people are pilling up in the GitHub issues because from an outside perspective this project is totally dead...

Not even your own PAID support could give me some informations on this and just gave the hint to just restart the agent every time to "resolve" the memory leak which is present since nearly 4 or 5 years now. And the only information we get from you since February is "we are working on a new release process". As a customer this is totally frustrating that a multi billion dollar company with some of the best software devs in the world is not able to maintain a little Ruby tool on which thousands of paying customers depend on in their day-to-day business.

can you give us at least a rough estimates on when the "new release process" will be finished? 16.04 will be EOL in 2024, so please don't take THAT long...

@brndnblck
Copy link
Contributor

Hi Folks. 👋

I'm the new SDM for the CodeDeploy teams at AWS and I wanted to chime in here briefly.

While we don't have any public dates we can share at the moment, we are concurrently working on several successive and very near-term releases to the CodeDeploy agent. These releases will include a litany fixes and features that many members of the community have been asking for including a resolution to this issue of Ubuntu support.

Part of the delay at the moment is that we're putting in place a better set of release and update mechanisms (as Alena mentioned). This upfront investment will pave the way for both faster and safer iterations with the agent -- allowing us to release our work as well as community contributions much quicker and more frequently.

We're also working on a plan to share a public version of the CodeDeploy roadmap with you so that our customer community can have better insight into our vision for the CodeDeploy agent and the timelines around it.

We appreciate your patience while we get all this work completed, but rest assured a lot is happening even though it isn't all visible to you yet.

@AnandarajuCS
Copy link

This issue is fixed in our latest release v1.1.2
https://aws.amazon.com/about-aws/whats-new/2020/08/aws-codedeploy-agent-improved-compatibility-amazon-linux-windows-ubuntu/

@satishvis
Copy link

The issue still persists in Ubuntu 20.04...

@fleaz
Copy link

fleaz commented Aug 21, 2020

Hey @satishvis
can you describe your problem a bit more in detail?

Because I upgraded one of our staging systems to Ubuntu 20.04 with Ruby 2.7 and version 1.1.2 of the Codedeploy agent is running fine and I already made a lot of deployments to this server without any issues.

@ydesgagn
Copy link

Same here on at least 10 fresh Ubuntu 20.04 and always working. How do you install it?

@fossterer
Copy link

fossterer commented Sep 2, 2020

@AnandarajuCS @brblck I just encountered this while setting up the install script.

Instance: Ubuntu 20.04

Ruby info:

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

Download info: wget https://aws-codedeploy-ca-central-1.s3.ca-central-1.amazonaws.com/latest/install

Result:

$ 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)

Going with the fix by @osterik for now

@developerayyo
Copy link

@AnandarajuCS @brblck I just encountered this while setting up the install script.

Instance: Ubuntu 20.04

Ruby info:

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

Download info: wget https://aws-codedeploy-ca-central-1.s3.ca-central-1.amazonaws.com/latest/install

Result:

$ 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)

Going with the fix by @osterik for now

Same here.. just experienced this too.

@ahmedyounis
Copy link

@osterik you are the man

@peillis
Copy link

peillis commented Sep 21, 2020

Same here. Why is this issue closed?

@micmich
Copy link

micmich commented Sep 24, 2020

Issue still exists.
Downloaded http://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install on 2020.09.24T16.43 and got failure as described.

@fleaz
Copy link

fleaz commented Sep 25, 2020

Okay, know you got me curious because after migrating a lot of customers to Ubuntu Focal I was really confused by the amount of people who still have bugs with this so I started digging :D

We setup all our servers with a standardized AMI which we build with Packer and Chef. One of the cookbooks is responsible for installing the latest CodeDeploy agent and this cookbook just runs fine with the latest version and we have the latest Codedeploy Agent installed afterwards.

Now the funny part: When I start the exact same base AMI by hand and try to execute the installer I get the error from the first post... 😕
Thinking about this for a while what the differences could be, I read the error message again and stumbled upon the io:STDOUT part of the errormessage. And yes, thats the only difference: Chef runs its cookbooks non-interactively, so there is no real stdout present. Therefore the easiest way to fix the installer is to redirect its output into a file, and yes this fixed the problem 🎉

Screenshot_2020-09-25_16:00:25

tl,dr: Yes this bug should still be open, but can be circumvented with an easy workaround :)

@erikcc02
Copy link

@fleaz this worked for me. Thank you!

@kksmartexchange
Copy link

thanks @fleaz

$ sudo ./install auto > /tmp/logfile - worked for me

@philstrong
Copy link
Contributor

duplicate of #264

@fleaz fleaz mentioned this issue Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests