Archive | January 2010

sphinx and WARNING: DOCID_MAX document_id, skipping

This error seems to wake-up with large ids >100.000.000 (like Ruby On Rails fixtures sys does).
Ok, like Piotr Jasiulewicz says this error appears because the sphinx was built without the –enable-id64 option.

Let’s go to solve this problem in Debian (note: I assume you use mysql, if not you have to change some dependencies packages).

Update 2012-05-31: this post refers to Debian Lenny i386. I don’t know if the binary package of Debian Squeeze (other distros, versions, architectures) is compiled with the same compile options at the moment. Anyway this post is intended to solve the specific warning (or to suggest a solution just in case you use another distro/architecture) .

Move to your preferred source folder (for example ~/src) or create it. Move to root user with su.
Download debian’s sphinxsearch sources:

#apt-get source sphinxsearch

Give permissions to your user on sphinxsearch files.

#chown -R youruser:youruser sphinxsearch*

Install mysql dev packages:

#apt-get install libmysqlclient-dev libmysqld-dev

Exit from root and return to your user. Enter in source folder of sphinxsearch (may vary with versions), configure with proper flags and make.

#exit
$cd sphinxsearch-0.9.9
$./configure –enable-id64
$make

Please note that pgsql is disabled by default and you should take a look at configure options (./configure –help) to see if you need others options, I don’t (except for libstemmer but I ignore this here).

Ok. If all was ok at make/compile time you can move on installation.

Move to root user with su (uninstall debian sphinx package if needed) and install.

#apt-get remove sphinxsearch
#make install

That’s all. Happy Sphinx On Ruby On Rails with fixtures 🙂

Sui virus informatici, e sulla sicurezza…

Vengo da una discussione fresca fresca nata a proposito dei classici annunci di nuovi virus in circolazione, pericoli abissali per gli utenti, qualcuno dice addirittura che un virus informatico ha ucciso la sua famiglia…

Quando leggo questo genere di articoli sono pervaso da un senso di nausea, non tanto perchè i virus esistono, ma piuttosto perchè oramai sembra che l’informatica non possa esistere senza di loro. A volte dico che uso lo stesso sistema operativo da 10 anni e non ho mai preso un virus… qualcuno mi guarda come se fossi un alieno, fa un passo indietro e mi dice “allora sei tu che li crei!! sei un hacker!!”, qualcuno ha quasi profetizzato che io fossi il nuovo messia…

Read More…

Netgear Readynas Duo, NFS and Debian Sid: mount.nfs: Operation not permitted

ReadyNAS Duo mount.nfs: Operation not permitted
Today I spend some time to mount one folder on Readynas Duo with NFS. All goes right from server (Debian Lenny) but i can’t mount NFS partitions from my pc (Debian Sid).

Error was “mount.nfs: Operation not permitted “.

Ok, I check my mount options

#cat /etc/fstab <ipaddress>:/c/folder  /mnt/folder nfs rw,user,noauto 0       0

Fstab is ok but problem persists.

Request mount to be verbose (from my pc – debian sid)

<myhost>:/home/giulio# mount -v /mnt/folder
mount.nfs: timeout set for Sun Jan 17 13:34:47 2010
mount.nfs: trying text-based options 'addr=<readynas-ip-address>,vers=4,clientaddr=<my-pc-address>'
mount.nfs: mount(2): Operation not permitted
mount.nfs: Operation not permitted

Request mount to be verbose (from my server – debian lenny)

mount.nfs: trying <readynas-ip-address> prog 100003 vers 3 prot TCP port 2049
mount.nfs: trying <readynas-ip-address> prog 100005 vers 3 prot UDP port 3078
<readynas-ip-address>:/c/folder on /mnt/folder type nfs (rw,noexec,nosuid,nodev,noauto,user)

Wow, ok, there is a difference.

My pc try to mount nfs with version 4, my server doesn’t use v4,  but it uses v3!

What is strange?
I’ve read a lot of tutorial/faq but my problem remains. So I read man pages but this is what I find, for example in man mount.nfs…

mount.nfs is meant to be used by the mount(8) command for mounting NFS shares. This subcommand, however, can also be used as a standalone command
with limited functionality.

mount.nfs4 is used for mounting NFSv4 file system, while mount.nfs is used to mount NFS file systems versions 3 or 2.  remotetarget is  a  server
share usually in the form of servername:/path/to/share.  dir is the directory on which the file system is to be mounted.

It seems to be false. On my pc I use mount.nfs and always mount tries with nfs4.

Ok, let’s go to solution..

You can force the NFS version to use with nfsvers=3.

So I change my /etc/fstab like this:

<readynas-ip-address>:/c/folder /mnt/folder nfs rw,user,noauto,nfsvers=3  0       0

Now mount uses the right version and all goes well.

Bye!

wiimote, wiicontrol, DrNokSnes and n900

Install DrNokSnes and wiicontrol.

Edit /usr/bin/wiicontrol to match this configuration (dont copy/paste, on python indentation level of your statements is significant):

mapping={
‘U’: [“a a”],
‘D’: [“a d”],
‘L’: [“a s”],
‘R’: [“a w”],
‘A’: [“a z”],
‘+’: [“a x”],
‘-‘: [“a c”],
‘1’: [“a v”],
‘2’: [“a b”],
‘H’: [“a n”],
‘GU’: [“a u”],
‘GD’: [“a i”],
‘GL’: [“a o”],
‘GR’: [“a p”],
‘Z’: [“a k”],
‘C’: [“a l”]
}

Start Bluetooth (or wiicontrol crashes).
Start wiicontrol (my wiicontrol freeze and I cant select key setup but it still works).
Setup wiimote (press 1+2).
Start DrNokSnes and tap un titlebar to configure keyboard.

Enjoy!