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. November 2011

28.11. 2011 – There is much more to C++ – slides

23. November 2011

Mintty – resizable terminal for Windows

Update 31.12. 2012: new version of Mintty (see discussion).

Cygwin is great tool for Windows.

E.g. You can create shell script to access windows share via //computer/share_name. This saves a lot of time when you’re domain admin and you need to maintain many computers.

The only BIG drawback of Cygwin for Windows was terminal window. When you work on Mac or Linux you can resize terminal window as you need. Terminal (CMD) for Windows sucks. In default installation you can resize just in one direction. The other option would be to mix Cygwin with PowerShell, but then many things are not working at all.

Good news! Great news! There is new terminal window in Cygwin 1.7.x. It’s application mintty.

Installer will create link to this app with name Cygwin Terminal. It will launch mintty process and you can resize window without problem.

It works fantastic! After so many yeaars it is now possible to use full power of Windows and Linux together in one bundle. (Yes, I know about other terminals like rxvt or X-based stuff, but it required always some extra steps).

Some computers were complaining that /Cygwin-Terminal.ico was not found and I was not able to launch terminal. Solution was easy. Right click on launcher icon and remove icon parameters from Target. The result target command should look like: C:\cygwin\bin\mintty.exe

Hooray! BIG thank you goes to authors of mintty for Windows.

Follow Mintty T.

14. November 2011

How to compare 2 or 3 directories on Windows

Sometimes you need to find out what is the difference between two or three directories.

This is quite easy task when you’re Linux user. You just start Kdiff3 and it’s done.

Good news! This incredibly worthy tool is available also for Windows.

Just download installer. Install application. Select two or three directories, invoke context menu by right click in file explorer and select KDiff3 – Compare.

:-)

9. November 2011

Flash Player for mobile world was replaced by HTML5 and AIR

Flash Player for mobile browsers won’t be in development anymore. This is not big surprise in my opinion.

Adobe shifted focus to AIR for mobile and HTML5. It is possible to build native apps for desktop and mobile with AIR.

Note: Development of Adobe AIR for Linux was cancelled during summer 2011. AIR supports Mac, Win and mobile devices.

You can read more about this game changing decision at Adobe’s blog.

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
  • 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