Skip to content

Agent leaks sockets to AWS S3 #115

Closed
@cavaliercoder

Description

@cavaliercoder

Occasionally, the CodeDeploy Agent leaks a socket when connecting to S3 to download application bundles. This is evident via call to netstat:

$ netstat -tp4
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp       54      0 ip-172-21-67-210.:53248 s3-ap-southeast-2:https CLOSE_WAIT  4953/codedeploy-age
...

This happens on a number of our Centos 7.2.1511 x86_64 instances on AWS EC2. Package details:

$ rpm -qi codedeploy-agent
Name        : codedeploy-agent
Version     : 1.0
Release     : 1.1106
Architecture: noarch
Install Date: Wed 03 May 2017 04:30:06 AM AWST
Group       : Applications/System
Size        : 14612247
License     : Amazon.com Internal
Signature   : (none)
Source RPM  : codedeploy-agent-1.0-1.1106.src.rpm
Build Date  : Thu 13 Apr 2017 12:20:12 AM AWST
Build Host  : sds-tod-workers-2c-m4l-247fd253.us-west-2.amazon.com
Relocations : (not relocatable)
Vendor      : Amazon.com
Summary     : Provides the required files for CodeDeploy agent to run in EC2 instances
Description :
CodeDeploy instance agent is responsible for doing the actual work of deploying software
on an EC2 instance.

We had a similar issue in applications using the AWS SDK for Javascript (I understand this is written in Ruby). For reference, the issue was addressed, we think (please confirm) in v2.50.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions