Comments (16)
@jhadvig can you provide more details around how did you achieve that, because by default openshift/ruby-20-centos7 does not provide save-artifacts
which is required to perform incremental build. If you built your own, can you please share? The error:
Error reading next tar header: io: read/write on closed pipe
Error saving previous build artifacts: timeout waiting for tar stream
indicates your save-artifacts
script did not streamed tar contents into stdout.
Could you also describe all the steps you did to get to this point?
from source-to-image.
I'm having similar issue. But looks like it actually works for me at least.
Our save-artifacts script
Sti log
Looks like incremental build does work but it throws some weird errors for some reason. At least when I run it without incremental it does bundle installation from the beginning while in this case it used previous bundle.
Is there a way to easy debug what happens during save-artifacts stage? It seems like it's impossible to insert any extra logs there as output is piped directly into tar.
from source-to-image.
if your save-artifacts script outputs to stderr that ought to get displayed and not piped into the tar, so you could try that.
from source-to-image.
@Maxim-Filimonov thx for your comment, this line from the log worries me:
E0514 21:56:35.199285 12608 tar.go:192] Error creating file /var/folders/tb/0b6sc_rs2m112jvm89ft3hl80000gn/T/sti721578848/upload/artifacts/bundle/ruby/2.1.0/gems/builder-3.2.2/doc/releases/builder-2.1.1.rdoc: open /var/folders/tb/0b6sc_rs2m112jvm89ft3hl80000gn/T/sti721578848/upload/artifacts/bundle/ruby/2.1.0/gems/builder-3.2.2/doc/releases/builder-2.1.1.rdoc: too many open files
You're hitting too many open files
limit. Can I ask you to verify 2 things:
- Your open files limit
ulimit -n
- The number of files that
save-artifacts
puts into tar
Based on that answer I'll be able to diagnose the problem better.
from source-to-image.
@soltysh Not sure which one applies i'll give you all 3
# inside container
ulimit -n
524288
# On Mac OS X
ulimit -n
2560
# On host vagrant machine (docker host)
ulimit -n
1024
find bundle -type f | wc -l
2552
Not saving assets yet only bundle. Need to fix this error first.
from source-to-image.
@Maxim-Filimonov thanks, you've perfectly shown me what I was suspecting, we're relying on Go's defer
in here instead of manually closing those files. Will fix that.
from source-to-image.
@soltysh looks like i was wrong about stderr, we should be capturing stderr and echoing it out (along with capturing stdout into the tar file) so there's a way to debug a save artifacts script.
from source-to-image.
@soltysh yeah I have just realised that it is causing problems downline as gems are not properly untarred and app cannot run anymore.
Can you think of a possible workaround?
from source-to-image.
@Maxim-Filimonov I'm currently working on a fix for that, I'll have a PR ready in some time.
from source-to-image.
@Maxim-Filimonov can you try with the latest STI? we'll get a mac release out momentarily.
from source-to-image.
@Maxim-Filimonov osx+windows releases are available now as well (See the v0.5.1 release)
from source-to-image.
@bparees getting new error now - cp: error writing '/root/src/data/dump/local.1': No space left on device
from source-to-image.
@bparees actually ditch this i was running it from wrong folder. it works now 👍
from source-to-image.
great! closing.
from source-to-image.
I'm still seeing this on latest version of STI. Though more often it fails with a random filename rather than just the next tar header. Ex:
Error extracting file bundle/ruby/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/attr.rb: io: read/write on closed pipe
If I catch it, I can stop the build and run a new one and it will usually work the next time. I have increased both the ulimit and fs hard limits, which didn't seem to make a noticeable difference. Disk space and RAM are also plentiful.
OS is deployed on CentOS 7 official cloud image (via OpenStack). Single node.
Any suggestions?
from source-to-image.
Can you please open this as a new issue and give full recreate steps? are you performing an incremental build? full logs with --loglevel=5 would also be useful.
from source-to-image.
Related Issues (20)
- latest release doesn't work anymore HOT 5
- Issue with multi stage builds HOT 11
- using assemble script on the runtime image during s2i build with --runtime-image instead of assemble-runtime script HOT 4
- Docker dep ? HOT 1
- s2i build, regression with 1.3.2 HOT 12
- Build s2i releases for AArch64 HOT 2
- The `--exclude` flag is not used in `--as-dockerfile` mode. HOT 1
- could not inspect the builder image for labels: choosing image instance: no image found in manifest list for architecture amd64, variant "", OS darwin HOT 1
- Image building problems - docker authentification - Mac OS - Docker desktop HOT 6
- Is it possible to use podman for s2i build? HOT 3
- s2i build command always uses 'latest' tag
- s2i build --as-dockerfile not using local .s2i/[assemble, run] when builder image present HOT 4
- ERROR: --runtime-image cannot be used with --as-dockerfile HOT 3
- pull policy "if-not-present" yet still querying remote registry HOT 11
- docker client api version 1.43 is "too new", can s2i support talking older dialects? HOT 5
- Unable to use s2i using Amazon EC2 Linux 2023 HOT 8
- Any usage of s2i fails with "ERROR: An error occurred: http: invalid Host header"
- Scripts under .s2i/bin detected but not changing the DockerFile configuration HOT 2
- brew-installed s2i cannot enable tab completion HOT 2
- can't seem to authenticate to my private registry using s2i build HOT 1
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 source-to-image.