10. January 2012

Debian Tomcat 7 – the trustAnchors parameter must be non-empty

I was deploying application on Tomcat7/OpenJDK. This application was accessing further secure services like SMTPS and HTTPS.

Tomcat was complaining that certificates are not correct (PKIX): the trustAnchors parameter must be non-empty.

Solution for Debian was quite easy after I found correct path to cacerts. Java cacerts for OpenJDK are stored in file: /etc/ssl/certs/java/cacerts.

To import certificate it is sufficient to use keytool:

keytool -import -keystore /etc/ssl/certs/java/cacerts -file cert.pem \
-alias ci.sinusgear.com

Then I restarted Tomcat and problem with trustAnchors disappeared.

28. October 2011

Mutextrace – simple tool for detecting problems with mutexes

Debugging multithread apps is not easy task. Some problems never occur in debugging mode and it could be discovered only when application is running for long time. One of problematic issues in multithread apps are mutexes.

There is very simple tool in Debian distribution that could help you with identifying problems mutexes. The tools is mutextrace.

Quote from package description:

This tool displays mutexes locked and unlocked during execution of a program, and can provide hints for debugging multithreaded applications. As it is fairly lightweight and easy to use, it is ideal at the start of a debugging session or when only limited resources are available.

It cannot detect data races as it only looks at the synchronization primitives themselves; if you need that, use helgrind (in the valgrind package) instead.

How to use mutextrace? Like strace. Just add mutextrace before your application in the shell:

mutextrace ./mutex-tester-app param1 param2

Result:

lock #1, free -> thread 1
init #2
lock #2, free -> thread 1
unlock #1
lock #1, free -> thread 1
init #3
lock #3, free -> thread 1
unlock #1
unlock #3

Simple :-)

I couldn’t find reference to original source of mutextrace. It seems that it does not exist.

10. October 2011

Debian Testing 64bit – php5-gd – libjpeg version Unknown

I found strange issue with php5-gd during upgrade of Linux Debian Testing.

php5-gd package is responsible for rendering and manipulation of images in PHP apps. Problem was that after installation phpinfo() displayed weird message:

libjpeg version: unknown

No JPEG manipulation was working. I found Sergio’s solution for 32 bit version of Debian Linux. The trick is in replacing some so files from Suse.

Here is updated version for Debian 64bit:

cd /tmp
wget ftp://ftp.icm.edu.pl/vol/rzm1/linux-opensuse/distribution/11.3/repo/oss/suse/x86_64/php5-gd-5.3.2-1.31.x86_64.rpm
alien php5-gd-5.3.2-1.31.x86_64.rpm
dpkg -i php5-gd_5.3.2-2.31_amd64.deb
cp /usr/lib64/php5/extensions/gd.so /usr/lib/php5/20090626/

wget ftp://ftp.icm.edu.pl/vol/rzm1/linux-opensuse/distribution/11.3/repo/oss/suse/x86_64/libpng14-14-1.4.3-2.1.x86_64.rpm
alien -d libpng14-14-1.4.3-2.1.x86_64.rpm
dpkg -i libpng14-14_1.4.3-3.1_amd64.deb
mv /usr/lib64/libpng14.so* /usr/lib

/etc/init.d/apache2 restart

6. October 2011

Debian – dpkg problem – tar exists on unknown argument —warning=no-timestamp

I was upgrading Linux Debian. Everything went ok until upgrade of dpkg.

After upgrading dpkg package I was not able to install anything, because of error with tar command.

Tar was complaining that –warning=no-timestamp is unkwnown parameter and program terminated with error.

So I made small trick. I renamed /bin/tar to /bin/tar.original:

mv /bin/tar /bin/tar.original

Then I wrote simple script into /bin/tar file:

#!/bin/bash

tar.original xf -

Add permission:

chmod a+x /bin/tar

The last step is reinstallation of broken packages:

apt-get install --reinstall dpkg
apt-get install --reinstall tar

5. October 2011

FlashPlayer 11 for 64bit Linux is available

Yes! It is true! We were waiting long time for official 64bit version of FP for Linux. Now it’s here! :-)

You can download the latest version from: http://www.adobe.com/support/flashplayer/downloads.html

Here is install info for users who need tarball:

mkdir fp-11
cd fp-11
tar xvzf ../path-to-tarball/install_flash_player_11_linux.x86.64.tar.gz
cp libflashplayer.so ~/.mozilla/plugins

Enjoy! You can read about further new features at kb2.adobe.com.

7. September 2011

Debian – apt-get install perl problem

I wanted to install new package on Debian. But what a funny message:

E: Could not perform immediate configuration on 'perl-modules'.
Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)

How to solve it?

Type:

apt-get install perl -o APT::Immediate-Configure=0

9. April 2011

UNetbootin – quick way how to create bootable USB

Imagine situation: Boot procedure on Linux server is broken. You have SystemRescueCD, but CD-ROM is not working. You have notebook with Windows and USB key.

How to fix that server?

We can use USB key! :-)

It’s quite tricky to create bootable Linux key from Windows. It requires several steps… It’s hard.

No, it’s quite easy! Just download simple tool UNetbootin and create bootable USB in few steps.

UNetbootin provides several Linux distributions. My choice was ISO image of Debian Live, because it’s quite small and it has support for XFS and other useful stuff.

Note: SystemRescueCD 2.0 ISO is not booting correctly.

16. October 2010

Adobe AIR na 64bit Linux Ubuntu

James Ward napísal krátky návod: Ako nainštalovať Adobe AIR na 64bit Ubuntu.

Celý trik spočíva v drobnej úprave balíčku.

Stiahnuť Adobe AIR v deb balíčku: http://get.adobe.com/air/

mkdir tmp
dpkg-deb -x adobeair.deb tmp
dpkg-deb --control adobeair.deb tmp/DEBIAN
sed -i "s/i386/all/" tmp/DEBIAN/control
dpkg -b tmp adobeair_64.deb
sudo dpkg -i adobeair_64.deb

5. June 2010

Ako zabrániť inštalácii nežiadúcich balíkov na Debiane

Občas sa stane, že je potrebné nainštalovať balík. Ten ale pritiahne so sebou pár ďalších nechcených balíkov.

Nežiadúce balíky sa dajú zablokovať jednoducho. Do súboru /etc/apt/preferences pridáme nasledujúce riadky s menom balíku:

Package: openjdk-6-jre
Pin: version 1.0*
Pin-Priority: 1001

Ďalšie informácie na túto tému nájdete na stránkach Live in X.

6. November 2009

Debian problém – dpkg dependtry

Tak si inštalujem balíček a aha ho koťuhu. Dpkg mi začalo nepekne nadávať v jazyku C:

dpkg: ../../src/packages.c:221: process_queue: Assertion `dependtry <= 4' failed.

Ej veru. Nejakú chvíľku som sa s problémom trápil. Skúšal som ručne odstrániť balíky, potom ich zase pridať. Presne tak ako to tvrdilo veľa užitočných príspevkov vo fórách. No a hádajte ako to dopadlo? Nepomohlo to.

Pozrel som sa teda na archív balíčkov. Vravím si, skúsim upgrade dpkg.

wget http://ftp.cz.debian.org/debian/pool/main/d/dpkg/dpkg_1.15.4.1_i386.deb
dpkg -i dpkg_1.15.4.1_i386.deb
dpkg --configure -a

Zabralo. Pravdepodobne to bola chyba v implementácii dpkg.

  • Babel fish

      Translate from:

      Translate to:

  • Where’s the fish?

  • Starfish

  • Fish for you

  • Further info

  • Badges

  • Video channel

  • Learning

    Grow your brain.
  • Tags

  • Topics

  •  

    February 2012
    M T W T F S S
    « Jan    
     12345
    6789101112
    13141516171819
    20212223242526
    272829  
  • Comments