Linux: restart when hung

When a Linux system crashes (usually because of a driver issue), you should make sure at least it restarts. These are the lines you should add to /etc/sysctl.conf: # Reboot time(s) after panic kernel.panic = 20 # Panic if a hung task was found kernel.hung_task_panic = 1 # Setup timeout for hung tasks to 30 seconds kernel.hung_task_timeout_secs = 30

November 26, 2012 · Florent Clairambault

Opensourcing the content of this blog

Hi everyone, During the last years, I launched the javacint google group which now has grown out to be a good community of professionnals working around the Cinterion (java enabled) chips. I also created a TC65 development document. And all the questions and feedbacks you gave me on the development around these chips helped me a lot to improve (what was) my document and (what was) my FAQ. You helped me so much indeed that I believe this content should know be open to everyone to modify. That’s why I created the javacint wiki. ...

August 6, 2012 · Florent Clairambault

xrdp and the ulimits / nofile issue

You might have noticed for xrdp on Debian (but quite possibly with a lot of other Linux tools and other Linux distributions) the user limits (described in /etc/security/limits.conf) are not enforced. Which meant in my case that any session open with xrdp was opened with a max number of open files (nofile) set to 1024. To fix this, edit the file /etc/pam.d/common-session and add the following line: session required pam_limits.so

June 11, 2012 · Florent Clairambault

Limiting number of connections per IP with ufw

This is a personal reminder post. The easiest attack one can perform on a web server is opening all the connections and do nothing with it. iptables fortunately has a “connlimit” module to avoid this. If you’re using ufw like me you will want to keep your good integration with it. In the `/etc/ufw/before.rules file, after these lines: # Don't delete these required lines, otherwise there will be errors *filter :ufw-before-input - [:] :ufw-before-output - [:] :ufw-before-forward - [:] :ufw-not-local - [:] # End of required lines You can add this to limit the number of concurrent connections: ...

June 2, 2012 · Florent Clairambault

Cassandra as registry

One of the biggest issue with distributed database is to find the right model to store your data. On a recent project, I decided to use a registry model. The registry idea The idea behind writing a registry is to have an easy way to both store and view data. For a given device that has a {UUID} id: I will access “/device/{UUID}/”. Any properties will be stored in “/device/{UUID}/properties/”. Deletion of the device will delete all the contents this device contains. Classical column-families to index data The problem comes with the data we need to index. We can store everything in a registry manner like having a path “/device/by-owner/{UUID}”:["{UUID1}","{UUID2}"]. But it’s just easier to use cassandra secondary indexes have each property of each entity written to the indexed columns of the column family. ...

June 1, 2012 · Florent Clairambault

TC65i development on Mac Os X (or Linux)

This is now on the wiki.

May 23, 2012 · Florent Clairambault

Small updates to the TC65Dev

Changes are: Removed references to the FAQ and the M2MP protocol. Added explanations on how to handle the deployment of multiple versions. Added a quick note on how to use the jazzlib library for gzip compression. The TC65Dev now is on the wiki.

May 1, 2012 · Florent Clairambault

Some movies you should see

I have a bad addiction to movies. I keep watching them even if most of them just look alike. Here are some (recent) movies that I found uncommonly great: Perfect sense Youth in revolt Lars and the real girl Jesus henry christ

April 20, 2012 · Florent Clairambault

TINC – Simple P2P VPN

The world is full of good surprises, and TINC is definitely one of them. Are you running a distributed system across multiple datacenters? Perhaps you’re using Cassandra or another distributed database? TINC is the networking solution you’ve been looking for. TINC creates a secure, decentralized virtual private network that automatically establishes a fully meshed topology between your nodes. What makes TINC stand out: Zero single points of failure Automatic mesh routing around NAT and firewalls Military-grade encryption Remarkably simple setup I followed these setup instructions and was impressed by how smoothly everything worked - no debugging or log diving required. For anyone managing distributed systems, TINC is a game-changer. ...

March 21, 2012 · Florent Clairambault

Interesting discovery around the TC65 / TC65i

This has moved to the javacint wiki

March 15, 2012 · Florent Clairambault