
[Guide] Funambol MySQL and Debian lenny/squeeze
24 Feb 2010 | 20 Comments | posted by c0urier | in Guides
If you are looking for an Open Source application to synchronize all your devices like mail client (Thunderbird & MS Outlook), mobile phone (Symbian, Windows Mobile, SmartPhones, Iphone etc) funambol would be the perfect choice.
I’ve decided to make a little guide for Debian, since I was not able to find a decent one online.
Log in to your debian box and su to root.
cd /tmp
wget http://download.forge.objectweb.org/sync4j/funambol-8.0.2.bin
Make the file executable: chmod 777 funambol-8.0.2.bin
Run the Funambol installation: ./funambol-8.0.2.bin
Accept the license agreement
Choose the Funambol installation folder
Choose no to start Funambol
Now funambol is installed the folder of your choice. We did not start the Funambol since there is a few modifications to be done, ex. Installing MySQL and creating a sql user and database.
Do: apt-get install mysql-server mysql-client libmysqlclient15-dev
Stop the mysql server: /etc/init.d/mysql stop
ONLY NEEDED IF USING A REMOTE mySQL SERVER, this makes the mySQL server listen on all interfaces: nano /etc/mysql/my.cnf and comment out #bind-address = 127.0.0.1
Now start the mysql server again: /etc/init.d/mysql start
Set the root password to mysql: mysqladmin -h localhost -u root password some_password
Now test if it works: mysql -u root -p (Click enter and type your password, type exit to quit)
Okay now we have the mysql setup and ready to use – This takes us to the point where we have to add a new sql user and a database to use with Funambol.
Login to mysql: mysql -h localhost -u root -p
create user ‘funambol_usr’@'locahost’ identified by ‘some_password’;
grant all privileges on *.* to ‘funambol_usr’@'localhost’ with grant option;
flush privileges;
create database funambol;
grant all on funambol.* to funambol_usr@’localhost’ identified by ‘some_password’;
Now we have created a user called funambol_usr with the password you chose and given him access to the database funambol.
Next step is to install the mysql java connector so Funambol can communicate with the mysql server. Funambol is based on Java that is why we need a connector so java can communicate with mysql.
apt-get install libmysql-java
This will install the mysql -> java connector.
Copy the java connector to the funambol java dir: cp /usr/share/java/mysql-connector-java.jar /opt/Funambol/tools/jre-1.5.0/jre/
It’s time to edit the Funambol files to make funambol work with mysql.
nano /opt/Funambol/ds-server/install.properties
Change: dbms=hypersonic to dbms=mysql
Comment out these lines:
#jdbc.classpath=../tools/hypersonic/lib/hsqldb.jar
#jdbc.driver=org.hsqldb.jdbcDriver
#jdbc.url=jdbc:hsqldb:hsql://localhost/funambol
#jdbc.user=sa
#jdbc.password=
Now uncomment:
jdbc.classpath=/opt/Funambol/tools/jre-1.5.0/jre/mysql-connector-java.jar
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost/funambol
jdbc.user=funambol_usr
jdbc.password=some_password
Funambol should be ready to run, but before we start the new installation of Funambol with mysql support we should make a start script it’s already included in Funambol just not put in the debian init folder.
cp /opt/Funambol/bin/funambol /etc/init.d/
Edit the newly copied start script and change the Funambol home folder location: nano /etc/init.d/funambol
And change: DS_SERVER_HOME=$FUNAMBOL_HOME/ds-server to DS_SERVER_HOME=/opt/Funambol/ds-server
Now we have a working start script, this brings us to the final step, the installation to get Funambol working with mysql.
Run: /opt/Funambol/bin/install and answer yes to all questions asked.
If you run in to this error:
BUILD FAILED
/var/Funambol/ds-server/install/install.xml:172: The following error occurred while executing this line:
/var/Funambol/ds-server/install/install.xml:353: The following error occurred while executing this line:
/var/Funambol/ds-server/install/install.xml:380: The following error occurred while executing this line:
/var/Funambol/ds-server/install/install.xml:437: The following error occurred while executing this line:
/var/Funambol/ds-server/install/install.xml:452: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
You need to disable IPv6 for Java, this is one of the reasons why I’ve made this guide, since I had this issues without really being able to find a solution for it until now. Copy paste the lines below:
sed -i 's/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/' \
/etc/sysctl.d/bindv6only.conf && sudo invoke-rc.d procps restart
When you’ve done that, rerun the installation script: /opt/Funambol/bin/install and the error should be gone, answer yes to all the questions you asked.
Now go to Funambol.com and download the administration tool.
Default username: admin
Default password: sa
It’s highly recommended to change these when connecting to Funambol, further questions read the Funambol installation and administration guide by Click here




This article was written by: c0urier
20 Comments
Why do you suggest “Edit your mysql config file to make mysql listen on all interfaces” – is this security risk necessary?
Like or Dislike:
0
0
Hi Andrew,
No it’s not necessary to make mySQL listen on all interfaces, especially if everything is running on the same local server , but as I am running a remote mySQL server, though within a closed network I decided to do it that way. I’ll make a correcting of the text when I get back home, thank you very much.
// Glenn
Like or Dislike:
0
0
Hi,
i have exactly the same BUILD FAILED error … But copy / paste the two lines you mention results in an error for disabling ipv6.
-> sed: can’t read /etc/sysctl.d/bindv6only.conf: No such file or directory
i got lampp running mysql.
Like or Dislike:
0
0
Hi Jack,
The guide is not really made for lampp – But you could try these steps:
1) edit /etc/modprobe.conf
- a) alias net-pf-10 off
- b) alias ipv6 off
2) edit /etc/modprobe.d/blacklist
- a) blacklist ipv6
Now reboot your system and try again.
I give no warranty for this to work, but it’s worth a shot.
Like or Dislike:
0
0
How about I getting the same error while setting up in Windows environment ?
And i got the build failed with the error shown below
Funambol/ds-server/install/install.xml:172: The following error occurred while executing this line:
Funambol/ds-server/install/install.xml:353: The following error occurred while executing this line:
Funambol/ds-server/install/install.xml:380: The following error occurred while executing this line:
Funambol/ds-server/install/install.xml:437: The following error occurred while executing this line:
Like or Dislike:
0
0
Hi Owjian,
The error that many received in Debian was related to IPv6 being activated within Java. I cannot say if the same error occur on Windows environments. I’d definitely say it’s a possibility but as you can see on the error I got, I had a line more and it was actually that line that got me looking towards Java.
But to be honest I think the IPv6 bug has been fixed in the newer releases of Funambol.
Feel free to post back if you’d like, I’ll try to help as much as possible but as said Windows environments are not my area of expertise
.
Like or Dislike:
0
0
Hi ,
I’m getting the same error as
BUILD FAILED
/opt/Funambol/ds-server/install/install.xml:172: The following error occurred while executing this line:
/opt/Funambol/ds-server/install/install.xml:353: The following error occurred while executing this line:
/opt/Funambol/ds-server/install/install.xml:380: The following error occurred while executing this line:
/opt/Funambol/ds-server/install/install.xml:437: The following error occurred while executing this line:
/opt/Funambol/ds-server/install/install.xml:452: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
I tried :
Funambol]# sed -i ‘s/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/’ \
> /etc/sysctl.d/bindv6only.conf && sudo invoke-rc.d procps restart
It gives this error:
sed: can’t read /etc/sysctl.d/bindv6only.conf: No such file or directory
and also i’m not using lamp so i dont have ipv6 option in /etc/modprobe.conf
any thoughts …….?
Thanks
Abhi
Like or Dislike:
0
0
Could you tell me what system you are running Funambol on, what version of Funambol would be helpful also.
Since after I installed the latest version of Funambol those problems described in the guide seem to have been fixed.
Like or Dislike:
0
0
Im Installing Funambol 10.0.2 on Centos 5
Like or Dislike:
0
0
Is your CentOS install a 32 or 64bit?
Like or Dislike:
0
0
Try to follow this guide, it’s made for CentOS instead. Just ignore SOGo connector part.
Like or Dislike:
0
0
Thanks for the guide! Trying to get this running on Squeeze. I am not sure whether I need to use localhost or not: mysqladmin -h localhost -u root password some_password
Here they don’t use it: http://wiki.debian.org/FunambolInstallation
Also I am not sure if my JAVA stuff is setup right. This are some messages I got. The Build was succesful but I am not sure how to get it running actually.
# /opt/Funambol/bin/install
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar
[echo] Funambol Data Synchronization Server will be installed on the Tomcat 6.0.x application server
[input] The Funambol Data Synchronization Server installation program can now create the database.
[input] You can skip this step if you have already a valid database created.
[input] If you choose ‘y’ your existing data will be deleted.
[input] Do you want to recreate the database?
[input] (y,n)
y
[sql] Failed to execute: delete from fnbl_principal
[sql] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table ‘funambol.fnbl_principal’ doesn’t exist
[echo] install.modules basedir /opt/Funambol/ds-server
Like or Dislike:
0
0
I’m not sure you followed my guide from start till end, it seems like you have been using different guides.
1) You’ll have to use localhost for mysql if the mysql server is installed on the same machine.
2) Did you install Java on your server, specific the openjdk and jrepackage.
2,a) apt-get install openjdk-6-jdk openjdk-6-jre
If you have installed java try changing the path in the install file to the location of your java installation.
Let me know how it goes.
Like or Dislike:
0
0
Thanks. I will give it a try. Do you need to open ports to the external Internet on your server (via router) to access funambol, or can you just sync (your phone/ laptop) on the local network when you’re home.
Like or Dislike:
0
0
I install funambol on my server. Then I try to sync laptop and phone (n900)
Funambol and mySQL are on the same server. Not sure if this applies to my situation:
“ONLY NEEDED IF USING A REMOTE mySQL SERVER, this makes the mySQL server listen on all interfaces”
Like or Dislike:
0
0
mysqladmin -h localhost -u root password some_password
gives:
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@'localhost’ (using password: NO)’
Like or Dislike:
0
0
Sorry for the spam
I think i solved the passwd problem. I skipped “comment out #bind-address = 127.0.0.1″
No missing JAVA stuff was reported now. How to start Funambol service?
# /opt/Funambol/bin/install
[echo] Funambol Data Synchronization Server will be installed on the Tomcat 6.0.x application server
[echo] Undeploying funambol…
Like or Dislike:
0
0
Do you mean to install the server or to start the service after you have installed it?
If it’s to start funambol service, do like I suggest in the guide:
cp /opt/Funambol/bin/funambol /etc/init.d/
Edit the newly copied start script and change the Funambol home folder location: nano /etc/init.d/funambol
And change: DS_SERVER_HOME=$FUNAMBOL_HOME/ds-server to DS_SERVER_HOME=/opt/Funambol/ds-server
Like or Dislike:
0
0
Thanks so much. It seems that I just have synced my n900 with Evolution mail on Ubuntu via a Debian server!
Like or Dislike:
0
0
No problem Dirk. Best of luck with your funambol installation =).
Like or Dislike:
0
0