It’s quite easy to install Redmine on Debian Testing (Wheezy) with Passenger support in Apache, but there are some gotchas.
Install Redmine and Passenger module to Apache
apt-get install redmine libapache2-mod-passenger
It will automatically turn on Passenger module in Apache.
Configure virtual host:
Important note: Use Ruby 1.8 in case of Redmine with version =<1.4.4. Otherwise you’ll get 500 Error at some pages, like XML export:
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:131:in `rescue in const_missing'
If you have newer version of Redmine, then you can set PassengerRuby to new version.
It’s very pleasant situation when you reboot Linux server and it starts.
It’s very unpleasant situation when this server contains many KVM virtual servers and none of them start.
virsh list displays just this:
Id Name State
0 Domain-0 running
That’s nonsense. There was no such virtual with name Domain-0.
When you try to create domain you can see this fancy error message:
[root@server qemu]# virsh create ./virtual-01.xml
error: Failed to create domain from ./virtual-01.xml
error: internal error no HVM domain loader
What went wrong? How to fix it?
I spare you long story with server diagnostic.
The problem was that server started different kernel after reboot. In this case it was different kernel with Xen support. Centos kernel with Xen support does not have KVM support. That’s quite logical. It was sufficient to change default kernel in grub.conf to non-Xen version, restart machine and everything was working like a charm.
git clone https://github.com/ocastalabs/CouchDB-XO_Auth.git
git clone https://github.com/eproxus/meck.git
git branch 0.7.1
escript rebar compile
Now you have command couchapp and you can create boilerplate:
coachapp boiler blog
This works fine, but when you want to publish this application to CouchDB server you can see weird error:
PS C:\idea\couch\blog> couchapp push app.js http://localhost:5984/blog
Error: Cannot find module 'couchapp'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\idea\couch\blog\app.js:1:79)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
People at node.couchapp discussion suggest that you should set NODE_PATH. This path should point to the place where node stores modules. npm shows this path during installation of module.
Fix for Linux:
Node is using little bit different storage on Windows, it stores data into ~\AppData\Roaming\npm.
I’ve found several interesting issue after upgrading PHP 5.3 to PHP 5.4 on Drupal 6 and Drupal 7 sites.
The first biggest problem was that Drupal was displaying Access denied message on all web pages. It was not possible to login to system. Even http://localhost/?q=admin didn’t work.
I had to create temporary session. It is quite easy when using Drush:
Drush displayed one time session for admin. This solved the problem with admin login.
The other issue was that there was Access denied message on every page. There were also other very useful messages flooding each page:
Notice: Undefined index: access in function _menu_link_translate() …
I spent some time searching for any hint how to resolve this weird behavior. It was necessary to delete all Drupal’s caches.
Configuration -> Development -> Performance -> Delete cache
After this clean up Drupal was working correctly.
Then I checked one older Drupal 6 site and there was nice big red warning:
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.
The problem was that there was no default timezone in php.ini. It was sufficient to add timezone to /etc/php5/apache2/php.ini to section
; Defines the default timezone used by the date functions
date.timezone = "Europe/Prague"
E.g. You need to send 1000 requests in 10 concurrent threads to localhost:
ab -c 10 -n 1000 http://localhost/
For Debian users: you can find this mighty command in apache2-utils package.
Server Software: Apache-Coyote/1.1
Server Hostname: localhost
Server Port: 80
Document Path: /
Document Length: 405 bytes
Concurrency Level: 10
Time taken for tests: 0.524 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 650000 bytes
HTML transferred: 405000 bytes
Requests per second: 1907.13 [#/sec] (mean)
Time per request: 5.243 [ms] (mean)
Time per request: 0.524 [ms] (mean, across all concurrent requests)
Transfer rate: 1210.58 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 0.5 2 4
Processing: 0 3 0.5 3 4
Waiting: 0 2 0.7 2 4
Total: 2 5 0.3 5 8