Mozilla Sync Server RPMs

A few weeks ago I wrote about the awesomeness that is Mozilla’s Firefox Sync, a built-in feature of Firefox versions 4 & later which allows for synchronization of bookmarks, history, tabs and password information between multiple systems. (historically known as Weave)

I’ve been running this for a few weeks now on my servers using fully packaged components and it’s been working well, excluding a few minor hick-ups.

It’s taken a bit longer than I would have liked, but I now have stable RPM packages for RHEL/CentOS 5 and 6 for both i386 and x86_64 available publicly.

I always package all software I use on my servers (and even my desktops most of the time) as it makes re-building, upgrading and supporting systems far easier in the long run. By having everything in packages and repos, I can rebuild a server entirely simply by knowing what list of packages were originally installed and their configuration files.

Packaging one’s software is also great when upgrading distribution, as you can get a list of all non-vendor programs and libraries installed and then use the .src.rpm files to build new packages for the new OS release.

 

Packaging Headaches

Mozilla Sync Server was much more difficult to package than I would have liked, mostly due  to the documentation clarity and the number of dependencies.

The primary source of pain was that I run CentOS 5 for a lot of my production systems,which ships with Python 2.4, whereas to run Mozilla Sync Server, you will need Python 2.6 or later.

This meant that I had to build RPMs for a large number (upwards of 20 IIRC) python packages to provide python26 versions of existing system packages. Whilst EPEL had a few of the core ones (such as python26 itself), many of the modules I needed either weren’t packaged, or were only had EPEL packages for Python 2.4.

The other major headache was due to unclear information and in some cases, incorrect documentation from Mozilla.

Mozilla uses the project source name of server-full in the setup documentation, however this isn’t actually the entire “full” application – rather it provides the WSGI executable and some libraries, however you also need server-core, server-reg and server-storage plus a number of python modules to build a complete solution.

Sadly this isn’t entirely clear to anyone reading the setup instructions, the only setup information relates to checking out server-full and running a build script which will go through and download all the dependencies (in theory, it often broke for me) and build a working system, complete with paster web server.

Whilst this would be a handy resource for anyone doing development, it’s pretty useless for someone wanting to package a proper system for deployment since you need to break all the dependencies into separate packages.

(Note that whilst Mozilla refer to having RPM packages for the software components, these have been written for their own inhouse deployment and are not totally suitable for stock systems, not to mention even when you have SPEC files for some of the Mozilla components, you still lack the SPEC files for dependencies.)

To top it off, some information is just flat out wrong and can only be found out by first subscribing to the developer mailing list – in order to gain a login to browse the list archives – so that you can ind such gems as “LDAP doesn’t work and don’t try as it’s being re-written”.

Toss in finding a few bugs that got fixed right around the time I was working on packaging these apps and you can understand if I’m not filled with love for the developers right this moment.

Of course, this is a particularly common open source problem – the team clearly released in a way that made sense to them, and of course everyone would know the difference between server-core/full/reg/storage, etc right?? ;-) I know I’m sometimes guilty of the same thing.

Having said that, the documentation does appear to be getting better and the community is starting to contribute more good documentation resources. I also found a number of people on the mailing list quite helpful and the Mozilla Sync team were really fast and responsive when I opened a bug report, even when it’s a “stupid jethro didn’t hg pull the latest release before testing” issue.

 

Getting My Packages

All the new packages can be found in the Amberdms public package repositories, the instructions on setting up the CentOS 5 or CentOS 6 repos can be found here.

 

RHEL/CentOS 5 Repo Instructions

If you are running RHEL/CentOS 5, you only need to enable amberdms-os, since all the packages will install in parallel to the distribution packages. Nothing in this repo should ever clash with packages released by RedHat, but may clash/be newer than dag or EPEL packages.

 

RHEL/CentOS 6 Repo Instructions

If you are running RHEL/CentOS6, you will need to enable both amberdms-os and amberdms-updates, as some of the python packages that are required are shipped by RHEL, but are too outdated to be used for Mozilla Sync Server.

Note that amberdms-updates may contain newer versions of other packages, so take care when enabling it, as I will have other unrelated RPMs in there. If you only want my newer python packages for mozilla sync, set includepkgs=python-* for amberdms-updates

Also whilst I have tested these packages for Mozilla Sync Server’s requirements, I can’t be sure of their suitability with existing Python applications on your server, so take care when installing these as there’s always a chance they could break something.

 

RHEL/CentOS 5 & 6 Installation Instructions

Prerequisites:

  1. Configured Amberdms Repositories as per above instructions.
  2. Working & configured Apache/httpd server. The packaged programs will work with other web servers, but you’ll have to write your own configuration files for them.

Installation Steps:

  1. Install packages with:
    yum install mozilla-sync-server
  2. Adjust Apache configuration to allow access from desired networks (standard apache IP rules).
    /etc/httpd/conf.d/mozilla-sync-server.conf
  3. Adjust Mozilla Sync Server configuration. If you want to run with the standard sqllite DB (good for initial testing), all you must adjust is line 44 to set the fallback_node value to the correct reachable URL for Firefox clients.
    vi /etc/mozilla-sync-server/mozilla-sync-server.conf
  4. Restart Apache – due to the way mozilla-sync-server uses WSGI, if you make a change to the configuration, there might still be a running process using the existing config. Doing a restart of Apache will always fix this.
    /etc/init.d/httpd restart
  5. Test that you can reach the sync server location and see if anything breaks. These tests will fail if something is wrong such as missing modules or inability to access the database.
    http://host.example.com/mozilla-sync/
    ^ should return 404 if working - anything else indicated error
    
    http://host.example.com/mozilla-sync/user/1.0/a/
    ^ should return 200 with the page output of only 0
  6. There is also a heartbeat page that can be useful when doing automated checks of the service health, although I found it possible to sometimes break the server in ways that would stop sync for Firefox, but still show OK for heartbeat.
    http://host.example.com/mozilla-sync/__heartbeat__
  7. If you experience any issues with the test URLs, check /var/log/httpd/*error_log*. You may experience problems if you’re using https:// with self-signed certificates that aren’t installed in the browser as trusted too, so import your certs properly so they’re trusted.
  8. Mozilla Sync Server is now ready for you to start using with Firefox clients. My recommendation is to use a clean profile you can delete and re-create for testing purposes and only add sync with your actual profile once you’ve confirmed the server is working.

 

Using MySQL instead of SQLite:

I tend to standardise on using MySQL where possible for all my web service applications since I have better and more robust monitoring and backup tools for MySQL databases.

If you want to setup Mozilla Sync Server to use MySQL, it’s best to get it working with SQLite first and then try with MySQL to ensure you don’t have any issues with the basic setup before doing more complex bits.

  1. Obviously the first step should be to setup MySQL server, if you haven’t done this yet, the following command will set it up and take you through a secure setup process to password protect the root DB accounts:
    yum install -y mysql-server
    /etc/init.d/mysqld start
    chkconfig --level 345 mysqld on
    /usr/bin/mysql_secure_installation
  2. Once the MySQL server is running, you’ll need to create a database and user for Mozilla Sync Server to use – this can be done with:
    mysql -u root -p
    # or without -p if no MySQLroot password
    CREATE DATABASE mozilla_sync;
    GRANT ALL PRIVILEGES ON mozilla_sync.* TO mozilla_sync@localhost IDENTIFIED BY  'examplepassword';
    flush privileges;
    \q
  3. Copy the [storage] and [auth] sections from /etc/mozilla-sync-server/sample-configs/mysql.conf to replace the same sections in /etc/mozilla-sync-server/mozilla-sync-server.conf. The syntax for the sqluri line is:
    sqluri = mysql://mozilla_sync:examplepassword@localhost:3306/mozilla_sync
  4. Restart Apache (very important, failing todo so will not apply config changes):
    /etc/init.d/httpd restart
  5. Complete! Test from a Firefox client and check table structure is created with SHOW TABLES; MySQL query to confirm successful configuration.

 

Other Databases

I haven’t done any packaging or testing for it, but Mozilla Sync Server also supports memcached as a storage database, there is a sample configuration file supplied with the RPMs I’ve built, but you may need to also built some python26 modules to support it.

 

Other Platforms?

If you want to package for another platform, the best/most accurate resource on configuring the sync server currently is one by Fabian Wenk about running it on FreeBSD.

I haven’t seen any guides to packaging the application, the TL;DR version is that you’ll essentially need server-full, server-core, server-reg and server-storage, plus all the other python-module dependencies – take a look at the RPM specfiles to get a good idea.

I’ll hopefully do some Debian packages in the near future too, will have to work on improving my deb packaging foo.

 

Warnings, issues, small print, etc.

These packages are still quite beta, they’ve only been tested by me so far and there’s possibly some things in them that are wrong.

I want to go through and clean up some of the Python module RPMs at some stage as I don’t think the SPEC files I have are as portable as they should be, commits back always welcome. ;-)

If you find these packages useful, please let me know in comments or emails, always good to get an idea how people find this stuff and whether it’s worth the late nighters. ;-)

And if you have any problems, feel free to email me or comment on this page and I’ll help out the best I can – I suspect I’ll have to write a Mozilla Sync Server troubleshooting guide at some stage sooner or later.

This entry was posted in Uncategorized and tagged , , , , , , , , , , , . Bookmark the permalink.

31 Responses to Mozilla Sync Server RPMs

  1. Tim Harman says:

    Nice work!
    I looked at building my own Sync Server about a year ago, saw how much effort it was, then promptly gave up.

    So I admire the fact that not only did you get the damn thing to build, you’ve packaged it up as well.

    Tim

    • Jethro Carr says:

      Cheers Tim, yeah it was a bit of a pain but hey, I do this stuff for fun. ;-)

      Sync Server has a bit of a interesting history too, there’s a lot of docs for the older version that was originally in PHP before they moved to Python and the code seems to be getting a lot of work, the issue with this is that it leads to a lot of way outdated documentation online.

      Thankfully the API is stable so I don’t envisioning having to update the server every other week to match client updates, although I see the developers are currently discussions an API version 2, what this will mean for backwards compatibility I’m unsure.

      It was worth it though, loving the integration between devices – now I’m wondering how hard it would be to add support to programs such as my Linux terminals, RSS reader and other applications to use Mozilla Sync Server to share session information between devices…..

  2. Asel says:

    thanks great work

    quick note
    was getting Internal Server Error 500
    looking at /var/log/httpd/error_log
    [Mon Apr 23 12:55:41 2012] [error] [client hidden] DistributionNotFound: wsgiproxy

    indicated missing wsgiproxy

    yum search wsgiproxy
    ============================================== Matched: wsgiproxy ==============================================
    python26-wsgiproxy.noarch : HTTP proxying tools for WSGI apps

    from the name it seemed from you repository, wanted to check, so ran this rpm command:

    rpm -qa –qf ‘%{NAME} %{VENDOR}\n’ | grep wsgi
    python26-wsgiproxy (none)
    python26-mod_wsgi (none)

    then ran:

    rpm -qi python26-wsgiproxy | grep amber Install Date: Mon 23 Apr 2012 12:58:10 PM BST Build Host: devel-centos5-32.local.amberdms.com

    restarted httpd and visited the link and got the 404, so i think i am happy now, going to check out the actual syncing now, i will post again if anything interesting happens

    Regards,
    Asel

    • Jethro Carr says:

      Thanks for that post Asel, I’ll take a look at the packages as it sounds like the python26-wsgiproxy isn’t being included as a dependency like it should.

      Other than this issue, are the packages now working OK for you?

      • Sergio says:

        Hi,
        same issue here, manual ‘yum install python26-wsgiproxy’ was needed
        Centos 5

  3. Peter K says:

    Thanks for this!

    I have tried both SQLite and MySQL on Centos 6.2 x64 and it works fine except of one annoying issue- on my secondary synced laptop I get a prompt that the account password is incorrect. The laptop has been succesfully added and fully synced with the desktop as the primary device and it works for a while but then the account password error starts coming up on the laptop. I was trying to google this and checked the logs but could not spot anything. The password prompt comes up immediately when I switch from wired to wireless connection and unfortunately does not go away after going back to wired. And the actual account password is not accepted. The only fix is to unlink the laptop and sync it again.
    Did you come accross this and where should I look for clues?

    Peter

    • Jethro Carr says:

      That’s a really weird error – when it happens and keeps reusing the password, do you see anything in the access logs on the server?

      (ie, is it trying to connect at all?)

      I’d take a look at about:config and check the sync* configuration options, see if something in particular has changed, although I have no idea why it breaks when changing connection type….

      Did the laptop used to be synced with any other sync servers? Wondering if it’s reverting back to some older settings and maybe trying to authenticate against the wrong server entirely?

      • Peter K says:

        Spot on Jethro, removing Firefox, deleting the installation directory and running CCleaner including registry cleanup did the trick.
        The sync is not crashing anymore after installing a fresh copy of Firefox for more than one week.
        It is impossible to figure out what happened, there is pretty much the same Firefox installation history and collection of plugins on my desktop PC and no issue there whatsoever.

        Thanks a mil,

        Peter

        • Jethro Carr says:

          Good to know – I wonder what was in the profile that lead to it behaving so weirdly. :-/

          At least the plus side of having sync is that it’s much easier to blow away a profile and create a new one now, since all your details just get pulled down at the first sync. ;-)

  4. Worzie says:

    Jethro, thanks for this little gem! I had gone thru doing this server-full build and had no idea there were more parts-pieces.

    I found this by I was looking for a service script to put in my /etc/init.d/. I have a crude one that is for ArchLinux that works to start and stop the service after I had canablaized it some, but, it needs more to get chkconfig –levels working so I don’t have to remember starting it.

    So I thought I’d look at how you are serving it up. I’m not finding a service component however. Saying that without actually installing the RPM’s, just looking in them.

    Also noticed you haven’t updated the RPM’s since March/’12. Have you moved on or do you plan to keep these updated?

    Thanks,
    Worzie

    • Jethro Carr says:

      hi Worzie,

      Glad it’s useful. :-)

      There’s actually no boot scripts for this application – it runs as a web application inside of Apache, rather than as it’s own server daemon. The documentation on Mozilla’s website does reference running it via bin/paster, but that’s using a feature of Python intended for testing web applications, rather than being a production-ready webserver like Apache.

      I’m still using sync server regularly, I haven’t updated it yet as I haven’t had a real pressing need (like a new version of Firefox forcing an update), if they bring out key features/bug fixes I’ll roll a new release – or if I get bored and decide it’s worth doing regardless. ;-)

      regards,
      jethro

  5. Ari T says:

    This is fantastic! Thanks so much for putting it together.

  6. Dan says:

    Followed the install instruction (Running Centos 5.9) Everything appears to be going fine until I try to stop and restart httpd when I get this error.

    Starting httpd: Syntax error on line 8 of /etc/httpd/conf.d/mozilla-sync-server.conf:
    Invalid command ‘WSGIDaemonProcess’, perhaps misspelled or defined by a module not included in the server configuration
    [FAILED]

    • Jethro Carr says:

      hi Dan,

      It sounds like the Python mod_wsgi module isn’t getting loaded correctly by Apache. The RPM should have installed python26-mod_wsgi as a dependency, but if you already have mod_wsgi it can clash and prevent the Python version from working.

      You can check with:
      $ rpm -qi mod_wsgi

      If it is installed and you need to run mod_wsgi, then I’m not sure of the fix – I can’t recall the exact details, but for some reason I needed to use the Python version rather the general mod_wsgi version.

      regards,
      Jethro

      • Dan says:

        You were right in that mod_wsgi was installed. I have removed it and not here are the only wsgi modules currently installed.

        #: /etc/httpd/conf.d: rpm -qa | grep wsgi
        python-wsgiref-0.1.2-3.el5
        python26-mod_wsgi-3.3-1.el5
        python-wsgiproxy-0.1-4.el5
        python26-wsgiproxy-0.1-4.el5

        I am still getting the same error. I do appreciate your assistance.

        • Jethro Carr says:

          Do you get any matches with:
          rpm -qa | grep mod_python
          ?

          If you look at file /etc/httpd/conf.d/python26-mod_wsgi.conf, you can see that it won’t load if there’s mod_python or mod_wsgi present which may be the issue.

          Other possibility is that the mix of python & python26 modules is causing an issue, but seeing as you only have one python*-mod_wsgi package, that seems less likely.

          I’ve double checked and WSGIDaemonProcess is definitely provided by the python26-mod_wsgi package, so based on the error it must not be loading for some reason.

          • Sergio says:

            Hi there!
            I’ve had the same problem and ‘yum erase mod_python’ did the trick.
            I think I installed mod_python while playing with Trac, which I don’t think I’ll need. However, how will this impact other Python-based CGIs ?

  7. Kendrick says:

    would you mind putting in how you did the httpd conf file please. im having a heck of a time getting it to behave. paster works fine but trying a virthost on 5000 just isnt working. with no errors in any log. id rather have it on a virt dir than host any ways.

    • Jethro Carr says:

      hi Kendrick,

      You’ll need Python-WSGI installed on your webserver. The Apache configuration I used looks something like this:

      WSGIDaemonProcess localhost user=apache group=apache processes=2 threads=25
      WSGIScriptAlias /mozilla-sync /usr/share/mozilla-sync-server/mozilla-sync-server.wsgi
      WSGISocketPrefix /var/run/mozilla-sync-server.pid


      # mozilla sync server allows anyone to create an account and use the
      # service. Make sure you only allow trusted/OK users access. If you
      # get 403 errors when attempting sync, check that you’ve set the correct
      # IP ranges below – or set “Allow from all” instead of “Deny from all”.
      #
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1
      Allow from ::1
      Deny from all

      WSGIProcessGroup localhost
      WSGIPassAuthorization On

      • Jethro Carr says:

        You’ll also require:
        python-mod_wsgi
        python-wsgiproxy

        (or your distribution’s appropriate package names)

        These are needed for the WSGI lines to correctly serve up the application.

  8. Patrick Smears says:

    Thanks for this – saved me a huge amount of work :-)

    Did you look at getting the captcha facility to work? When I enabled it I got an unhelpful error on the front end (basically “crash id” plus an md5 hash) when trying to set up sync. After some debugging I think the mako templating system is trying to store its “compiled” templates in somewhere that’s not writable. (For now I’ve just turned captcha back off, but I’d be interested to know whether you’d had more success than me :-) )

    • Jethro Carr says:

      I haven’t sorry – I’m planning to spend some time in the next week or two building the latest release and QA testing the RPMs before releasing, so will include the captcha stuff in my tests to see if a) it works and b) if not, how to fix it. :-)

  9. Jethro Carr says:

    As of today (22nd Sep 2013) I’ve compiled and pushed RPMs for the latest version for both EL 5 & 6. Didn’t have too much need to upgrade, existing server versions still worked fine, but want to keep them current incase newer Firefox versions require it.

  10. sethuper says:

    I have followed step by step in this tutorial, everything is describe, how to install and configure own Firefox Sync Server (Weave) with MySQL.
    http://terminal28.com/how-to-install-and-configure-own-firefox-sync-server-weave-debian/

  11. Paul says:

    **Target WSGI script ‘/usr/share/mozilla-sync-server/mozilla-sync-server.wsgi’ cannot be loaded as Python module.**

    Thank you for your work here. I have tried to set this up following your guide, but have run into an issue. When I try the test URLs you have in your guide I get the following in my error log and don’t know where to go with it.

    [Fri Nov 15 10:03:22 2013] [info] [client 172.20.1.99] mod_wsgi (pid=27875, process=’localhost’, application=’mysite.com|/mozilla-sync’): Loading WSGI script ‘/usr/share/mozilla-sync-server/mozilla-sync-server.wsgi’.
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] mod_wsgi (pid=27875): Target WSGI script ‘/usr/share/mozilla-sync-server/mozilla-sync-server.wsgi’ cannot be loaded as Python module.
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] mod_wsgi (pid=27875): Exception occurred processing WSGI script ‘/usr/share/mozilla-sync-server/mozilla-sync-server.wsgi’.
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] Traceback (most recent call last):
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/share/mozilla-sync-server/mozilla-sync-server.wsgi”, line 74, in
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] application = loadapp(‘config:%s’% ini_file)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py”, line 247, in loadapp
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] return loadobj(APP, uri, name=name, **kw)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py”, line 272, in loadobj
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] return context.create()
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py”, line 710, in create
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] return self.object_type.invoke(self)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py”, line 146, in invoke
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] return fix_call(context.object, context.global_conf, **context.local_conf)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/paste/deploy/util.py”, line 56, in fix_call
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] val = callable(*args, **kw)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/services/baseapp.py”, line 388, in make_app
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] app = klass(urls, controllers, params, auth_class)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/syncstorage/wsgiapp.py”, line 102, in __init__
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] auth_class)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/services/baseapp.py”, line 103, in __init__
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] self.auth = None if auth_class is None else auth_class(self.config)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/services/wsgiauth.py”, line 69, in __init__
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] self.backend = load_and_configure(self.config, ‘auth’)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/services/pluginreg.py”, line 124, in load_and_configure
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] return backend(**params)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/services/user/sql.py”, line 105, in __init__
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] self._engine = create_engine(sqluri, **sqlkw)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/sqlalchemy/engine/__init__.py”, line 263, in create_engine
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] return strategy.create(*args, **kwargs)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/sqlalchemy/engine/strategies.py”, line 66, in create
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] dbapi = dialect_cls.dbapi(**dbapi_args)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] File “/usr/lib/python2.6/site-packages/sqlalchemy/dialects/mysql/mysqldb.py”, line 107, in dbapi
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] return __import__(‘MySQLdb’)
    [Fri Nov 15 10:03:22 2013] [error] [client 172.20.1.99] ImportError: No module named MySQLdb
    [Fri Nov 15 10:03:22 2013] [debug] net/instaweb/apache/mod_instaweb.cc(400): [client 172.20.1.99] ModPagespeed OutputFilter called for request /mozilla-sync/user/1.0/a/
    [Fri Nov 15 10:03:22 2013] [debug] net/instaweb/apache/mod_instaweb.cc(421): [client 172.20.1.99] Request not rewritten because: request->status != 200 (was 500)

  12. Paul says:

    I failed to state when I reposted that no matter what test page (as described in the guide) I try and load, I get this output in the error log.
    Looking for some help in where to go from here.

    • Jethro Carr says:

      hi Paul,

      FYI comments won’t appear until approved via moderation – hence I’ve deleted the duplicate post. :-)

      In regards to your problem, it looks like maybe the Python MySQL DB package is missing…. it is possible I’ve messed up some permissions.

      Please check if the python26-mysqldb package is installed, and if not, yum install it and restart Apache.

      regards,
      Jethro

      • Paul says:

        Thank you Jethro, that was it – missing the python26-mysqldb package.
        I also ran into a problem when the captcha was enabled as described in an earlier reply. Once I turned off the captcha I was able to partially set up sync.
        When I do, it loads a page, stating Setup Complete and your first sync. When I look in the database, only a user is created, no other fields in any tables are populated.
        The error log only show this:
        [Mon Nov 18 06:34:02 2013] [error] 2013-11-18 06:34:02,299 INFO [syncserver] 172.20.1.99 – – [18/Nov/2013:06:34:02 -0700] “GET /mozilla-sync/user/1.0/a HTTP/1.1” 200 1 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0”
        [Mon Nov 18 06:34:02 2013] [error] 172.20.1.99 – – [18/Nov/2013:06:34:02 -0700] “GET /mozilla-sync/user/1.0/a HTTP/1.1” 200 1 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0”
        [Mon Nov 18 06:34:02 2013] [error] 2013-11-18 06:34:02,318 INFO [syncserver] 172.20.1.99 – – [18/Nov/2013:06:34:02 -0700] “GET /mozilla-sync/user/1.0/p6vymr4bglfcv3ogesqbvxpciuzikwux HTTP/1.1” 200 1 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0”
        [Mon Nov 18 06:34:02 2013] [error] 172.20.1.99 – – [18/Nov/2013:06:34:02 -0700] “GET /mozilla-sync/user/1.0/p6vymr4bglfcv3ogesqbvxpciuzikwux HTTP/1.1” 200 1 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0”
        [Mon Nov 18 06:34:02 2013] [error] 2013-11-18 06:34:02,334 INFO [syncserver] 172.20.1.99 – – [18/Nov/2013:06:34:02 -0700] “GET /mozilla-sync/misc/1.0/captcha_html HTTP/1.1” 404 175 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0”
        [Mon Nov 18 06:34:02 2013] [error] 172.20.1.99 – – [18/Nov/2013:06:34:02 -0700] “GET /mozilla-sync/misc/1.0/captcha_html HTTP/1.1” 404 175 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0”
        [Mon Nov 18 06:34:02 2013] [debug] net/instaweb/apache/mod_instaweb.cc(400): [client 172.20.1.99] ModPagespeed OutputFilter called for request /mozilla-sync/misc/1.0/captcha_html
        [Mon Nov 18 06:34:02 2013] [debug] net/instaweb/apache/mod_instaweb.cc(421): [client 172.20.1.99] Request not rewritten because: request->status != 200 (was 404)
        [Mon Nov 18 06:34:10 2013] [debug] net/instaweb/apache/mod_instaweb.cc(400): [client 123.125.71.107] ModPagespeed OutputFilter called for request /
        [Mon Nov 18 06:34:10 2013] [debug] net/instaweb/apache/mod_instaweb.cc(569): [client 123.125.71.107] Request not rewritten because: ModPagespeed off
        [Mon Nov 18 06:34:12 2013] [debug] net/instaweb/apache/instaweb_handler.cc(1034): [client 172.20.1.99] Not rewriting non-GET request: 1.
        [Mon Nov 18 06:34:12 2013] [error] 2013-11-18 06:34:12,856 INFO [syncserver] 172.20.1.99 – – [18/Nov/2013:06:34:12 -0700] “PUT /mozilla-sync/user/1.0/p6vymr4bglfcv3ogesqbvxpciuzikwux HTTP/1.1” 200 32 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0”
        [Mon Nov 18 06:34:12 2013] [error] 172.20.1.99 – – [18/Nov/2013:06:34:12 -0700] “PUT /mozilla-sync/user/1.0/p6vymr4bglfcv3ogesqbvxpciuzikwux HTTP/1.1” 200 32 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0”
        [Mon Nov 18 06:34:12 2013] [debug] net/instaweb/apache/mod_instaweb.cc(400): [client 172.20.1.99] ModPagespeed OutputFilter called for request /mozilla-sync/user/1.0/p6vymr4bglfcv3ogesqbvxpciuzikwux
        [Mon Nov 18 06:34:12 2013] [debug] net/instaweb/apache/mod_instaweb.cc(569): [client 172.20.1.99] Request not rewritten because: ModPagespeed off
        [Mon Nov 18 06:34:13 2013] [error] 2013-11-18 06:34:13,434 INFO [syncserver] 172.20.1.99 – – [18/Nov/2013:06:34:13 -0700] “GET /mozilla-sync/user/1.0/p6vymr4bglfcv3ogesqbvxpciuzikwux/node/weave HTTP/1.1” 200 22 “-” “Firefox/24.0 FxSync/1.26.0.20130910160258.desktop”
        [Mon Nov 18 06:34:13 2013] [error] 172.20.1.99 – – [18/Nov/2013:06:34:13 -0700] “GET /mozilla-sync/user/1.0/p6vymr4bglfcv3ogesqbvxpciuzikwux/node/weave HTTP/1.1” 200 22 “-” “Firefox/24.0 FxSync/1.26.0.20130910160258.desktop”
        [Mon Nov 18 06:34:13 2013] [debug] net/instaweb/apache/mod_instaweb.cc(400): [client 172.20.1.99] ModPagespeed OutputFilter called for request /mozilla-sync/user/1.0/p6vymr4bglfcv3ogesqbvxpciuzikwux/node/weave
        [Mon Nov 18 06:34:13 2013] [debug] net/instaweb/apache/mod_instaweb.cc(569): [client 172.20.1.99] Request not rewritten because: ModPagespeed off
        [Mon Nov 18 06:34:15 2013] [debug] net/instaweb/apache/mod_instaweb.cc(400): [client 220.181.108.153] ModPagespeed OutputFilter called for request /
        [Mon Nov 18 06:34:15 2013] [debug] net/instaweb/apache/mod_instaweb.cc(569): [client 220.181.108.153] Request not rewritten because: ModPagespeed off
        [Mon Nov 18 06:35:02 2013] [debug] net/instaweb/apache/mod_instaweb.cc(400): [client 127.0.0.1] ModPagespeed OutputFilter called for request /
        [Mon Nov 18 06:35:02 2013] [debug] net/instaweb/apache/mod_instaweb.cc(569): [client 127.0.0.1] Request not rewritten because: ModPagespeed off

        • Paul says:

          I’ve since enabled mod-pagespeed to clean up some of the error, but no change in what is happening. I found the sync log (about:sync:log) and see this output when attempting to set up sync. I don’t know what login is failing since it is definitely logging into mysql and creating the user. I see the email and other info in the user table when I do this. No other tables ever get populated.

          1385307379219 Sync.ErrorHandler DEBUG Flushing file log.
          1385307379220 Sync.Service DEBUG Exception: Login failed: error.login.reason.network No traceback available
          1385307379220 Sync.Service DEBUG Not syncing: login returned false.
          1385307379220 Sync.Status DEBUG Status.service: error.login.failed => success.status_ok
          1385307379223 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307379227 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307379237 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307379334 Sync.ErrorHandler DEBUG Log cleanup threshold time: 1384443379334
          1385307379338 Sync.ErrorHandler DEBUG No logs to clean up.
          1385307400622 Sync.Tracker.History DEBUG Saving changed IDs to history
          1385307422438 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307424275 Sync.Tracker.Clients DEBUG client.name preference changed
          1385307424275 Sync.Tracker.Clients WARN Attempted to add undefined ID to tracker
          1385307427872 Sync.AddonsReconciler DEBUG Removing change listener.
          1385307427872 Sync.AddonsReconciler DEBUG Stopping listening and removing AddonManager listeners.
          1385307427874 Sync.Status INFO Resetting Status.
          1385307427874 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307427874 Sync.Identity INFO Sync Key has no value. Deleting.
          1385307427874 Sync.Status DEBUG Status.login: success.login => error.login.reason.no_recoverykey
          1385307427874 Sync.Status DEBUG Status.service: success.status_ok => service.client_not_configured
          1385307427875 Sync.Status DEBUG Status.login: error.login.reason.no_recoverykey => error.login.reason.no_recoverykey
          1385307427875 Sync.Status DEBUG Status.service: service.client_not_configured => service.client_not_configured
          1385307427875 Sync.Status DEBUG Status.login: error.login.reason.no_recoverykey => error.login.reason.no_recoverykey
          1385307427875 Sync.Status DEBUG Status.service: service.client_not_configured => service.client_not_configured
          1385307427876 Sync.SyncScheduler DEBUG Clearing sync triggers and the global score.
          1385307432164 Sync.Service WARN Deleting client data for clients failed:NS_ERROR_CONNECTION_REFUSED JS Stack trace: Res_delete@resource.js:434 < removeClientData@clients.js:144 < startOver@service.js:856 < gSyncPane.startOver@sync.js:124 < onclick@preferences.xul:1
          1385307433934 Sync.Service WARN Deleting client data for tabs failed:NS_ERROR_CONNECTION_REFUSED JS Stack trace: Res_delete@resource.js:434 < removeClientData@tabs.js:73 < startOver@service.js:856 < gSyncPane.startOver@sync.js:124 error.login.reason.no_username
          1385307463826 Sync.Status DEBUG Status.service: service.client_not_configured => service.client_not_configured
          1385307478422 Sync.Identity INFO Username changed. Removing stored credentials.
          1385307478422 Sync.Identity INFO Basic password has no value. Removing.
          1385307478422 Sync.Identity INFO Sync Key has no value. Deleting.
          1385307504602 Sync.UserAPI INFO Create account response: 200 rsknui7rulvialdiekdl2il65vs7gcmu5ar
          1385307504603 Sync.Identity INFO Basic password being updated.
          1385307504603 Sync.Identity INFO Sync Key being updated.
          1385307504605 Sync.SyncKeyBundle INFO SyncKeyBundle being created.
          1385307504608 Sync.Identity DEBUG Updating saved password for rsknui7rulvialdiekdl2il65vs7gcmu5ar in Mozilla Services Password
          1385307504740 Sync.Identity DEBUG Updating saved password for rsknui7rulvialdiekdl2il65vs7gcmu5ar in Mozilla Services Encryption Passphrase
          1385307504873 Sync.Status DEBUG Status.service: service.client_not_configured => success.status_ok
          1385307504874 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307504969 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307504969 Sync.AddonsReconciler INFO Registering as Add-on Manager listener.
          1385307504969 Sync.AddonsReconciler DEBUG Adding change listener.
          1385307505201 Sync.Service DEBUG User-Agent: Firefox/24.0 FxSync/1.26.0.20130910160258.
          1385307505201 Sync.Service INFO Starting sync at 2013-11-24 07:38:25
          1385307505201 Sync.Service DEBUG In sync: should login.
          1385307505202 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307505202 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
          1385307505202 Sync.Service INFO Logging in user rsknui7rulvialdiekdl2il65vs7gcmu5ar
          1385307505202 Sync.Service DEBUG Finding cluster for user rsknui7rulvialdiekdl2il65vs7gcmu5ar
          1385307505307 Sync.Resource DEBUG mesg: GET success 200 http://mysite.com/mozilla-sync/user/1.0/rsknui7rulvialdiekdl2il65vs7gcmu5ar/node/weave
          1385307505307 Sync.Resource DEBUG GET success 200 http://mysite.com/mozilla-sync/user/1.0/rsknui7rulvialdiekdl2il65vs7gcmu5ar/node/weave
          1385307505308 Sync.Service DEBUG Cluster value = http://localhost:5000/
          1385307505308 Sync.Service DEBUG Setting cluster to http://localhost:5000/
          1385307505308 Sync.Service DEBUG Caching URLs under storage user base: http://localhost:5000/1.1/rsknui7rulvialdiekdl2il65vs7gcmu5ar/
          1385307509695 Sync.Service DEBUG verifyLogin failed: NS_ERROR_CONNECTION_REFUSED JS Stack trace: Res_get@resource.js:413 < verifyLogin@service.js:681 < onNotify@service.js:924 < WrappedNotify@util.js:142 < WrappedLock@util.js:97 < WrappedCatch@util.js:71 < login@service.js:935 < @service.js:1172 < WrappedCatch@util.js:71 error.login.reason.network
          1385307509695 Sync.Status DEBUG Status.service: success.status_ok => error.login.failed
          1385307509695 Sync.Status DEBUG Status.login: error.login.reason.network => error.login.reason.network
          1385307509695 Sync.Status DEBUG Status.service: error.login.failed => error.login.failed
          1385307509696 Sync.SyncScheduler DEBUG Clearing sync triggers and the global score.
          1385307509696 Sync.SyncScheduler DEBUG Next sync in 86400000 ms.

  13. superlupo says:

    Thank you very much for your work. Just installed on CentOS 6 without any troubles.
    Unfortunately, Mozilla changed their sync service with Firefox 29, the old sync method will probably not be available longer than for FF 31 or 32.
    I would love it if you could find the time packaging server 1.5, but of course it seems bold demanding something for free ;)

    • Jethro Carr says:

      thanks Superlupo,

      Sadly I don’t think I’ll be building packages for their new sync service – after they broke sync with the new generation, I decided to shift over to Chrome using their client-side encryption feature with sync.

      regards,
      Jethro

Leave a Reply