Comments (23)
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.
me too
from aws-codedeploy-agent.
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.
We are working on getting a fix out
from aws-codedeploy-agent.
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.
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.
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.
I'm also facing the same problem. It would be good if CodeDeploy team takes up this issue.
from aws-codedeploy-agent.
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.
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.
is this issue fixed? i am having the same issues trying to deploy my system
from aws-codedeploy-agent.
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.
Any updates on this?
from aws-codedeploy-agent.
Still doesn't appear to be fixed.
from aws-codedeploy-agent.
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.
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.
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.
We also still see this error on windows 2019.
from aws-codedeploy-agent.
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.
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.
This was addressed with the 1.4.0 agent release. Docs coming soon.
from aws-codedeploy-agent.
Well, it only took 6 years but I'm glad it's getting fixed. 😁
from aws-codedeploy-agent.
Docs for supporting large paths in Windows can be found here
from aws-codedeploy-agent.
Related Issues (20)
- [Feature Request] macOS support
- Move After to proper systemd unit file section
- [Feature Request]Appspec.yml validation
- Error validating the SSL configuration: Invalid server certificate HOT 9
- Debian package depends on ruby version < 3.1, even though 3.1 and 3.2 is supported HOT 5
- Windows Deployment Group logs should be in the log folder
- Code deploy falling very frequently HOT 1
- CodeDeplot Access denied when calling "codedeploy-commands.eu-central-1.amazonaws.com:443" HOT 1
- [Feature Request] Debian (12 Bookworm) support HOT 1
- [problem] CodeDeploy Agent systemd service bash-completion error
- [Error] AL2023 - max_revisions - Error deleting directories HOT 3
- CodeDeploy 'Downloading failed bundle.zip from s3 bucket' at "DownloadBundle" step HOT 1
- Service is running but with errors HOT 1
- Codedeploy failing randomly at Install not finding appspec.yml
- Switch to use s3 multipart download when fetching artifacts
- DownloadBundle deployment lifecycle events for troubleshooting UnknownError: execution expired HOT 1
- Failed deployment DownloadBundle events with error "No such file or directory - getcwd" HOT 1
- Add the CodeDeploy agent to the PATH HOT 1
- CodeDeploy agent support for RHEL 9 HOT 1
- Announcement: Releasing Agent 1.7.0 to all regions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-codedeploy-agent.