Capifony fails warming the cache - deployment

Yesterday I made my 40th or 50th deployment of a Symfony2 system on a server. Everything fine so far. Today I get a nasty error. This is what happens:
* executing `symfony:cache:warmup'
* executing "cd /NFS2/oa_sf2/releases/20111214182506 && php app/console cache:warmup --env=prod"
servers: ["151.1.111.19"]
[151.1.111.19] executing command
** [out :: 151.1.111.19] Warming up the cache
** [out :: 151.1.111.19]
** [out :: 151.1.111.19]
** [out :: 151.1.111.19]
** [out :: 151.1.111.19] [RuntimeException]
** [out :: 151.1.111.19] Error creating output file.
** [out :: 151.1.111.19]
** [out :: 151.1.111.19]
** [out :: 151.1.111.19]
** [out :: 151.1.111.19] cache:warmup
** [out :: 151.1.111.19]
** [out :: 151.1.111.19]
command finished
*** [deploy:update_code] rolling back
No chance for further investigation into the cache folder because the whole code tree gets removed on rollback
We know Capistrano features some way to disable the rollback but still we'd like to try understanding with no access on remote server - it must be something on our side, since yesterday it was all OK
No change was made on the deployment user's read/write/execute rights
Please any suggestion on how to bring investigation forward?
Thanks a lot.
p.s. no similar question on Stacktrace addresses this peculiar issue.

I think it's not really a Capifony related question. In the end it only runs the Symfony command.
First try running cache:warmup task manually on the server.
It might be a permissions problem. Check what are the rights to the cache directory just before the warmup. You can do that by overwriting the task (just copy it and run ls -l on the cache directory before running an actual command).
You don't have to deploy every time to see what's wrong. Run cache:warmup command itself:
cap symfony:cache:warmup
I greped Symfony 2.0.7 sources and the assetic's YUI compressor is the only place where such exception is thrown (see link). This suggests it's a problem related to compressing your assets with assetic. Might be you added this feature recently and don't have java installed on the server.

Disk full? Maybe it gets full once it tries to warmup the cache.

The cache warming is a symfony task AFAIU, it can be inspected through XDebug or its profiler.

Related

Tests for libffi fail on LFS

I am working on a Linux From Scratch project and I've run into some (potential) issues. In chapter 6.49: Libffi-3.2.1, I executed the "sed", "configure" and "make" commands successfully but when I executed "make check", it appears that every test fails:
MAKE x86_64-unknown-linux-gnu : 0 * check
...stuff...
Test run by root on Fri Jul 13 23:51:21 2018
Native configuration is x86_64-unknown-linux-gnu
=== libffi tests ===
Schedule of variations:
unix
Running target unix
...a lot of failures...
FAIL: libffi.call/va_struct3.c -W -Wall -Wno-psabi -Os (test for excess errors)
FAIL: libffi.call/va_struct3.c -W -Wall -Wno-psabi -O2 -fomit-frame-pointer (test for excess errors)
=== libffi Summary ===
# of unexpected failures 685
# of unresolved testcases 685
I've been following the book pretty closely, but maybe I missed something along the way. Should I even worry about this or should I just install it anyway and move on?
Let me know if more information is needed.
Nevermind, I solved it. I basically went back and redid everything.
I usually I copy and paste the commands from the LFS book into a bash script and run it that way (if I can get a away with it). Well, apparently I forgot to write one for the diffutils package. But this seems strange to me because I wouldn't think that missing that script would cause issues with a test that seems to use DejaGNU let alone get me that far without any troubles.
Anyway, my LFS is up and running now! šŸ˜

How to debug program compilation when Perl module fails

I'm trying to compile Slic3r 1.2.9 (Git 65a23b) on Raspbian, and running sudo perl Build.PL --verbose fails while building the Perl module Time-HiRes-1.9754:
...
--> Working on Time::HiRes
Fetching http://www.cpan.org/authors/id/J/JH/JHI/Time-HiRes-1.9754.tar.gz ... OK
Configuring Time-HiRes-1.9754 ... FAIL
! Timed out (> 60s). Use --verbose to retry.
! Configure failed for Time-HiRes-1.9754. See /root/.cpanm/work/1520227993.988/build.log for details.
The log file shows a little more information, but I've never worked with Perl and I don't know where to start debugging:
$ tail /root/.cpanm/work/1520234788.2186/build.log
Looking for clock_getres()... found.
Looking for clock_nanosleep()... found.
Looking for clock()... found.
Looking for working futimens()... found.
Looking for working utimensat()... found.
You seem to have subsecond timestamp setting.
Looking for stat() subsecond timestamps...
Trying struct stat st_atimespec.tv_nsec...-> FAIL Timed out (> 60s). Use --verbose to retry.
-> N/A
-> FAIL Configure failed for Time-HiRes-1.9754. See /root/.cpanm/work/1520234788.2186/build.log for details.
I've posted an issue with Slic3r on GitHub, but I haven't had any suggestions yet - presumably it's not actually a problem with Slic3r itself.
What should I do next to work out what's going wrong?

Install CLAPACK-3.2.1 in fedora 23

Hi I use fedora23 to calculate matrix.
So I am trying to install CLAPACK-3.2.1 to my computer.
In the procedure,
1. download clapack.tgz (version 3.2.1) from www.netlib.org/clapack -> done
2. cd CLAPACK-3.2.1 and cp make.inc.example make.inc -> done
3. make f2clib -> done properly
4. make blaslib -> done properly
5. make (this takes a while) -> problem starts here.
in a procedure of make, there are two errors. The error message is this.
make[2]: Leaving directory '/home/optics/CLAPACK/TESTING/EIG'
NEP: Testing Nonsymmetric Eigenvalue Problem routines
./xeigtstz < nep.in > znep.out 2>&1
/bin/sh: line 1: 9412 Segmentation fault (core dumped) ./xeigtstz < nep.in > znep.out 2>&1
Makefile:438: recipe for target 'znep.out' failed
make[1]: *** [znep.out] Error 139
make[1]: Leaving directory '/home/optics/CLAPACK/TESTING'
Makefile:44: recipe for target 'lapack_testing' failed
make: *** [lapack_testing] Error 2
==============================================================================
I cannot understand this. Please help me dealing with these errors.
I have also encountered this problem and was able to resolve it by increasing the stack size using ulimit as suggested here. The following worked for me:
$ sudo ulimit -s 100000
Followed by running make as usual. If you would like a primer on what this command does, check out this question: What does ā€œulimit -s unlimitedā€ do?. Basically, it increases the limits on the scratch space in memory allocated to a thread.
In Kubuntu 17.10 it worked in this way:
ulimit -s unlimited

Sailsjs grunt .svn error during lifting

I have imported my project in svn when I did a checkout and ran the app I got this error I am using sailsjs-0.10.5. I think it is to do with the grunt I am not able to find any solution it works fine in mac not in linux I set the permissin to 0777 even though it is not working here is the error.
verbose: Grunt :: Loading "Gruntfile.js" tasks...
verbose: Grunt :: ERROR
verbose: Grunt :: >> TypeError: Property '.svn' of object # is not a function
verbose: Grunt :: Warning: Task "default" not found.
error: ** Grunt :: An error occurred. **
error:
Aborted due to warnings.
Loading "Gruntfile.js" tasks...ERROR
TypeError: Property '.svn' of object # is not a function
Warning: Task "default" not found.
error: Looks like a Grunt error occurred--
error: Please fix it, then restart Sails to continue running tasks (e.g. watching for changes in assets)
error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the .tmp directory?
error: e.g., /var/hosts/chating_room/.tmp ?
error:
error: If you think this might be the case, try running:
error: sudo chown -R YOUR_COMPUTER_USER_NAME /var/hosts/chating_room/.tmp
Make changes to Gruntfile.js, find loadTasks function, add excludeDirs : /^\.(git|svn)$/:
Original:
function loadTasks(relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/
}) || {};
}
After:
function loadTasks(relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/,
excludeDirs : /^\.(git|svn)$/
}) || {};
}
I have a same problem.
FIXED by
Simply deleting .svn folder from
1) task/.svn,
2) config/.svn &
3) register/.svn

Capistrano error/warning when not using sudo

When I run deploy:setup and deploy:update I see embedded in the output (in multiple places)
*** [err :: domain.com] sudo
*** [err :: domain.com] :
*** [err :: domain.com] no tty present and no askpass program specified
*** [err :: domain.com]
Yet, everything deploys fine since I have :use_sudo, false.
What's wrong?
I had a similar message with :use_sudo, true. The solution was to add this to ~/.caprc:
default_run_options[:pty] = true
(Alternatively you can insert in the Capfile or config/deploy.rb)
It's not obvious why you're seeing the message, but I would hope the above technique would at least stop those messages appearing for you.