Blog - Unity Behind Diversity

Searching for beauty in the dissonance

Tagged: howto

HOWTO: Redmine 3.0 with Debian Wheezy, Nginx, Thin

I spent a few hours troubleshooting a problem with Thin when I upgraded from Redmine 2.5 to Redmine 3.0 on a Debian Wheezy server. I found a solution that’s worked for me. I’m not confident enough with Ruby and this setup to make a HowTo on the Redmine wiki, but I found next to nothing on this specific problem when searching the web, so I figure it’s important to post this in case it helps anyone else.

I’m running Redmine on Debian Wheezy with Nginx and Thin. I’m also running Redmine on another Wheezy server with Apache (and mod_passenger, I think). The latter upgrade to Redmine 3.0 went fine, but when I ran the same steps on the thin/nginx server, I was getting a Bad Gateway 502 error from nginx and found this in the thin logs.

!! Unexpected error while processing request: uninitialized constant Rack::MethodOverride::REQUEST_METHOD

Yet, when I ran Redmine with webrick (per Redmine’s installation instructions), it worked fine. Since it worked fine with webrick and on my other server, it seemed like the problem was at the Thin layer.

This Stack Overflow issue was the closest I could find, though it was with a different Rack application. The problem was a mismatch between the Rack version and the one required by the application.

I couldn’t find Redmine-specific examples (hence this post), but this one Redmine guide did say “Rack 1.0.1. Version 1.1 is not supported with Rails 2.3.5”.

Finally, the Stack Overflow issue linked to this issue in the Passenger tracker which pointed me towards the answer:

Your system has two Rack versions installed. One is version 1.5.0, installed by APT, and is located in /usr/lib/ruby/vendor_ruby. The other one is version 1.6.0, installed by RubyGems, and is located in /var/lib/gems/2.1.0/gems/rack-1.6.0.

Before Passenger loads your app, Passenger calls require “rack”. Because /usr/lib/ruby/vendor_ruby is in Ruby’s $LOAD_PATH, Passenger loads the Rack 1.5.0 library installed by APT.

However Sinatra requires Rack 1.6.0 or later…

This was my problem. When I installed Redmine 2.5, I ran `apt-get install thin`. It pulled in ruby-rack 1.4.1 as a dependency. This “conflict” wasn’t a problem in Redmine 2.5, which has “rack (~> 1.4.5)” in Gemfile.lock — the versions are close enough. However, Redmine 3.0 has “rack (~> 1.6)” in Gemfile.lock… hence the error I was seeing, as Rack 1.4.1 installed via apt was probably being loaded in place of the 1.6.1 Gem.

I tried to `apt-get remove ruby-rack`, but it was going to remove thin as well. (And I checked the Jessie repos, but its ruby-rack is still only 1.5.2.) I identified two solutions:

  1. Uninstall ruby-rack and thin via apt, and reinstall thin separately (this worked)
  2. Create a dummy .deb using equivs to install thin via apt without really installing ruby-rack (I didn’t bother trying this, since the first solution worked)

To install thin separately, first I removed it and ruby-rack whiling marking a couple other dependencies as manually installed and keeping the /etc/init.d/thin file…

apt-get remove ruby-rack thin
apt-get install ruby-eventmachine ruby-daemons # not sure if this was necessary or advisable, just a guess

Then, following the thin installation instructions, I was able to install the gem:
apt-get install ruby-dev build-essential
gem install thin
# Update the path in /etc/init.d/thin from /usr/bin/thin (apt) to /usr/local/bin/thin (gem)
perl -pi -w -e 's/\/usr\/bin\/thin/\/usr\/local\/bin\/thin/g' /etc/init.d/thin

I was able to start thin again (`service thin start`), but I was getting a new error for which I found the solution here: add thin to your Gemfile.

So, somewhat reluctantly, I opened up Gemfile in the Redmine root directory and in between a couple other gem lines I added the line:
gem "thin"

Then, I restarted thin, and Redmine was working again!

Things I don’t like about this solution or am unsure of:

  • Editing Redmine’s Gemfile sucks, because I’ll lose that change on every update and I’ll have to re-apply it. Since it’s a simple one-liner and updates are every few months, it works for me for now.
  • I don’t know yet whether those other apt thin dependencies are required or might cause other conflicts in the future… but since it’s working now, and I’m not familiar with Ruby, I don’t feel like spending more time to experiment and find out.
  • Maybe I should have looked at other options beside thin, like Puma or Passenger? But since I already had Thin working before, I just decided to see if I could salvage it rather than exploring alternatives. Maybe thin isn’t the best option in this circumstance though, but it’s working.
  • I’m assuming that /etc/init.d/thin was there and working because it was leftover from the apt thin installation (and because I didn’t `apt-get purge`). That may have been lucky that the init script happens to work (as far as I can tell for now) with the thin gem…

Hopefully this can help anyone else using Redmine(3.0)/Debian/Nginx/Thin seeing that error. I’d be happy to share configuration and fresh installation instructions once I have some confidence that this approach is sane, and in particular once I have a better solution than modifying the Gemfile.

I spent a few hours troubleshooting a problem with Thin when I upgraded from Redmine 2.5 to Redmine 3.0 on a Debian Wheezy server. I found a solution that’s worked…

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (1)

SOLUTION: gPodder 2.20.3 on N900: database disk image malformed

After some strange behaviour in gPodder 2.20.3 yesterday on my N900 (not responding to episode actions), I quit gPodder and tried to start it up again, but it would crash during startup everytime with an error about “database disk image malformed” from line 316 of dbsqlite.py on the query: “SELECT COUNT(*), state, played FROM episodes GROUP BY state, played”.

First, I opened up the sqlite database directly:
sqlite3 ~/.config/gpodder/database.sqlite

I could run that query and others no problem.

However, I found this guide on repairing a corrupt sqlite database, I ran the following integrity check command and it returned a couple errors along with the “database disk image malformed” message:
sqlite> pragma integrity_check;

So I followed the instructions from spiceworks, dumped my database to file and reloaded it into a new database:
cd ~/.config/gpodder/
echo .dump | sqlite3 database.sqlite > gpodder.sql # generate dump file
mv database.sqlite database.sqlite.bak # backup original database
sqlite3 -init gpodder.sql database.sqlite # initialize a new database from the dump file

And, voila, gPodder is working again.

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Post a Comment

Watch Movie Kong: Skull Island (2017)


Quality : HD
Title : Kong: Skull Island
Release : 2017-03-08
Genre : Science Fiction, Action, Adventure, Fantasy min.
Stars : Tom Hiddleston, Brie Larson, Samuel L. Jackson, John C. Reilly, Terry Notary, Corey Hawkins, Jason Mitchell, John Goodman, Thomas Mann, Shea Whigham, John Ortiz, Toby Kebbell, Eugene Cordero, Jing Tian, Will Brittain, Richard Jenkins, Marc Evan Jackson, Thomas Middleditch, Thomas Middleditch

Explore the mysterious and dangerous home of the king of the apes as a team of explorers ventures deep inside the treacherous, primordial island.

Incoming search term :

Kong: Skull Island 2017
Kong: Skull Island English Subtitles
Watch Kong: Skull Island
Watch Kong: Skull Island English Subtitles
Watch Movie Kong: Skull Island
Watch Movie Kong: Skull Island 2017 English Subtitles
Watch Movie Online Kong: Skull Island 2017
Watch Movie Online Kong: Skull Island English Subtitles
Watch Full Movie Kong: Skull Island
Watch Full Movie Kong: Skull Island English Subtitles
Watch Full Movie Online Kong: Skull Island 2017
Watch Full Movie Online Kong: Skull Island English Subtitles
Streaming Kong: Skull Island Streaming Kong: Skull Island 2017 English SubtitlesStreaming Movie Kong: Skull Island 2017 Streaming Movie Kong: Skull Island English SubtitlesStreaming Online Kong: Skull Island Streaming Online Kong: Skull Island 2017 English SubtitlesStreaming Full Movie Kong: Skull Island 2017 English SubtitlesStreaming Full Movie Online Kong: Skull Island 2017 Streaming Full Movie Kong: Skull Island 2017 Streaming Full Movie Online Kong: Skull Island 2017 English SubtitlesDownload Kong: Skull Island 2017 Download Kong: Skull Island English SubtitlesDownload Movie Kong: Skull Island 2017 Download Movie Kong: Skull Island 2017 English SubtitlesDownload Movie Online Kong: Skull Island Download Movie Online Kong: Skull Island English SubtitlesDownload Full Movie Kong: Skull Island Download Full Movie Kong: Skull Island 2017 English SubtitlesDownload Full Movie Online Kong: Skull Island 2017 Download Full Movie Online Kong: Skull Island English Subtitles

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (5)

SOLUTION: Firefox Fails When Upgrading After Using Mozilla PPA

This is a quick fix for a problem I had when upgrading to Ubuntu 10.04, after having used the Mozilla PPA.

The Firefox upgrade failed during the distribution upgrade process (from 9.10 to 10.04). I was told to run `dpkg -a –configure`, and the same error occurred again (it’s in bold).

$ sudo dpkg -a --configure
Setting up firefox (3.6.3+nobinonly-0ubuntu4) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist.
dpkg: error processing firefox (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of firefox-3.5:
firefox-3.5 depends on firefox; however:
Package firefox is not configured yet.
dpkg: error processing firefox-3.5 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-3.0:
firefox-3.0 depends on firefox; however:
Package firefox is not configured yet.
dpkg: error processing firefox-3.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-gnome-support:
firefox-gnome-support depends on firefox (= 3.6.3+nobinonly-0ubuntu4); however:
Package firefox is not configured yet.
dpkg: error processing firefox-gnome-support (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-3.5-gnome-support:
firefox-3.5-gnome-support depends on firefox-gnome-support; however:
Package firefox-gnome-support is not configured yet.
dpkg: error processing firefox-3.5-gnome-support (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
firefox
firefox-3.5
firefox-3.0
firefox-gnome-support
firefox-3.5-gnome-support

A quick web search brought up a bug report, and I was able to figure out this fix with the help of one of the comments:

Update: Fixed.My original solution was only temporary, and had to be repeated for each Firefox update (all the way through every update with 10.04, 10.10, now 11.04…). I’ve found the root of the problem now, by comparing local dpkg diversions for Firefox on my affected machines against an unaffected clean Ubuntu install.

On my laptop:

$ sudo dpkg-divert --list | grep firefox
local diversion of /usr/bin/firefox to /usr/bin/firefox.ubuntu
local diversion of /usr/bin/mozilla-firefox to /usr/bin/mozilla-firefox.ubuntu

The clean Ubuntu install returned no results for the above command. (Also, note that in the full output for dpkg-divert –list, those were the only local diversion — another hint that they were from the PPA upgrade rather than Ubuntu itself.)

So, I ran the following commands to remove the diversions:
$ sudo dpkg-divert --remove /usr/bin/mozilla-firefox
$ sudo dpkg-divert --remove /usr/bin/firefox

Then, the most recent Firefox upgrades worked without a hitch on both of my affected machines. Finally fixed… *fingers crossed*

Updated: This isn’t a complete fix, as the problem reoccurs every time Firefox is updated. If someone knows how to fix this for good, let me know…

$ sudo rm /usr/bin/firefox
$ cd /usr/bin
$ sudo ln -s ../lib/firefox-<your-current-version>/firefox.sh firefox
$ sudo chmod 0777 firefox
$ sudo apt-get -f install

The symlink for /usr/bin/firefox had been pointing to /usr/bin/firefox-3.5, which no longer existed, so the commands above (1) remove the dead-end link; (2) add the proper link (YMMV depending on which version of Firefox you are upgrading to); (3) resume the upgrade process.

Hope that helps!

This is a quick fix for a problem I had when upgrading to Ubuntu 10.04, after having used the Mozilla PPA. The Firefox upgrade failed during the distribution upgrade process…

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (1)

SOLUTION: Extract .exe archive with 7z in Ubunu 9.04, fix “Unsupported Method” error

Just posting a quick fix to a problem I had with using 7z to extract an archive. I could list the contents of the archive, but any attempts to extract gave an “Unsupported Method” error. Dan Jacobson posted a solution to the debian bug tracking system, which is to install the package p7zip-rar.

In Ubuntu 9.04, I ran:
sudo apt-get install p7zip-rar

Now, I can extract the contents of my file with 7z as follows:
7z e TekSavvyAM.exe

Just posting a quick fix to a problem I had with using 7z to extract an archive. I could list the contents of the archive, but any attempts to extract…

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (10)

HOWTO: Installing Android on the Freerunner + Rogers APN

I’ve been using the Openmoko Neo Freerunner as my mobile phone for over two months now. The phone can run a variety of software distributions. I started off with the Om 2008.12 Update, but spent the first few weeks testing out other popular distributions: FDOM, SHR, Qt Extended and finally Android. When I first tested Android, I had some trouble connecting to the GSM network and it felt like there were still some issues being worked out, so I went back to Om 2008.12, with the intention of dual-booting Android. The dual-boot turned out to be a bit trickier than anticipated, and I kept putting it off. Om 2008.12 is a cool idea, but there were some really annoying bugs and little hope of future development [Update: Ben left a comment about the recent flurry of development, including progress on Om2009t5], so yesterday I took the dive and went to a single-boot Android setup.

I started off on the Openmoko wiki page about installing Android on the Freerunner, but the installation is quite simple if you’re going with Koolu’s Android images (though there are a few other options). They provide a near automatic installation with the latest beta releases. Simply visit the website to download the images, and the installation process is dead simple:

Installation Instructions for Beta4 and Later

  1. Unpack the files on to a FAT formatted SD card.
  2. Insert card into the Freerunner, and boot from NOR menu (hold AUX key, then power)
  3. Chose boot from SD Card (FAT and ext2)

The automated install process should begin. It installs the Qi bootloader, reboots, the kernel, reboots, then the system image.

NOTE: This install process overwrites *everything* on the NAND in the phone, including the bootloader. If this is not what you would like to do, please either look at the install process, and modify it to suit your needs.

I’m in the process and figuring out the APN settings for Rogers to make use of my data plan. Oliver Fisher has the details for how to setup the Rogers APN on a G1, which matches the details I got from calling Rogers tech support, but I haven’t been able to connect yet. Not sure if this is a problem with my APN settings or with my data plan. I’ll update this post with the details when I figure it out.

Update: I can’t seem to get connected, though sometimes it says connecting, but I’ve found two posts about the Android settings on the T-Mobile G1 with Rogers which match what I’ve been told when calling 1-888-ROGERS1 (internet.com, wapuser1 / wap).

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (2)

Solution: Amarok Won’t Play Anything After An Upgrade To Ubuntu 9.04

I was happy to discover earlier today that Ubuntu 9.04 includes Amarok 2. But once I figured out how to queue up some music (which took a little time), I realized that nothing would play.

This was the standard output when I ran it from the command line:
balleyne@balleyne-laptop:~$ amarok
amarok(14270) Phonon::KdePlatformPlugin::createBackend: using backend: "GStreamer"
Object::connect: No such slot MainWindow::showStatistics() in /build/buildd/amarok-2.0.2mysql5.1.30/amarok-2.0.2/src/MainWindow.cpp:692
Object::connect: (receiver name: 'MainWindow')
QLayout: Attempting to add QLayout "" to MainWindow "MainWindow", which already has a layout
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
amarok(14270) Plasma::Applet::save: saving to "1"
amarok(14270) Context::ContextView::setContainment: "" Line: 599
amarok(14270) Plasma::ThemePrivate::config: using theme for app "amarok"
amarok(14270) Plasma::Applet::save: saving to "2"
amarok(14270) Plasma::Applet::save: saving to "3"
amarok(14270) Plasma::Applet::save: saving to "4"
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) Context::ColumnContainment::insertInGrid: "" Line: 603
amarok(14270) Context::ColumnContainment::insertInGrid: "" Line: 603
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
Object::connect: No such slot FileBrowser::Widget::setDir( const QString& ) in /build/buildd/amarok-2.0.2mysql5.1.30/amarok-2.0.2/src/browsers/filebrowser/FileBrowser.cpp:112
Object::connect: (sender name: 'KBookmarkHandler')
Object::connect: (receiver name: 'FileBrowser::Widget')
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
link XMLID_7_ hasn't been detected!
link XMLID_7_ hasn't been detected!
Couldn't resolve property: radialGradient3986
balleyne@balleyne-laptop:~$ amarok(14270) MagnatuneConfig::load: load
QPainter::begin: Cannot paint on a null pixmap
QPainter::begin: Cannot paint on a null pixmap
QPainter::begin: Cannot paint on a null pixmap
QPainter::begin: Cannot paint on a null pixmap
QPainter::begin: Cannot paint on a null pixmap
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) CoverFetcher::CoverFetcher: ""
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(14270) Context::ContextView::clear: "" Line: 165
amarok(14270) Context::ContextView::clear: "" Line: 165
amarok(14270) Context::ContextView::clear: "" Line: 165
amarok(14270) Context::ContextView::clear: "" Line: 165
amarok(14270) CoverFetcher::~CoverFetcher: ""

The “QString::arg: Argument missing: Amarok – No track playing., 0:00” seemed to be the problem. I found the solution from Xavier Merino:

sudo apt-get install phonon-backend-xine

I restarted Amarok and now it works fine.film The 5th Wave trailer

Update: People are reporting mixed results in the comments. This fix doesn’t work for everyone. Let me know if you become aware of a better solution and I’ll update here.

Another suggestion is sudo apt-get install libxine1-ffmpeg

I was happy to discover earlier today that Ubuntu 9.04 includes Amarok 2. But once I figured out how to queue up some music (which took a little time), I…

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (19)

HOWTO: Compile Unison (and OCaml) under Unslung 6.10 on a Linksys NSLU2

This is a pretty obscure and incomplete howto, but I was left to figure all this out without much help so I figure I might as well post what I learned in case it is of assistance to anyone else.

At the office, we’re running a Linksys NSLU2 with the Unslung 6.10 firmware as our file server. We wanted to use Unison to do a two-way sync between portions of the server and a laptop, so that we can access documents offline and out of the office (e.g. in a meeting off-site). The unslung NSLU2 has a lot of software available through the OptWare package system, but Unison is not available. Since the architecture is non-standard (I want to say “arm” or something? anyways, not x86), I figured we’d have to compile from source. Then, one more roadblock — it’s written in OCaml, which also lacks an OptWare package and would need to be compiled from source.

Obviously, make sure you read and follow all the instructions provided with OCaml and Unison, and be sure to pay attention to the documentation at the NSLU2 Linux wiki. The following are just some tips for things that weren’t in the documentation which we had to figure out along the way.

Compiling OCaml

This proved a bit tricky. First all, you’ll need to install a few dependencies, which thankfully have OptWare packages available: make, crosstool-native (for gcc), and gawk.

Second, make sure to use the prefix flag in the configure step to install to /opt/bin and /opt/lib, rather than the standard /bin and /lib (i.e. you want to install it on one of the NSLU2 drives, not the limited internal memory). So, for example:

./configure -prefix /opt

Last, there is one problem with the MakeFile generated — there is a reference to “awk” somewhere to needs to be changed to /opt/bin/awk (unless you’re luckier than me and somehow have /opt/bin correctly on the path, but trust me, I tried…). So, I did a `grep -n awk MakeFile` to find it and then you can use nano/vim to make the edit manually to the file before compiling.

If you do those things first, compilation should be easy (just be prepared to wait awhile):

make world opt 2>&1 > log.worldopt
make install

Compiling Unison

Don’t ask me what “etags” are, but the compiler will complain if you don’t have them, and I figured out it has something to do with emacs. Once you install emacs, it gets past that stage in the compilation, so:

ipkg update
ipkg install emacs

The emacs installation actually gave me an error with a file conflict of sorts, so I had to run:
ipkg -force-overwrite install emacs

For some reason, Nathan discovered that you need to set NATIVE=false when you make Unison. I didn’t see the command, but I gather it looked something like this:
make NATIVE=false UISTYLE=text

Lastly, you’ll want to put unison on your path, so something like…
cp ./unison /opt/bin/

And then, magic! Or tragedy, if you did something wrong.

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Post a Comment

HOWTO: ThinkVantage Button in Ubuntu 8.10

I’m pretty sure this is the same fix I used in Gutsy and Hardy, but I had to do it again to get my ThinkVantage button working on my ThinkPad T61 in Ubuntu 8.10 Intrepid. I just added the following line to /usr/share/hotkey-setup/ibm.hk and it worked after a reboot.

setkeycodes e017 148 #thinkvantage button

Creative Commons Attribution-ShareAlike 4.0 International Permalink | Comments (1)