11. May 2013

Plone Error: There is a version conflict. We already have: distribute 0.6.38

I was trying to update one very old instance of Plone configured by buildout. Result of running ./bin/buildout was this error message:

  Loading extensions.
Error: There is a version conflict.
We already have: distribute 0.6.38

There was distribute package installed on system which caused conflict. The solution was to remove the package:

apt-get remove --purge python-zc.buildout

That leads to another error message that buildout script is outdated. Correction:

curl -O http://downloads.buildout.org/2/bootstrap.py
python bootstrap.py

There was another error after using latest version of buildout:

  Getting section instance.
  Initializing section instance.
  Installing recipe plone.recipe.zope2instance.
Error: There is a version conflict.
We already have: zope.interface 3.6.1

Solution was same as before. Just remove zope.interface package from system:

apt-get remove --purge python-zope.interface

After this small fix it was possible to run buildout without any problem.

Update: I encountered this issue again. This time it was necessary to delete develop-eggs directory and restart buildout again.

31. January 2013

Redmine installation on Debian with Passenger

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:

DocumentRoot /usr/share/redmine/public

<Directory /usr/share/redmine/public>
 AllowOverride all
 RailsBaseURI /
 #RailsEnv development
 RailsEnv production
 Options -MultiViews
<IfModule mod_passenger.c>
 PassengerRuby /usr/bin/ruby1.8
 PassengerEnabled On
 PassengerLogLevel 0
 PassengerUserSwitching off
 PassengerUseGlobalQueue on
 PassengerResolveSymlinksInDocumentRoot on

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'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:120:in `const_missing'

If you have newer version of Redmine, then you can set PassengerRuby to new version. 😉

21. December 2012

Debian – mdadm upgrade – dev: unbound variable

New version of mdadm for RAID management requires newer version of bash (4.2-4).

If you have older bash then you may encounter following fancy error during upgrade of mdadm and kernel:

/usr/share/initramfs-tools/hooks/mdadm: line 187: dev: unbound variable
E: /usr/share/initramfs-tools/hooks/mdadm failed with return 1.

Solution: just upgrade bash

apt-get install bash

4. November 2012

Unable to build CouchDB-XO_Auth – solution

CouchDB-XO_Auth is using make and rebar to build extension for CouchDB.

If you’re using debian package for CouchDB, then you’ll probably see following error after typing make:

==> meck (get-deps)
==> CouchDB-XO_Auth (get-deps)
==> meck (compile)
==> CouchDB-XO_Auth (compile)
src/xo_auth_fb.erl:4: can't find include lib "couch/include/couch_db.hrl"
src/xo_auth.erl:11: can't find include lib "couch/include/couch_db.hrl"

The problem is in rebar configuration. It trying to locate CouchDB Erlang files in /usr/local/lib/couchdb/erlang/lib/.

Default location of these files for Debian is: /usr/lib/couchdb/erlang/lib/
Solution: fix path rebar.config.

It should look like this:

%%-*- mode: erlang -*-
{deps, [
 {meck, "0.7.1", {git, "https://github.com/eproxus/meck.git", {tag, "0.7.1"}}}

Windows version how-to (manual steps):

git clone https://github.com/ocastalabs/CouchDB-XO_Auth.git
cd CouchDB-XO_Auth
mkdir deps
cd deps
git clone https://github.com/eproxus/meck.git
cd meck
git branch 0.7.1
cd ..
cd ..
escript rebar compile

10. March 2012

Tomcat 7 listen on port 80 – Linux Debian

The default installation of Tomcat 7 for Linux Debian is listening on port 8080.

When you want to change the port to 80 then you have several options.

You can use iptables and redirect communication from port 8080 to port 80.

iptables -t nat -P PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-port 8080

The more straight forward approach is to bind Tomcat directly to port 80. First of all change port 8080 to 80 in file /etc/tomcat7/server.xml.

You’ll see error messages in /var/log/tomcat7/catalina.out when you try to restart Tomcat:

SEVERE: Failed to initialize connector [Connector[HTTP/1.1-80]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-80]]
Caused by: java.net.BindException: Permission denied

The problem is that default installation of Tomcat 7 for Linux Debian allows to bind only ports higher than 1023. You need to allow binding to privileged ports.

Open file /etc/defaults/tomcat7 and change option from:




Restart Tomcat and it will listen on port 80.

  • Quick search

  • Links

  • Twitter

    Follow @jurajmichalek on twitter.

  • Comments

  • Tags

  • Topics