Giter VIP home page Giter VIP logo

Comments (23)

tjkellie avatar tjkellie commented on June 12, 2024 3

I'm also hitting this issue in windows deployments. The 261 char limit is being hit in DownloadBundle and makes the deployment fail every time with applications that have nested folders or files with long names.

The problem to me is the way the agent names its bundles, I've set the :root_dir to /acd and I still frequently hit it. The path to the deployment archive temp alone is already 100+ chars. Then add in an app folder, a project folder, a sub-folder, and any semi-long filename and it blows up.

C:\acd\04e4171a-2896-47a5-b7ef-f52c2c75924f\d-5ITO4A39E\deployment-archive-temp[my Git Org]-[The Repo]-e26b23b991589db4b2e0d1683078efb18086a36d

I can't see restructuring every application repo to fit this issue.
Is there any way to specify a shorter name for the way the agent builds the default deployment path?

from aws-codedeploy-agent.

squadtechnologyinc avatar squadtechnologyinc commented on June 12, 2024 1

me too

from aws-codedeploy-agent.

jody-greene avatar jody-greene commented on June 12, 2024 1

FYI - this is not an issue with Windows. We were able to determine that the issue is with ruby-zip, which codedeploy uses. AWS CodeDeploy team has created an internal ticket, and is working the issue.

from aws-codedeploy-agent.

annamataws avatar annamataws commented on June 12, 2024 1

We are working on getting a fix out

from aws-codedeploy-agent.

iskandar avatar iskandar commented on June 12, 2024 1

For future searchers, here's a PowerShell way to make Windows Server 2016 (and probably other up-to-date Windows versions) use Long Paths:

# @see https://github.com/aws/aws-codedeploy-agent/issues/46
# @see https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#paths
Write-Verbose "----> Enabling Long Path Support"
$RegistryPath = "HKLM:SYSTEM\CurrentControlSet\Control\FileSystem"
$Name = "LongPathsEnabled"
New-ItemProperty -Path $RegistryPath -Name $Name -Value 1 -PropertyType DWORD -Force | Out-Null
# You'll want to reboot to make sure; this is Windows we're working with.
Restart-Computer

from aws-codedeploy-agent.

annamataws avatar annamataws commented on June 12, 2024 1

Hi @ajgrowney, the fix has not yet been released. We have been working on our release process so we can start releasing faster and safer, but it has paused releasing these fixes since we are building the new process.

from aws-codedeploy-agent.

suryanarayanan avatar suryanarayanan commented on June 12, 2024

Hi,
You can try changing the :root_dir value in the config file to use a shorter path instead of default and restart the agent. Please remember this means the past deployment history on this instance would be lost and you might run into 'File already exists' error if you've already deployed successfully on the instance. You might have to clean up the old files before starting afresh.
Please see Agent Configuration section for config options http://docs.aws.amazon.com/codedeploy/latest/userguide/host-cleanup.html
Thanks,
Surya.

from aws-codedeploy-agent.

balajiprasadb avatar balajiprasadb commented on June 12, 2024

I'm also facing the same problem. It would be good if CodeDeploy team takes up this issue.

from aws-codedeploy-agent.

rnhurt avatar rnhurt commented on June 12, 2024

Interestingly, it looks like Microsoft is taking care of the problem for us, though it won't affect Windows Server until the next release. :/

from aws-codedeploy-agent.

pmacpherson avatar pmacpherson commented on June 12, 2024

me too! I was looking forward to using code deploy until i ran into this issue. Having two long guid's in the file path already takes a huge amount of the file path limit. Would really really like a resolution to this!

from aws-codedeploy-agent.

wickstargazer avatar wickstargazer commented on June 12, 2024

is this issue fixed? i am having the same issues trying to deploy my system

from aws-codedeploy-agent.

trannzfsg avatar trannzfsg commented on June 12, 2024

Does anyone has any available updates or workaround on this issue? This is driving me crazy now. Greatly appreciate if anyone knows how to fix it!!

from aws-codedeploy-agent.

computerex avatar computerex commented on June 12, 2024

Any updates on this?

from aws-codedeploy-agent.

Artemy-Matvienko avatar Artemy-Matvienko commented on June 12, 2024

Still doesn't appear to be fixed.

from aws-codedeploy-agent.

brndnblck avatar brndnblck commented on June 12, 2024

Please upgrade to v1.1.2 (our latest stable version):
https://aws.amazon.com/about-aws/whats-new/2020/08/aws-codedeploy-agent-improved-compatibility-amazon-linux-windows-ubuntu/

from aws-codedeploy-agent.

chroto avatar chroto commented on June 12, 2024

I want to report I'm still seeing the issue on Windows Server 2019 on EC2 on the Install event

No such file or directory @ rb_sysopen - C:\ProgramData/Amazon/CodeDeploy/e9342b57-1568-40f9-b90a-25bd12b982a0/d-2FDUFPSC5/deployment-archive/veryverylongfilename/etcetcetc

FWIW I also went through the steps to enable longpaths in the registry for this server

from aws-codedeploy-agent.

aabrowne avatar aabrowne commented on June 12, 2024

Same error using latest version on Windows Server 2012 R2: CodeDeploy Host Agent Service v1.3.1.1880

NOTE: Windows Server 2012 R2 has a hard 260 char file name limit. However, CodeDeploy agent is adding way too many chars to the file path.

from aws-codedeploy-agent.

adavis217 avatar adavis217 commented on June 12, 2024

We also still see this error on windows 2019.

from aws-codedeploy-agent.

ifflanb avatar ifflanb commented on June 12, 2024

I am also seeing this issue on Windows Server 2022 Datacenter when using CodeDeploy at the Install event stage.
I added the registry setting for long file paths which fixed the previous issue that it was having unpacking the archive but now I get the same error at the install stage.

from aws-codedeploy-agent.

philstrong avatar philstrong commented on June 12, 2024

AFAIK, this must be enabled during the build of the agent as well. It's in our backlog to address
https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd

from aws-codedeploy-agent.

mwjones-aws avatar mwjones-aws commented on June 12, 2024

This was addressed with the 1.4.0 agent release. Docs coming soon.

from aws-codedeploy-agent.

rnhurt avatar rnhurt commented on June 12, 2024

Well, it only took 6 years but I'm glad it's getting fixed. 😁

from aws-codedeploy-agent.

t0shiii avatar t0shiii commented on June 12, 2024

Docs for supporting large paths in Windows can be found here

from aws-codedeploy-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.