Debian freezes randomly

Since about one year I own a ultrabook ‘Wortmann Terra Mobile 1450 II’ which I run on Linux.  The system contains a Intel Core i7-351U chip set and 8GB RAM. But this system shows a very strange problem on Linux (and as I guess maybe also on other operating systems): randomly the system freezes.

When the system freezes no mouse , no keyboard, no REISUB was possible. The screen is corrupted and did not update. The only key board functionality which is still possible is Fn+F9 (switch display on/off). So the only possibility was to to switch off the system hard.

The freeze occurs when the system runs on battery as also when it is plugged. It looked as if the errors occurs more frequently at high memory usage.

The memory…

A memory check (with memtest86+) indicates no problem. Therefore, I thought it had to do something with the kernel. See also the discussion here. But updating every week a new kernel version and playing around with several kernel boot options the problem still occurs.

Back to the idea that the problem comes from the RAM I installed the tool ‘memtester’. With this tool you can test memory when linux is running. For Example I started a test to check 7GB RAM with the following command:

memtester 7G 1

And now I was able to force the freeze. During such a test each time my system freezes. Also when I booted in kernel recovery mode the same situation – system freezes! So this indicated to me that the problem is with the memory.

The solution

If the memory seems to be ok in general (memtest86+ indicates no errors) but the system freezes in situations with heavy  memory usage (memtester) then it may have something to do with overclocking the memory?

In my BIOS settings () I found the following setting:

->Chipset
-> System Agent (SA) Configuration
-> Memory Configuration
-> Memory Frequency Limiter

This was defined as ‘AUTO’. What ever this means I changed the value to lowest available setting of ‘1067’ (other values where 1600, 1867, … up to 2667). With this setting I can not see any substantial impairment of the speed. But from now on my system runs without any more freezes!

So if you are also faced with the problem of random freezes, first try to control the overclocking of your memory. I hope this will help you too.

After all the last question is: Is my hardware to fast for linux or is linux to fast for my hardware 😉

 

Maven Incremental hot deploy – a plugin for the Eclipse IDE

There are different ways how to deploy Java EE application into an application server like Glassfish or JBoss. You can deploy your application using a command line tool or a web interface provided by your sever. Or you can use the autodeploy feature which means that you simply copy your application into a specific folder of your server (e.g. ../domains/mydomain/autodeploy/ for Glassfish)

The Eclipse IDE provides a plugin called “Web Tools Plattform” (WTP) which supports the hot deployment functionality for some application and web servers. But if you are using the Maven build tool the Ecipse WTP feature did not integrate smoothly with the maven project structure. So is most cases the hot deployment feature will get lost and the development and deployment will become time intensive and frustrating. This is the moment where manik-hot-deploy comes into play. manik-hot-deploy is an Eclipse plugin which supports hotdeployment functionality for your maven java enterprise project. It is easy to configure and speed-up the development of web and enterprise applications.

Autodeployment vs. Hotdeployment (Incremental Deployment)

Most application servers like GlassFish? or JBoss are supporting two different modes of automatic deployment. The autodeployment and the hotdeplyoment (also called incremental deployment).

Autodeployment:

Autodeployment means that you simply copy a web- (.war) or enterprise application (.ear) into a specific directory of our application server. For Glassfish this is the folder:

..[GLASSFISH_INSTALL]/glassfish/domains/domain1/autodeploy/

When you copy an application into that directory Glassfish will automatically detect the new artefact and starts a deployment process. If the application was already deployed before a redeployment will be started.

Hot-Deployment:

In different to autodeplyoment the hotdeplyoment (or incremental deployment) will not deploy the whole application but parts of your application which are updated or changed during development. This is a powerful feature which can save you a lot of time during development. Incremental deployment means, that in the moment when you are changing a web resource (like a .xhtml, .jsf or .css files) this change is immediately transferred into your deployed and running application. So there is no need to build and redeploy the application.

The Manik Hot Deploy Plugin for Eclipse

See how to install and use the Mani-Hot-Deploy Plugin for Eclipse to find an easy way to autodeploy your JEE projects form Eclipse into your application server.

https://github.com/rsoika/manik-hot-deploy

Virtual Box not working

If VirtualBox is not working properly one reason can be the CPU configuration controlled by the BIOS. Try to activate the setting

Intel Virtualization Technology = Enabled

 

Migrate from GlassFish to WildFly

In this blog I just want to post some of my thoughts about migrating from GlassFish to WildFly. The main issue here for me is to deploy an existing EAR currently running on GlassFish 3. This EAR contains EJBs, Web, and REST modules and includes TimerServices, Security Issues and custom servlets. So it’s not the easy hello-world example.

I am working on Linux Debian 7 and using Open JDK 1.7.0_55. The examples show the configuration for the Imixs Office Workflow Suite. Continue reading “Migrate from GlassFish to WildFly”

WordPress – try to lock out hackers

WordPress is really a nice software. I use it for websites and blogs. The problem is that WordPress is so common used in the net that hackers aggressive try to enter your site and inject eval php code. This is really terrible and I suffered some times ago because such a hackers attach against main own web sites.

After all I think two things can help to lock out hackers from wordpress.

1) Wordfence Plugin

The Wordfence Plugin is – in my eyes  – really good software. You should install this plugin to understand if your wordpress is under attack.

2) Protect your directories

The important thing running WordPress is to protect your directories. Never allow the apache server to write into the WordPress instalation directory. I know this is for most people an essential feature because this allows to easily update WordPress, install Plugins and Themes. But this also allows hackers to inject bad php code into your installation. And the most secure way to protect your wordpress installation is to disallow the apache server to write into the installation code.

For Linux servers this means:

In your apache web directory create a folder for your WordPress installation and reduce the directory access to a minimum which means only your own linux user account should be the owner and allowed to change content.

ls -l /var/www/
drwxr-xr-x 5 youraccount youraccount 4096 Apr 16 21:12 wordpress

As you can see the apache user (e.g. www-data) can only read but not change directories. Any changes on the wp-config.php or the installation of plugins or themes can still be made by direct ssh access (in this example) from the user ‘youraccount’.

The only exception could be the wp-content/uploads folder which need to be writable from apache when you try to upload an image.

There are a lot of additional tipps and tricks how to protect your WordPress. But I think protecting the WordPress installation from modification by the apache server is the best way.

Eclipse crashes in Debian Jessie

After some updates in my Debian/Jessie installation I run into a strange problem with Eclipse. When I start Eclipse first everything looks fine, but in the moment I use some type-ahead features or browsing classes or methods in a java-file Eclipse crashes without any error message. Maybe the problem is related to an update in libwebkitgtk-3.0.

After some searching I was finally able to fix the problem by adding the following line to my eclipse.ini:

-Dorg.eclipse.swt.browser.DefaultType=mozilla

See also this bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334466

‘evbug’ auf die Blacklist setzen

Ich hatte das Problem das mein kern.log file mit Meldungen dieser Art geflutet wurde:

Sep 27 18:07:48 r-ultrabook kernel: [ 380.012332] evbug: Event. Dev: input6, Type: 0, Code: 0, Value: 0
Sep 27 18:07:48 r-ultrabook kernel: [ 380.028334] evbug: Event. Dev: input6, Type: 2, Code: 1, Value: -1
Sep 27 18:07:48 r-ultrabook kernel: [ 380.028343] evbug: Event. Dev: input6, Type: 0, Code: 0, Value: 0
Sep 27 18:07:48 r-ultrabook kernel: [ 380.044419] evbug: Event. Dev: input6, Type: 2, Code: 1, Value: -1
Sep 27 18:07:48 r-ultrabook kernel: [ 380.044430] evbug: Event. Dev: input6, Type: 0, Code: 0, Value: 0

Diese Meldungen werden wohl vom Modul  ‘evbug’ erzeugt und dienen als Debug Information. Das Modul sollte im Normalfall eigentlicht im Kernel geladen werden.

Um nun das Modul abzuschalten kann man es auf die blacklist setzen.

Dazu habe ich die (bei mir noch nicht vorhandene) Datei /etc/modprobe.d/blacklist.conf erstellt und folgenden Inhalt eingetragen:

# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.
# evbug is a debug tool that should be loaded explicitly
blacklist evbug

Dies führt dazu das das Modul beim nächsten booten nicht mehr geladen wird und die Meldungen verschwinden.

Debian – Testing

In Debian werden Paket relativ selten aktualisiert und mit neueren Versionen ausgetauscht. Hier unterscheidet sich Debian deutlich von Ubuntu. Wen man dennoch ein wichtiges Update von einem Kernel benötigt kann man über die Backports diesen meist problemlos nach-installieren. Dies habe ich hier beschrieben.

Darüber hinaus gibt es aber auch die Möglichkeit über die DebianTesting releases neuere Paket zu nutzen. Ich beschreibe im Folgenden das grundsätzliche vorgehen.

Continue reading “Debian – Testing”