funambol: Sync contacts and calendar
Posted 10-03-2011 at 11:13 AM by jere21
Updated 03-11-2012 at 10:57 AM by jere21 (added init script)
Updated 03-11-2012 at 10:57 AM by jere21 (added init script)
- Download funambol server package bundle (including java, webserver tomcat and database Hypersonic):
32 bit: https://www.forge.funambol.org/servl...=FUNBUNDLE-LIN
64 bit: https://www.forge.funambol.org/servl...UNBUNDLE-LIN64 - Install funambol:
Code:chmod +x funambol-10.0.3-x64.bin sudo ./funambol-10.0.3-x64.bin
- "yes" - accept license
- "RETURN" - accept to install to /opt
- "no" - Don't start the server yet
- Replace bundled java with system wide java installation:
- Install java:
Code:ii openjdk-6-jdk 6b24-1.11.1-3 OpenJDK Development Kit (JDK)
- Fix java:
If you are hit by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560044 with these
symptoms:
- http://localhost:8080/webdemo
Login "guest" (password "guest")
--> fails - Code:
sudo /admin/bin/funamboladmin/funamboladmin
--> "Host not found or reachable, please verify the connection parameters" - Code:
$ sudo /opt/Funambol/bin/funambol stop Oct 4, 2011 6:33:15 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: java.net.SocketException: Network is unreachable at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:421) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:337) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415) java.sql.SQLException: socket creation error
Solution:
Code:sudo sed -i 's/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/' \ /etc/sysctl.d/bindv6only.conf && sudo invoke-rc.d procps restart
Code:JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
- http://localhost:8080/webdemo
- Use java:
Add in line 3 of /opt/Funambol/bin/funambol
Code:export JAVA_HOME=/usr/lib/jvm/default-java # export JRE_HOME=$JAVA_HOME (don't know if this is necessary)
- Remove bundled java:
Code:rm -rf /opt/Funambol/tools/jre-1.6.0
- Install java:
- Replace bundled tomcat with system wide tomcat installation:
- Install tomcat:
Note: As of 2012-01-08 I think Funambol does not support tomcat70!
Code:ii tomcat6 6.0.35-1 Servlet and JSP engine
- Reconfigure tomcat (optional):
I have a dual core processor, so I did aCode:sudo dpkg-reconfigure tomcat6
Code:-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
- Use tomcat:
Edit /opt/Funambol/bin/funambol around line 39:
Code:export J2EE_HOME=/usr/share/tomcat6 export CATALINA_HOME=/usr/share/tomcat6 export CATALINA_OUT=/var/log/tomcat6/catalina.out
Code:COMED=false
Code:#unset CATALINA_HOME
Code:J2EE_HOME=/usr/share/tomcat6
- Remove bundled tomcat:
Code:rm -rf /opt/Funambol/tools/tomcat
- Install tomcat:
- Replace bundled hypersonic with system wide mysql installation:
- Install mysql:
Code:ii mysql-server 5.1.58-1 MySQL database server (metapackage depending on the latest version ii libmysql-java 5.1.16-2 Java database (JDBC) driver for MySQL
- Manually create link:
Code:sudo ln -s /usr/share/java/mysql-connector-java.jar /usr/share/tomcat6/lib/mysql-connector-java.jar
- Code:
Create funambol database:
Code:$ mysql -u root -p mysql> create database funambol; mysql> use funambol mysql> GRANT ALL PRIVILEGES ON funambol.* TO 'funambol'@'localhost' IDENTIFIED BY 'funambol'; mysql> flush privileges; mysql> quit
- Replace hypersonic config with mysql
Edit /opt/Funambol/ds-server/install.properties around line 24:
Code:dbms=mysql
Code:jdbc.classpath=/usr/share/java/mysql-connector-java.jar jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost/funambol?characterEncoding=UTF-8 jdbc.user=funambol jdbc.password=funambol
- Remove bundled hypersonic:
Code:rm -rf /opt/Funambol/tools/hypersonic /opt/Funambol/bin/hypersonic*
- Install mysql:
- Start it from the installation or manually with
Code:sudo /opt/Funambol/bin/funambol start
- Verify it's running:
Processes:Code:ps aux | grep -i Funambol root 5716 0.1 2.1 652444 45084 pts/0 Sl Jan07 0:23 /usr/lib/jvm/default-java/bin/java -Dfile.encoding=UTF-8 -Dfunambol.home=/opt/Funambol -Djava.net.preferIPv4Stack=true -Xmx256M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7101 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname= com.funambol.ctp.server.CTPServer root 5730 0.1 2.8 645512 58980 pts/0 Sl Jan07 0:28 /usr/lib/jvm/default-java/bin/java -Dfile.encoding=UTF-8 -Dfunambol.home=/opt/Funambol -Dfunambol.pushlistener.config.bean=com/funambol/email/inboxlistener/InboxListenerConfiguration.xml -Djava.library.path=/opt/Funambol/inbox-listener/lib/x86_64 -Djavax.net.ssl.trustStore=/opt/Funambol/inbox-listener/lib/security/cacerts -Djava.net.preferIPv4Stack=true -Xmx256M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=4101 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname= com.funambol.email.inboxlistener.service.InboxListener root 5735 0.1 2.8 655540 58376 pts/0 Sl Jan07 0:27 /usr/lib/jvm/default-java/bin/java -Dfile.encoding=UTF-8 -Dfunambol.home=/opt/Funambol -Dfunambol.pushlistener.config.bean=com/funambol/pimlistener/PIMListenerConfiguration.xml -Djava.net.preferIPv4Stack=true -Xmx256M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=3101 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname= com.funambol.pimlistener.service.PimListener
Webinterface: http://localhost:8080/funambol
--> yes - Set up the "Real World Test Drive" (see http://funambol.com/docs/v71/funambo...guide-v7.1.pdf)
Code:sudo /opt/Funambol/admin/bin/funamboladmin
- File - Login
I set my static LAN IP 192.18.178.21 instead of the hostname - Server Settings - Server URI:
https://192.168.178.21:8080/funambol/ds - Note: Login "admin", default password "sa"
- File - Login
- Set up my phone Samsung Galaxy S
"Einstellungen" -> "Drahtlos und Netzwerk" -> "Synchronisieren" -> "Neues Sync-Profil"
Profilname: Funambol
Sync.-Kategorie:- Kontakte:
Externe Kontakte: card
Benutzerkennung: [EMPTY!]
Passwort:[EMPTY!] - Kalender:
Externer Kalender: cal
Note: I "deleted" my googlemail calendar on googlemail.com and now always use "Eigener Kalender"
Sync.Server: https://192.168.178.21:8080/funambol/ds
Choose any username and password, the account will be created automatically with the first sync ("user self-provisioning"). - Kontakte:
- Sync: Whenever I'm in my WLAN I can sync: "Einstellungen" -> "Drahtlos und Netzwerk" -> "Synchronisieren" -> "Funambol" -> "Sync. starten"
- Init script
/etc/init.d/funambol:
Code:#! /bin/sh ### BEGIN INIT INFO # Provides: funambol # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: funambol init script # Description: funambol init script ### END INIT INFO # Based upon Debian's /etc/init.d/skeleton # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Funambol" NAME=funambol DAEMON=/opt/Funambol/bin/$NAME SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { $DAEMON start \ || return 2 } # # Function that stops the daemon/service # do_stop() { $DAEMON stop RETVAL="$?" return "$RETVAL" } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 exit 3 ;; esac
Code:sudo chmod +x /etc/init.d/funambol sudo update-rc.d funambol defaults
- Alternatively to the init script, shut it down manually
Code:sudo /opt/Funambol/bin/funambol stop
In the long run, download the bundle, check http://rachaelbond.com/funambol/ and update http://wiki.debian.org/FunambolInstallation
For now, I've omitted the described configuration:
Java browser plugin
JAVA_HOME
The mysql root user password is set during package installation with debconf (the given command in the wiki is wrong anyway)
Code:
ii tinyca 0.7.5-3 simple graphical program for certification authority management
Total Comments 3
Comments
-
I'm getting to STEP 7. I verify that Funambol is running. But when I go to the web browser and enter IP:8080 I get Tomcat. But IP:8080/webdemo results in a 404 error.
Anyway you can help me with this please?Posted 10-13-2013 at 11:50 PM by jim.thornton -
I totally gave up on funambol. But anyway, looks as if you were trying to access it remotely. I'd try it locally first. Good luck!
Posted 10-14-2013 at 11:03 AM by jere21 -
So did you not get any sync'ing going?? If so, how did you do it?
Posted 10-14-2013 at 11:08 AM by jim.thornton