Code Monkey home page Code Monkey logo

syncserver's People

Contributors

1wilkens avatar alexfornuto avatar callahad avatar captn3m0 avatar clecle226 avatar demacr avatar dev-rke avatar fengshaun avatar fmstrat avatar fzzzy avatar gplaza avatar jrconlin avatar mathstuf avatar mavidser avatar mhammond avatar michaing avatar mikesager avatar mozilla-github-standards avatar murchu27 avatar okin avatar petrcech avatar pjenvey avatar pmkohn avatar rfk avatar sbach avatar sbraz avatar thomcc avatar thornbill avatar tublitzed avatar vladikoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

syncserver's Issues

Add a script for removing user data on mozilla servers

This was suggested on the mailing list - we should ship a simple script that self-hosters can use to clear any data they have stored on the mozilla-hosted servers. That way they can easily recover from any inadvertent syncs that happened before they got self-hosting set up correctly.

New issue with umemcache

Similarly to #50 I'm experiencing problems with umemcache.

I already have CFLAGS = "-Wno-error -Wno-error=format-security" as per the git make file, so not sure what's going wrong here.

I've pasted the whole log here https://pastebin.mozilla.org/8836445

Cleaning up...
Command /var/www/syncserver/local/bin/python2 -c "import setuptools, tokenize;__file__='/var/www/syncserver/local/build/umemcache/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-C3Yjo_-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/syncserver/local/include/site/python2.7 failed with error code 1 in /var/www/syncserver/local/build/umemcache
Storing debug log for failure in /root/.pip/pip.log
Makefile:22: recipe for target 'local/COMPLETE' failed
make: *** [local/COMPLETE] Error 1 

Unable to fetch collections against local syncserver

TL;DR

Using production Firefox Accounts against local syncserver fails: unable to fetch collections. Reports application crash, but appears to remain up and running.

Context

The functional tests pass.
SyncServer is running on localhost:5000.
Firefox is set to use http://localhost:5000/token/1.0/sync/1.5 as its tokenServerURI.

Steps to Reproduce

  1. Disconnect from Sync
  2. In about:config, set services.sync.tokenServerURI to the above value. (Note: You have to do this every time. Disconnecting from Sync resets the tokenServerURI.)
  3. Open the Browser Console, turn on Request/Response Body Logging, and sign into Sync

What Happens:

GET https://accounts.firefox.com/config [HTTP/1.1 304 Not Modified 48ms]
POST https://api.accounts.firefox.com/v1/account/login [HTTP/1.1 200 OK 424ms]
GET https://api.accounts.firefox.com/v1/recovery_email/status [HTTP/1.1 200 OK 62ms]
GET https://api.accounts.firefox.com/v1/account/keys [HTTP/1.1 200 OK 83ms]
POST https://api.accounts.firefox.com/v1/certificate/sign [HTTP/1.1 200 OK 68ms]
GET http://localhost:5000/token/1.0/sync/1.5 [HTTP/1.0 200 OK 621ms]
GET http://localhost:5000/storage/1.5/1/info/collections [HTTP/1.0 503 Service Unavailable 21ms]

Followed by a JavaScript error:

A promise chain failed to handle a rejection.

Date: Thu Mar 20 2014 11:37:26 GMT-0500 (CDT)
Full Message: no user is logged in
Full Stack: JS frame :: resource://services-sync/browserid_identity.js :: this.BrowserIDManager.prototype.initializeWithCurrentIdentity/< :: line 182
JS frame :: resource://gre/modules/Promise.jsm :: Handler.prototype.process :: line 767
JS frame :: resource://gre/modules/Promise.jsm :: this.PromiseWalker.walkerLoop :: line 531
native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0

The GET http://localhost:5000/storage/1.5/1/info/collections has a response body of:

"application error: crash id 6bea0e4a77b24a741d6990a7cb07cb24"

But as far as I can tell, the server is still up and running:

curl localhost:5000
it works!

Have a less strict version control on requirements if possible

Hi,
On my environment, virtualenv 1.11.4 was deployed but sync server requires a strict 1.11.1 version.

Not a big issue but requiring a more soft version should be better like 1.11+ if necessary.

Is there a given reason to stick with 1.11.1 ?

Thanks,
Nicolas

public url of in mod_wsgi returned wrong

Hi there.

I just setup sync server 1.5 from this repository following the Tutorial:
https://docs.services.mozilla.com/howtos/run-sync-1.5.html#howto-run-sync15
apache2 2.2.22-13+deb7u3
libapache2-mod-wsgi 3.3-4+deb7u1

This will almost certainly cause authentication failures!
public_url setting is: https://domain.de:5000
application url is: https://domain.de

But sporadically i get errors about mismatching urls and on that device synching won't work. I imagine, that the non-matching urls cause the request to fail with firefox accounts server. The public_url is the one i also use to access the server:
services.sync.tokenServerURI https://domain.de:5000/token/1.0/sync/1.5
public_url: https://domain.de:5000
but the application url is shown as:
application url: https://domain.de
the port is stripped for some reason.

Changing th public_url i get:
This will almost certainly cause authentication failures!
public_url setting is: https://domain.de
application url is: https://domain.de:5000

Is this a configuration problem or a bug?
Which is equally wrong and not working just the other way around.

Problem with BrowserID verifier (cannot sync)

1447629550355   Sync.BrowserIDManager   INFO    Waiting for user to be verified.
1447629550355   FirefoxAccounts DEBUG   already verified
1447629550356   Sync.BrowserIDManager   INFO    Starting fetch for key bundle.
1447629550356   FirefoxAccounts DEBUG   already verified
1447629550356   Sync.BrowserIDManager   INFO    Getting an assertion from: https://DOMAIN/ffsync/token/1.0/sync/1.5
1447629550357   FirefoxAccounts DEBUG   enter getAssertion()
1447629550360   FirefoxAccounts DEBUG   getKeypairAndCertificate: already have keyPair and certificate
1447629550360   FirefoxAccounts DEBUG   getAssertionFromCert
1447629550363   FirefoxAccounts DEBUG   getAssertionFromCert returning signed: true
1447629550364   Sync.BrowserIDManager   DEBUG   Getting a token
1447629550365   Common.TokenServerClient    DEBUG   Beginning BID assertion exchange: https://DOMAIN/ffsync/token/1.0/sync/1.5
1447629550631   Common.TokenServerClient    DEBUG   Got token response: 502
1447629550631   Sync.RESTResponse   TRACE   Processing response headers.
1447629550631   Common.TokenServerClient    WARN    Did not receive JSON response. Misconfigured server?
1447629550631   Common.TokenServerClient    DEBUG   Content-Type: text/html
1447629550631   Common.TokenServerClient    DEBUG   Body: <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>

1447629550632   Sync.BrowserIDManager   ERROR   Non-authentication error in _fetchTokenForUser: TokenServerClientServerError({"now":"2015-11-15T23:19:10.632Z","message":"Non-JSON response.","cause":"malformed-response","response_body":"<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.6.2</center>\r\n</body>\r\n</html>\r\n","response_headers":{"server":"nginx/1.6.2","date":"Sun, 15 Nov 2015 23:19:03 GMT","content-type":"text/html","content-length":"172","connection":"keep-alive"},"response_status":502}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < [email protected]:76:62 < @sync.js:459:1 < [email protected]:137:7 < @main.js:30:1 < [email protected]:137:7 < [email protected]:21:3 < [email protected]:4774:9 < [email protected]:2484:13 < [email protected]:221:12 < [email protected]:828:5 < [email protected]:999:9 < [email protected]:2672:5 < [email protected]:58:7
1447629550634   Sync.Status DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1447629550634   Sync.Status DEBUG   Status.service: error.login.failed => error.login.failed
1447629550634   browserwindow.syncui    DEBUG   observed: weave:ui:login:error
1447629550635   browserwindow.syncui    DEBUG   onLoginError: login=error.login.reason.network, sync=success.sync
1447629550635   browserwindow.syncui    DEBUG   _loginFailed has sync state=error.login.reason.network
1447629550639   Sync.BrowserIDManager   ERROR   Background fetch for key bundle failed: TokenServerClientServerError({"now":"2015-11-15T23:19:10.632Z","message":"Non-JSON response.","cause":"malformed-response","response_body":"<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.6.2</center>\r\n</body>\r\n</html>\r\n","response_headers":{"server":"nginx/1.6.2","date":"Sun, 15 Nov 2015 23:19:03 GMT","content-type":"text/html","content-length":"172","connection":"keep-alive"},"response_status":502}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < [email protected]:76:62 < @sync.js:459:1 < [email protected]:137:7 < @main.js:30:1 < [email protected]:137:7 < [email protected]:21:3 < [email protected]:4774:9 < [email protected]:2484:13 < [email protected]:221:12 < [email protected]:828:5 < [email protected]:999:9 < [email protected]:2672:5 < [email protected]:58:7
1447629550642   Sync.BrowserIDManager   ERROR   Could not authenticate: TokenServerClientServerError({"now":"2015-11-15T23:19:10.632Z","message":"Non-JSON response.","cause":"malformed-response","response_body":"<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.6.2</center>\r\n</body>\r\n</html>\r\n","response_headers":{"server":"nginx/1.6.2","date":"Sun, 15 Nov 2015 23:19:03 GMT","content-type":"text/html","content-length":"172","connection":"keep-alive"},"response_status":502}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < [email protected]:76:62 < @sync.js:459:1 < [email protected]:137:7 < @main.js:30:1 < [email protected]:137:7 < [email protected]:21:3 < [email protected]:4774:9 < [email protected]:2484:13 < [email protected]:221:12 < [email protected]:828:5 < [email protected]:999:9 < [email protected]:2672:5 < [email protected]:58:7
1447629550644   FirefoxAccounts DEBUG   FxAccountsProfileClient: Requested profile
1447629550645   FirefoxAccounts DEBUG   getOAuthToken enter
1447629550647   FirefoxAccounts TRACE   getCachedToken returning cached token
1447629550647   FirefoxAccounts DEBUG   getOAuthToken returning a cached token
1447629550651   browserwindow.syncui    DEBUG   observed: weave:service:login:error
1447629550651   browserwindow.syncui    DEBUG   onActivityStop with numActive: 1
1447629550651   browserwindow.syncui    DEBUG   _loginFailed has sync state=error.login.reason.network
1447629550651   Sync.SyncScheduler  DEBUG   Clearing sync triggers and the global score.
1447629550652   Sync.SyncScheduler  DEBUG   Next sync in 3600000 ms.
1447629550652   Sync.ErrorHandler   ERROR   Sync encountered a login error

Don't know how to fix this. I'm using a Firefox account in combination with my own 1.5 Sync server which worked fine on my previous VPS. The bad gateway error seems to be from my webserver, but when I go to the URL that I set in the about:config it tells me "it works" and i'm not authorised.

Provide option to force WSGI environ to match public_url

For folks running in reverse-proxy situations where we just can't convince the servers to reconstruct public_url correctly, we should offer a force_wsgi_environ config option that will just override everything with the values from public_url.

SQLite ProgrammingError during make test

While reinstalling for my other issue (just making sure - my stomach tells me I ran into some module installation problems) I get the following error when running make test after make build. Seems to me that some resources in /usr/lib/python2.7/ are used which I guess is not desired.

thanks,
a.

make test
# Basic syntax and sanity checks.
local/bin/flake8 ./syncserver
# Testcases from syncstorage app
local/bin/nosetests -s syncstorage.tests
..................................................................SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS..SSSSSSSSSSSSSSSS...SS...............
----------------------------------------------------------------------
Ran 233 tests in 60.883s

OK (SKIP=147)
# Testcases from tokenserver app; broken due to incorrect file paths
#local/bin/nosetests -s tokenserver.tests
# Live tests against a running server.
./local/bin/pserve syncserver/tests.ini & SERVER_PID=$! ; sleep 2 ; ./local/bin/python -m syncstorage.tests.functional.test_storage --use-token-server http://localhost:5000/token/1.0/sync/1.5 ; kill $SERVER_PID
Starting server in PID 28043.
serving on 0.0.0.0:5000 view at http://127.0.0.1:5000
No handlers could be found for logger "sqlalchemy.pool.QueuePool"
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/path/to/syncserver/local/lib/python2.7/site-packages/syncstorage/tests/functional/test_storage.py", line 1270, in <module>
    res = run_live_functional_tests(TestStorage, sys.argv)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/syncstorage/tests/functional/support.py", line 178, in run_live_functional_tests
    creds = authenticate_to_token_server(url, opts.email, opts.audience)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/syncstorage/tests/functional/support.py", line 110, in authenticate_to_token_server
    r.raise_for_status()
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/requests/models.py", line 765, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 47280)
Traceback (most recent call last):
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/paste/httpserver.py", line 1068, in process_request_in_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
    self.handle()
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/paste/httpserver.py", line 442, in handle
    BaseHTTPRequestHandler.handle(self)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/paste/httpserver.py", line 437, in handle_one_request
    self.wsgi_execute()
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/paste/httpserver.py", line 287, in wsgi_execute
    self.wsgi_start_response)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/router.py", line 251, in __call__
    response = self.invoke_subrequest(request, use_tweens=True)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/router.py", line 227, in invoke_subrequest
    response = handle_request(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/tokenserver/tweens.py", line 15, in set_x_timestamp_header_tween
    response = handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 115, in fuzz_backoff_headers_tween
    response = handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 71, in log_uncaught_exceptions_tween
    return handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 37, in catch_backend_errors_tween
    return handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 120, in convert_non_json_responses_tween
    response = handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 96, in convert_cornice_errors_to_respcodes_tween
    response = handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 52, in set_default_accept_header_tween
    return handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 29, in set_x_timestamp_header_tween
    response = handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/router.py", line 161, in handle_request
    response = view_callable(context, request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 588, in __call__
    return view(context, request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 321, in attr_view
    return view(context, request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 297, in predicate_wrapper
    return view(context, request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 347, in rendered_view
    result = view(context, request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 493, in _requestonly_view
    response = view(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/cornice/service.py", line 514, in wrapper
    response = view_(request)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/metlog/decorators/base.py", line 154, in __call__
    return self._real_call(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/metlog/decorators/base.py", line 151, in _real_call
    return replacement(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/mozsvc/metrics.py", line 150, in metlog_call
    return self._fn(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/metlog/decorators/base.py", line 154, in __call__
    return self._real_call(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/metlog/decorators/base.py", line 151, in _real_call
    return replacement(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/metlog/decorators/stats.py", line 50, in metlog_call
    result = self._fn(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/metlog/decorators/base.py", line 154, in __call__
    return self._real_call(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/metlog/decorators/base.py", line 151, in _real_call
    return replacement(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/metlog/decorators/stats.py", line 36, in metlog_call
    return self._fn(*args, **kwargs)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/tokenserver/views.py", line 186, in return_token
    user = backend.get_user(service, email)
  File "/path/to/syncserver/syncserver/staticnode.py", line 110, in get_user
    res = self._engine.execute(_GET_USER_RECORDS, **params)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1598, in execute
    return connection.execute(statement, *multiparams, **params)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 664, in execute
    return meth(self, multiparams, params)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 282, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 761, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 828, in _execute_context
    None, None)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1013, in _handle_dbapi_exception
    self._autorollback()
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 556, in _autorollback
    self._rollback_impl()
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 476, in _rollback_impl
    self._handle_dbapi_exception(e, None, None, None, None)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 991, in _handle_dbapi_exception
    exc_info
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 185, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 473, in _rollback_impl
    self.engine.dialect.do_rollback(self.connection)
  File "/path/to/syncserver/local/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 358, in do_rollback
    dbapi_connection.rollback()
ProgrammingError: (ProgrammingError) SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 1078348544 and this is thread id 1089506112 None None

Token.assertion.invalid_signature_error on Fresh Install

Self hosted FxA and Sync, FxA seems to operate fine but sync 1.5 is throwing errors. It seems there is a hard coded verifier URL in ./local/lib/python2.7/site-packages/tokenserver/verifiers.py of "verifier.accounts.firefox.com," but I'm not sure exactly what that's doing, or why a self-hosted service would be using the firefox.com servers. The below configurations were used with a fresh git, and a reset fxa and sync database.

The below errors occurred when registering a new user and after the verification of email. Email shows as verified in the fxa database.

As a note, the sync database tables are created, but no records are placed in the DB.

Sync output:

[Wed Jul 23 17:19:23 2014] [error] INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): verifier.accounts.firefox.com
[Wed Jul 23 17:19:24 2014] [error] INFO:mozsvc.metrics:{"code": 200, "request_time": 0.5247030258178711, "remoteAddressChain": ["192.168.3.99"], "token.assertion.invalid_signature_error": 1, "agent": "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0", "token.assertion.verify_failure": 1, "tokenserver.assertion.verify": 0.5226249694824219, "path": "https://firefox-vm.domain.local:1443/token/1.0/sync/1.5", "method": "GET"}

Firefox's sync error-log:

1406150201322   Sync.Service    INFO    Loading Weave 1.33.0
1406150201323   Sync.Engine.Clients DEBUG   Engine initialized
1406150201323   Sync.Engine.Clients DEBUG   Resetting clients last sync time
1406150201326   Sync.Engine.Bookmarks   DEBUG   Engine initialized
1406150201327   Sync.Engine.Forms   DEBUG   Engine initialized
1406150201329   Sync.Engine.History DEBUG   Engine initialized
1406150201330   Sync.Engine.Passwords   DEBUG   Engine initialized
1406150201331   Sync.Engine.Prefs   DEBUG   Engine initialized
1406150201332   Sync.Engine.Tabs    DEBUG   Engine initialized
1406150201333   Sync.Engine.Tabs    DEBUG   Resetting tabs last sync time
1406150201335   Sync.Engine.Addons  DEBUG   Engine initialized
1406150201336   Sync.Service    INFO    Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
1406150201337   Sync.SyncScheduler  DEBUG   Clearing sync triggers and the global score.
1406150201337   Sync.Status DEBUG   Status.login: success.login => error.login.reason.no_username
1406150201337   Sync.Status DEBUG   Status.service: success.status_ok => service.client_not_configured
1406150201337   Sync.Status DEBUG   Status.login: error.login.reason.no_username => error.login.reason.no_username
1406150201337   Sync.Status DEBUG   Status.service: service.client_not_configured => service.client_not_configured
1406150201340   Sync.Status DEBUG   Status.login: error.login.reason.no_username => error.login.reason.no_username
1406150201340   Sync.Status DEBUG   Status.service: service.client_not_configured => service.client_not_configured
1406150201340   Sync.Status DEBUG   Status.login: error.login.reason.no_username => error.login.reason.no_username
1406150201340   Sync.Status DEBUG   Status.service: service.client_not_configured => service.client_not_configured
1406150201340   FirefoxAccounts DEBUG   setSignedInUser - aborting any existing flows
1406150201340   Sync.Tracker.Clients    WARN    Changed IDs file clients contains non-object value.
1406150201342   Sync.Tracker.Passwords  WARN    Changed IDs file passwords contains non-object value.
1406150201343   Sync.Tracker.Addons WARN    Changed IDs file addons contains non-object value.
1406150201344   FirefoxAccounts INFO    An accountState promise was resolved, but was actually rejected due to a different user being signed in. Originally resolved with: null
1406150201348   FirefoxAccounts DEBUG   Notifying observers of fxaccounts:onlogin
1406150201348   Sync.BrowserIDManager   DEBUG   observed fxaccounts:onlogin
1406150201348   FirefoxAccounts DEBUG   startVerifiedCheck {"email":"[email protected]","uid":"1d032a9bb6e445d58b2530a8b652ff6d","unwrapBKey":"6bbd3c3ebae84b44a158a5e39c579293dbb70cb536c23c256f7a643b67c81622","keyFetchToken":"b17f7c7c7259df986f39bd326a160223ef2cfcb094c9dd1dc4e0615c200bcbb5","sessionToken":"fd3648c941e36e17fd8cf6919a5e090fb2cbb84eb50333f50083d2f908e5699d","sessionTokenContext":"fx_desktop_v1","customizeSync":false}
1406150201348   FirefoxAccounts DEBUG   whenVerified promise starts polling for verified email
1406150201348   FirefoxAccounts DEBUG   entering pollEmailStatus: start
1406150201352   FirefoxAccounts DEBUG   startVerifiedCheck {"email":"[email protected]","uid":"1d032a9bb6e445d58b2530a8b652ff6d","unwrapBKey":"6bbd3c3ebae84b44a158a5e39c579293dbb70cb536c23c256f7a643b67c81622","keyFetchToken":"b17f7c7c7259df986f39bd326a160223ef2cfcb094c9dd1dc4e0615c200bcbb5","sessionToken":"fd3648c941e36e17fd8cf6919a5e090fb2cbb84eb50333f50083d2f908e5699d","sessionTokenContext":"fx_desktop_v1","customizeSync":false}
1406150201352   Sync.BrowserIDManager   INFO    Username changed. Removing stored credentials.
1406150201352   Sync.BrowserIDManager   INFO    Waiting for user to be verified.
1406150201377   FirefoxAccounts DEBUG   (Response) /recovery_email/status: code: 200 - Status text: OK
1406150201377   FirefoxAccounts DEBUG   Clock offset vs https://firefox-vm.domain.local:19000/v1: 18623
1406150201377   FirefoxAccounts DEBUG   checkEmailStatus -> {"email":"[email protected]","verified":false}
1406150201377   FirefoxAccounts DEBUG   polling with step = 3000
1406150201377   FirefoxAccounts DEBUG   time remaining: 297000
1406150201377   FirefoxAccounts DEBUG   started timer 19
1406150204378   FirefoxAccounts DEBUG   entering pollEmailStatus: timer
1406150204402   FirefoxAccounts DEBUG   (Response) /recovery_email/status: code: 200 - Status text: OK
1406150204403   FirefoxAccounts DEBUG   Clock offset vs https://firefox-vm.domain.local:19000/v1: 18597
1406150204403   FirefoxAccounts DEBUG   checkEmailStatus -> {"email":"[email protected]","verified":false}
1406150204403   FirefoxAccounts DEBUG   polling with step = 3000
1406150204403   FirefoxAccounts DEBUG   time remaining: 294000
1406150204403   FirefoxAccounts DEBUG   started timer 20
1406150207404   FirefoxAccounts DEBUG   entering pollEmailStatus: timer
1406150207425   FirefoxAccounts DEBUG   (Response) /recovery_email/status: code: 200 - Status text: OK
1406150207425   FirefoxAccounts DEBUG   Clock offset vs https://firefox-vm.domain.local:19000/v1: 18575
1406150207426   FirefoxAccounts DEBUG   checkEmailStatus -> {"email":"[email protected]","verified":false}
1406150207426   FirefoxAccounts DEBUG   polling with step = 3000
1406150207426   FirefoxAccounts DEBUG   time remaining: 291000
1406150207426   FirefoxAccounts DEBUG   started timer 21
1406150210427   FirefoxAccounts DEBUG   entering pollEmailStatus: timer
1406150210449   FirefoxAccounts DEBUG   (Response) /recovery_email/status: code: 200 - Status text: OK
1406150210449   FirefoxAccounts DEBUG   Clock offset vs https://firefox-vm.domain.local:19000/v1: 18551
1406150210449   FirefoxAccounts DEBUG   checkEmailStatus -> {"email":"[email protected]","verified":true}
1406150210458   Sync.BrowserIDManager   INFO    Starting fetch for key bundle.
1406150210458   FirefoxAccounts DEBUG   fetchKeys: true
1406150210461   Sync.BrowserIDManager   INFO    Fetching assertion and token from: https://firefox-vm.domain.local:1443/token/1.0/sync/1.5
1406150210461   FirefoxAccounts DEBUG   already verified
1406150210647   FirefoxAccounts DEBUG   (Response) /account/keys: code: 200 - Status text: OK
1406150210648   FirefoxAccounts DEBUG   Clock offset vs https://firefox-vm.domain.local:19000/v1: 18352
1406150210649   FirefoxAccounts DEBUG   Keys Obtained: kA=true, kB=true
1406150210657   FirefoxAccounts DEBUG   Notifying observers of fxaccounts:onverified
1406150210658   Sync.BrowserIDManager   DEBUG   Getting an assertion
1406150210658   FirefoxAccounts DEBUG   enter getAssertion()
1406150210665   FirefoxAccounts DEBUG   got keyPair
1406150210666   FirefoxAccounts DEBUG   getCertificateSigned: true true
1406150210874   FirefoxAccounts DEBUG   (Response) /certificate/sign: code: 200 - Status text: OK
1406150210874   FirefoxAccounts DEBUG   Clock offset vs https://firefox-vm.domain.local:19000/v1: 18126
1406150210874   FirefoxAccounts DEBUG   getCertificate got a new one: true
1406150210875   FirefoxAccounts DEBUG   getAssertionFromCert
1406150210877   FirefoxAccounts DEBUG   getAssertionFromCert returning signed: true
1406150210877   Sync.BrowserIDManager   DEBUG   Getting a token
1406150213120   Sync.BrowserIDManager   ERROR   Authentication error in _fetchTokenForUser: AuthenticationError(TokenServerClientServerError({"now":"2014-07-23T21:16:53.119Z","message":"Authentication failed.","cause":"invalid-credentials","response_body":"{\"status\": \"invalid-credentials\", \"errors\": [{\"location\": \"body\", \"name\": \"\", \"description\": \"Unauthorized\"}]}","response_headers":{"date":"Wed, 23 Jul 2014 21:17:09 GMT","server":"Apache/2.2.15 (CentOS)","x-weave-timestamp":"1406150232.13","x-timestamp":"1406150232","content-length":"110","connection":"close","content-type":"application/json; charset=UTF-8"},"response_status":401}))
1406150213120   Sync.Status DEBUG   Status.login: error.login.reason.no_username => error.login.reason.account
1406150213120   Sync.Status DEBUG   Status.service: service.client_not_configured => error.login.failed
1406150213120   Sync.SyncScheduler  DEBUG   Clearing sync triggers and the global score.

syncserver.ini:

[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000

[app:main]
use = egg:syncserver

[syncserver]
# This must be edited to point to the public URL of your server,
# i.e. the URL as seen by Firefox.
public_url = https://firefox-vm.domain.local:1443/

# This defines the database in which to store all server data.
#sqluri = sqlite:////tmp/syncserver.db
sqluri = pymysql://root@localhost/sync

# This is a secret key used for signing authentication tokens.
# It should be long and randomly-generated.
# The following command will give a suitable value on *nix systems:
#
#    head -c 20 /dev/urandom | sha1sum
#
# If not specified then the server will generate a temporary one at startup.
secret = REMOVEDBUTCHANGED

# Set this to "false" to disable new-user signups on the server.
# Only request by existing accounts will be honoured.
# allow_new_users = false

auth-config.json:

{
    "env": "prod",
    "publicUrl": "https://firefox-vm.domain.local:19000",
    "db": {
        "backend": "mysql"
    },
    "listen": {
        "host": "0.0.0.0",
        "port": 9000
    },
    "useHttps": false,
    "contentServer": {
        "url": "https://firefox-vm.domain.local:13030"
    },
    "smtp": {
        "host": "mail-vm.domain.local",
        "port": 25,
        "secure": false,
        "sender": "[email protected]",
        "redirectDomain": "domain.com",
        "resendBlackoutPeriod": 0
    },
    "log": {
        "level": "trace"
    },
    "customsUrl": "none"
}

content-config.json:

{
  "fxaccount_url": "https://firefox-vm.domain.local:19000",
  "public_url": "https://firefox-vm.domain.local:13030",
  "fxaccount_proxy": {
    "enabled": false
  },
  "oauth_url": "http://127.0.0.1:9010",
  "oauth_proxy": {
    "enabled": true
  },
  "client_sessions": {
    "cookie_name": "session",
    "secret": "REMOVEDBUTCHANGED",
    "duration": 86400000
  },
  "env": "production",
  "static_max_age" : 0,
  "i18n": {
    "supportedLanguages": ["af", "an", "ar", "as", "ast", "be", "bg", "bn-BD", "bn-IN", "br", "bs", "ca", "cs", "cy", "da", "de", "el", "en-GB", "en-US", "en-ZA", "eo", "es", "es-AR", "es-CL", "es-MX", "et", "eu", "fa", "ff", "fi", "fr", "fy", "fy-NL", "ga", "ga-IE", "gd", "gl", "gu", "gu-IN", "he", "hi-IN", "hr", "ht", "hu", "hy-AM", "id", "is", "it", "it-CH", "ja", "kk", "km", "kn", "ko", "ku", "lij", "lt", "lv", "mai", "mk", "ml", "mr", "ms", "nb-NO", "ne-NP", "nl", "nn-NO", "or", "pa", "pa-IN", "pl", "pt", "pt-BR", "pt-PT", "rm", "ro", "ru", "si", "sk", "sl", "son", "sq", "sr", "sr-LATN", "sv", "sv-SE", "ta", "te", "th", "tr", "uk", "ur", "vi", "xh", "zh-CN", "zh-TW", "zu"]
  },
  "route_log_format": "dev_fxa",
  "static_directory": "app",
  "metrics": {
    "sample_rate": 0
  },
  "use_https": false,
  "port": 3030,
  "http_port": 3080,
}

apache conf:

SSLPassPhraseDialog  builtin
SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin

LoadModule wsgi_module modules/mod_wsgi.so

<Directory /opt/sync-server/syncserver>
  Order deny,allow
  Allow from all
</Directory>

WSGISocketPrefix /var/run/wsgi
#WSGIPythonHome /opt/sync-server/syncserver/local/lib/python2.7
#WSGIPythonHome /opt/rh/python27/root/usr/bin/python

Listen 1443
<VirtualHost _default_:1443>
    ServerName firefox-vm.domain.local
    DocumentRoot /opt/sync-server/syncserver
    WSGIProcessGroup sync
    WSGIDaemonProcess sync user=firefox group=firefox processes=2 threads=25 python-path=/opt/sync-server/syncserver/local/lib/python2.7/site-packages/
    WSGIPassAuthorization On
    WSGIScriptAlias / /opt/sync-server/syncserver/syncserver.wsgi
    LogLevel warn
    SSLEngine on
    SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
    SSLCertificateFile /etc/pki/tls/domain/remote.domain.com-reissue.cer
    SSLCertificateKeyFile /etc/pki/tls/domain/remote.domain.com-reissue.key
    SSLCertificateChainFile /etc/pki/tls/domain/RapidSSL_CA_bundle.crt
    <Files ~ "\.(cgi|shtml|phtml|php3?)$">
        SSLOptions +StdEnvVars
    </Files>
    <Directory "/var/www/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>
    SetEnvIf User-Agent ".*MSIE.*" \
        nokeepalive ssl-unclean-shutdown \
        downgrade-1.0 force-response-1.0
    CustomLog logs/access_log_1443 combined
    ErrorLog logs/error_log_1443
</VirtualHost>

Listen 13030
<VirtualHost _default_:13030>
    ServerName firefox-vm.domain.local
    LogLevel warn
    SSLEngine on
    SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
    SSLCertificateFile /etc/pki/tls/domain/remote.domain.com-reissue.cer
    SSLCertificateKeyFile /etc/pki/tls/domain/remote.domain.com-reissue.key
    SSLCertificateChainFile /etc/pki/tls/domain/RapidSSL_CA_bundle.crt
    <Files ~ "\.(cgi|shtml|phtml|php3?)$">
        SSLOptions +StdEnvVars
    </Files>
    <Directory "/var/www/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>
    SetEnvIf User-Agent ".*MSIE.*" \
        nokeepalive ssl-unclean-shutdown \
        downgrade-1.0 force-response-1.0
    ProxyPass / http://localhost:3030/
    ProxyPassReverse / http://localhost:3030/
    CustomLog logs/access_log_13030 combined
    ErrorLog logs/error_log_13030
</VirtualHost>


Listen 19000
<VirtualHost _default_:19000>
    ServerName firefox-vm.domain.local
    LogLevel warn
    SSLEngine on
    SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
    SSLCertificateFile /etc/pki/tls/domain/remote.domain.com-reissue.cer
    SSLCertificateKeyFile /etc/pki/tls/domain/remote.domain.com-reissue.key
    SSLCertificateChainFile /etc/pki/tls/domain/RapidSSL_CA_bundle.crt
    <Files ~ "\.(cgi|shtml|phtml|php3?)$">
        SSLOptions +StdEnvVars
    </Files>
    <Directory "/var/www/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>
    SetEnvIf User-Agent ".*MSIE.*" \
        nokeepalive ssl-unclean-shutdown \
        downgrade-1.0 force-response-1.0
    ProxyPass / http://localhost:9000/
    ProxyPassReverse / http://localhost:9000/
    CustomLog logs/access_log_19000 combined
    ErrorLog logs/error_log_19000
</VirtualHost>

Debian has a newer dependency on WebOb than Ubuntu; resulting in failed tests & refusal to run

Hello,

I'm trying to set up a syncserver using the guide from docs.services.mozilla, but for some unknown reason it keeps failing on me.

  • make build works (gives warnings, but no errors)
  • make test fails 3 tests:
    • test_weird_args (syncstorage.tests.functional.test_old_storage.TestOldStorage)
    • test_overquota (syncstorage.tests.functional.test_storage.TestStorage)
    • test_weird_args (syncstorage.tests.functional.test_storage.TestStorage)
  • trying to run the make serve results in a failure (return code 3). Running the gunicorn command manually results in no visible output (even with debug & logging on), and the is port unreachable.

The three tests all fail with the same error (full traceback for one is available here: http://pastebin.com/iQhYwnTS):

 File "/home/user/syncserver/local/local/lib/python2.7/site-packages/webob/response.py", line 107, in __init__
    self.status = status
File "/home/user/syncserver/local/local/lib/python2.7/site-packages/webob/response.py", line 268, in _status__set
    raise ValueError('Invalid status code, integer required.')
ValueError: Invalid status code, integer required.

I've tested this on a RPi (Raspbian) & regular Debian Wheezy, and confirmed against an Ubuntu 14.04.

I've done a compare from the locally installed PIP packages and this is the result:

Package Debian version Ubuntu version 14.04 LTS
WebOb 1.5.0b0 1.4.1
distribute 0.6.24 -

Downgrading the WebOb version to 1.4.1 fixed the issue with the tests and the make serve command.

For future reference, this are the two commands needed to fix it:

./local/bin/pip uninstall WebOb
./local/bin/pip install WebOb==1.4.1

A suggestion to prevent this (rather obscure) error would be limiting the used pip version, or altering the code so that the 1.5 branch also would be supported.

I'll leave the issue open for now, so that it can be discussed if necessary.

FF sync server with nginx and https fails with "egg:gunicorn" method

Hello,

I tried to setup ffsync server in my nginx webserver environment using a https address. I followed the official howto and got it setup and running to a certain degree with the "use = egg:Paste#http" method.
When pointing my browser to the respective webaddress I get the expected empty page stating "It works". The log say something like:

INFO:mozsvc.metrics:{"code": 200, "request_time": 0.016633987426757812, "remoteAddressChain": ["::ffff:85.177.202.8", "127.0.0.1"], "agent": "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:33.0) Gecko/20100101 Firefox/33.0", "path": "http://my-server.net/ffsync/", "method": "GET"}

But when I try to configure the appropriate variable "services.sync.tokenServerURI" in FF and Sign in (to mozilla account server) sync fails with an authentication error and the following log message:

INFO:mozsvc.metrics:{"code": 401, "request_time": 1.8790898323059082, "remoteAddressChain": ["::ffff:85.177.202.8", "127.0.0.1"], "agent": "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:33.0) Gecko/20100101 Firefox/33.0", "token.assertion.audience_mismatch_error": 1, "token.assertion.verify_failure": 1, "tokenserver.assertion.verify": 1.8432259559631348, "path": "http://my-server.net/ffsync/token/1.0/sync/1.5", "method": "GET"}

I am aware that the howto states I should use the "use = egg:gunicorn" method after installing it via local/bin/easy_install gunicorn (states it installed version 19.1.1), however I was not able to make it work that way at all, as it always fails with the following error message:

!!!
!!! WARNING: This command is deprecated.
!!!
!!! You should now use the --paste option. Ex.:
!!!
!!! gunicorn --paste development.ini
!!!
!!!

Config error: invalid literal for int() with base 0: '2\xe2\x80\xa8'
Exiting 1 (-v to see traceback)

What am I doing wrong? Any help would be highly appreciated!
Does it probably have to do with the nginx https incompatibilities I read about here?

Thank you for your help!
Cheers,
Nix


PS: Here are the respective config excepts:

  1. syncserver.ini:

[server:main]
use = egg:gunicorn
host = 127.0.0.1
port = 8070
workers = 2
timeout = 60

[syncserver]
public_url = http://my-server.net/ffsync/

2.nginx:

location /ffsync/ {
access_log /var/log/nginx/ffsync.access.log;
error_log /var/log/nginx/ffsync.error.log;
rewrite ^/ffsync(.+)$ $1 break;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_read_timeout 120;
proxy_connect_timeout 10;
proxy_pass http://127.0.0.1:8070/ffsync;
}

Unable to authenticate

I don't know if it is a bug or if I just need help. Please feel free to redirect me.
I am using a self-hosted syncserver, using nginx and gunicorn, with the official Firefox Accounts server.

However, whatever the protocol (http, https), I always encounter the same message:

1408781598688   Sync.BrowserIDManager   ERROR   Could not authenticate: AuthenticationError(TokenServerClientServerError({"now":"2014-08-23T08:13:18.684Z","message":"Authentication failed.","cause":"invalid-credentials","response_body":"{\"status\": \"invalid-credentials\", \"errors\": [{\"location\": \"body\", \"name\": \"\", \"description\": \"Unauthorized\"}]}","response_headers":{"server":"nginx","date":"Sat, 23 Aug 2014 08:13:18 GMT","content-type":"application/json; charset=UTF-8","content-length":"110","connection":"keep-alive","x-weave-timestamp":"1408781598.68","x-timestamp":"1408781598"},"response_status":401}))

I did so many tests that it is hard to remember everything, but I think that without nginx in front of it (and using a custom port), it used to work. However, I double check the documentation to ensure I have exactly the same configuration…

SSL errors while building under Debian

Debian Version: 8.0
Kernel: 3.16.0.4-amd64
Python: 2.7.9
Openssl: 1.0.1k-3
Apache: 2.4.10-10
libapache2-mod-wsgi: 4.3.0-1

Configuration files:
syncserver.ini
https://pastebin.mozilla.org/8834612

sync.conf (/etc/apache2/sites-available)
https://pastebin.mozilla.org/8834613

Steps to reproduce:

git clone https://github.com/mozilla-services/syncserver /opt/syncserver/
cd /opt/syncserver
make build (successful)
make test (this passes)
systemctl restart apache2 (to re-load the syncserver wsgi)
/opt/syncserver/local/bin/python -m syncstorage.tests.functional.test_storage --use-token-server https://sync.example.com/token/1.0/sync/1.5 (This fails)

Error message in logs: (Full trace: https://pastebin.mozilla.org/8834611)

AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'

Current resolution:
Upgrading requests to 2.7.0 - ./local/bin/pip install --upgrade requests

Possible long-term resolution:

Changing requests version in requirements.txt to 2.7.0

Hope this information helps

Setting maximum threads in the pool

Hi!

Is there any way to limit the number of threads that "pserve" runs by default? I guess it's some sort of python webserver and I'd like to tweak it a little bit.
Thanks!

Postgres - Table bso fails at initialisation

Hi,
With PGSQL 9.3.4, when running "local/bin/gunicorn_paster syncserver.ini", I got:

File "/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 388, in do_execute
cursor.execute(statement, parameters)
ProgrammingError: (ProgrammingError) type modifier is not allowed for type "text"
LINE 8: payload TEXT(262144) DEFAULT '' NOT NULL,
^
"\nCREATE TABLE bso (\n\tuserid INTEGER NOT NULL, \n\tcollection INTEGER NOT NULL, \n\tid VARCHAR(64) NOT NULL, \n\tsortindex INTEGER, \n\tmodified BIGINT NOT NULL, \n\tpayload TEXT(262144) DEFAULT '' NOT NULL, \n\tpayload_size INTEGER DEFAULT 0 NOT NULL, \n\tttl INTEGER DEFAULT 2100000000, \n\tPRIMARY KEY (userid, collection, id)\n)\n\n" {}
2014-04-10 21:45:10 [19344] [INFO] Worker exiting (pid: 19344)
2014-04-10 21:45:10 [19338] [INFO] Shutting down: Master
2014-04-10 21:45:10 [19338] [INFO] Reason: Worker failed to boot.

What I have so far in my schema:

[admin@steinmetz syncserver]$ psql -U mozfxsync -d mozfxsync
Password for user mozfxsync:
psql (9.3.4)
Type "help" for help..
mozfxsync=> \dt
public | collections | table | mozfxsync
public | user_collections | table | mozfxsync

Seems lynked with this line : https://github.com/mozilla-services/server-syncstorage/blob/master/syncstorage/storage/sql/dbconnect.py#L107

And maybe latest commit : mozilla-services/server-syncstorage@97fd393 ?

Hope it helps,
Nicolas

document self-hosting syncserver + fxa-account-server from scratch

This is something missing, esp. the actual configuration in syncserver to check locally browserId assertions signed by local fxa-auth-server.

As a starting point I've documented here what I've done to get it working (runlocal branches contain my config):
https://github.com/elelay/syncserver/blob/runlocal/LocalInstall.md

What's missing is the mysql datastore for fxa-auth-server. This is required once the initial setup test passes. It is well documented in fxa-auth-server/Readme.md

Excessive requirements entries

Right now, our requirements.txt includes development tools like pep8, pyflakes, sphinx, docutils, and coverage. It also pulls in argparse, which is part of the standard library as of Python 2.7.

Not to mention our Makefile, which manually installs flake8, nose, and a newer copy of distribute.

We need to audit our requirements.txt, ideally splitting it into two files: one for development / testing tools, and one for running the actual sync service.

Need to run db migrations when updating the repo

The tokenserver includes some db migration scripts, which will need to be run when updating the tokenserver version bundled with this install. Ideally we should provide a make update target that does all this automatically.

nginx/syncserver 503 error / connection_error/ verify_failure

Following this guide (in german), after getting the auth server running, I'm having a problem running the sync server.
It is set up behind a nginx ssl reverse proxy, just as the auth and auth-api server (which both seem to work fine).
The sync server only shows this in his output (line breaks inserted for readability):

$ make serve
./local/bin/pserve ./syncserver.ini
/home/mozillasync/syncserver/local/local/lib/python2.7/site-packages/tokenserver/verifiers.py:47:
FutureWarning: The BrowserID certificate format has not been finalized and may change in
backwards-incompatible ways.  If you find that the latest version of this module cannot verify a valid
BrowserID assertion, please contact the author.
  super(LocalVerifier, self).__init__(**kwargs)
Starting server in PID 29076.
!!!
!!! WARNING: This command is deprecated.
!!! 
!!!     You should now use the `--paste` option. Ex.:
!!! 
!!!         gunicorn --paste development.ini
!!!     
!!!

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): myurl.com
INFO:mozsvc.metrics:{"code": 503, "request_time": 0.19293904304504395,
"remoteAddressChain": ["myexternalip", "127.0.0.1"],
"agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0",
"token.assertion.connection_error": 1, "token.assertion.verify_failure": 1,
"tokenserver.assertion.verify": 0.18337583541870117,
"path": "https://myurl.com/token/1.0/sync/1.5", "method": "GET"}

The "INFO" messages repeat every time a sync seems to run. Is this related to the browserid check? I thought I had configured the browserID verification appropriately:

[browserid]
backend = tokenserver.verifiers.LocalVerifier
audiences = *

The ngnix log has this in the error log:

2015/01/26 00:27:40 [error] 2334#0: *388 connect() failed (111: Connection refused) while connecting to upstream, client: 91.119.55.0, server: mydomain, request: "GET /token/1.0/sync/1.5 HTTP/1.1", upstream: "http://127.0.0.1:5000/token/1.0/sync/1.5", host: "mydomain"

I'm at a loss at how to proceed. What do the errors refer? Any additional logs I could check?
Sorry if this is not the correct place to report this, if so could you point me to the correct one?

Any help is much appreciated!

postgresql 9.2 as storage database does not work

Hello,
when I try to use postgresql as backed I get following error in my httpd log

[Wed Sep 16 15:02:12.144047 2015] [:error] [pid 1115] [remote 195.146.151.118:128] mod_wsgi (pid=1115): Exception occurred processing WSGI script '/usr/local/src/syncserver/syncserver.wsgi'.
[Wed Sep 16 15:02:12.144558 2015] [:error] [pid 1115] [remote 195.146.151.118:128] Traceback (most recent call last):
[Wed Sep 16 15:02:12.144582 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/router.py", line 242, in call
[Wed Sep 16 15:02:12.144610 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = self.invoke_subrequest(request, use_tweens=True)
[Wed Sep 16 15:02:12.144623 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/router.py", line 217, in invoke_subrequest
[Wed Sep 16 15:02:12.144653 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = handle_request(request)
[Wed Sep 16 15:02:12.144667 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/tokenserver/tweens.py", line 15, in set_x_timestamp_header_tween
[Wed Sep 16 15:02:12.144687 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = handler(request)
[Wed Sep 16 15:02:12.144699 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 120, in convert_non_json_responses_tween
[Wed Sep 16 15:02:12.144719 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = handler(request)
[Wed Sep 16 15:02:12.144731 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 96, in convert_cornice_errors_to_respcodes_tween
[Wed Sep 16 15:02:12.144749 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = handler(request)
[Wed Sep 16 15:02:12.144761 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 52, in set_default_accept_header_tween
[Wed Sep 16 15:02:12.144790 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return handler(request)
[Wed Sep 16 15:02:12.144815 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 29, in set_x_timestamp_header_tween
[Wed Sep 16 15:02:12.144855 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = handler(request)
[Wed Sep 16 15:02:12.144880 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 94, in fuzz_backoff_headers_tween
[Wed Sep 16 15:02:12.144914 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = handler(request)
[Wed Sep 16 15:02:12.144929 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 59, in log_uncaught_exceptions_tween
[Wed Sep 16 15:02:12.144949 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return handler(request)
[Wed Sep 16 15:02:12.144960 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 26, in catch_backend_errors_tween
[Wed Sep 16 15:02:12.144978 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return handler(request)
[Wed Sep 16 15:02:12.144989 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
[Wed Sep 16 15:02:12.145007 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = handler(request)
[Wed Sep 16 15:02:12.145018 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/router.py", line 163, in handle_request
[Wed Sep 16 15:02:12.145036 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = view_callable(context, request)
[Wed Sep 16 15:02:12.145047 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 596, in call
[Wed Sep 16 15:02:12.145065 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return view(context, request)
[Wed Sep 16 15:02:12.145076 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 329, in attr_view
[Wed Sep 16 15:02:12.145103 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return view(context, request)
[Wed Sep 16 15:02:12.145115 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 305, in predicate_wrapper
[Wed Sep 16 15:02:12.145133 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return view(context, request)
[Wed Sep 16 15:02:12.145144 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 245, in _secured_view
[Wed Sep 16 15:02:12.145161 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return view(context, request)
[Wed Sep 16 15:02:12.145172 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 355, in rendered_view
[Wed Sep 16 15:02:12.145189 2015] [:error] [pid 1115] [remote 195.146.151.118:128] result = view(context, request)
[Wed Sep 16 15:02:12.145200 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 501, in requestonly_view
[Wed Sep 16 15:02:12.145217 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = view(request)
[Wed Sep 16 15:02:12.145228 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/cornice/service.py", line 514, in wrapper
[Wed Sep 16 15:02:12.145246 2015] [:error] [pid 1115] [remote 195.146.151.118:128] response = view
(request)
[Wed Sep 16 15:02:12.145257 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/views/util.py", line 53, in wrapper
[Wed Sep 16 15:02:12.145274 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return decorator_func(target_func, _args, *_kwds)
[Wed Sep 16 15:02:12.145286 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/views/decorators.py", line 35, in convert_storage_errors
[Wed Sep 16 15:02:12.145304 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return viewfunc(request)
[Wed Sep 16 15:02:12.145315 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/views/util.py", line 53, in wrapper
[Wed Sep 16 15:02:12.145332 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return decorator_func(target_func, _args, *_kwds)
[Wed Sep 16 15:02:12.145344 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/views/decorators.py", line 59, in sleep_and_retry_on_conflict
[Wed Sep 16 15:02:12.145362 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return viewfunc(request)
[Wed Sep 16 15:02:12.145372 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/views/util.py", line 53, in wrapper
[Wed Sep 16 15:02:12.145390 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return decorator_func(target_func, _args, *_kwds)
[Wed Sep 16 15:02:12.145401 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/views/decorators.py", line 180, in with_collection_lock
[Wed Sep 16 15:02:12.145419 2015] [:error] [pid 1115] [remote 195.146.151.118:128] with lock_collection(userid, collection):
[Wed Sep 16 15:02:12.145430 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/lib64/python2.7/contextlib.py", line 17, in enter
[Wed Sep 16 15:02:12.145466 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return self.gen.next()
[Wed Sep 16 15:02:12.145482 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/sql/init.py", line 173, in lock_for_read
[Wed Sep 16 15:02:12.145519 2015] [:error] [pid 1115] [remote 195.146.151.118:128] ts = session.query_scalar("LOCK_COLLECTION_READ", params)
[Wed Sep 16 15:02:12.145535 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/sql/init.py", line 727, in query_scalar
[Wed Sep 16 15:02:12.145554 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return self.connection.query_scalar(query, params, default)
[Wed Sep 16 15:02:12.145566 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/sql/dbconnect.py", line 650, in query_scalar
[Wed Sep 16 15:02:12.145585 2015] [:error] [pid 1115] [remote 195.146.151.118:128] res = self.execute(query, params, annotations)
[Wed Sep 16 15:02:12.145597 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/sql/dbconnect.py", line 422, in report_backend_errors_wrapper
[Wed Sep 16 15:02:12.145615 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return func(self, _args, *_kwds)
[Wed Sep 16 15:02:12.145626 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/sql/dbconnect.py", line 516, in execute
[Wed Sep 16 15:02:12.145644 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return self._exec_with_cleanup(connection, query_str, *_params)
[Wed Sep 16 15:02:12.145655 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/mozsvc/metrics.py", line 183, in timed_func
[Wed Sep 16 15:02:12.145673 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return func(_args, *_kwds)
[Wed Sep 16 15:02:12.145684 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/sql/dbconnect.py", line 550, in _exec_with_cleanup
[Wed Sep 16 15:02:12.145702 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return connection.execute(sqltext(query_str), *_params)
[Wed Sep 16 15:02:12.145713 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 720, in execute
[Wed Sep 16 15:02:12.145731 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return meth(self, multiparams, params)
[Wed Sep 16 15:02:12.145742 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection
[Wed Sep 16 15:02:12.145760 2015] [:error] [pid 1115] [remote 195.146.151.118:128] return connection._execute_clauseelement(self, multiparams, params)
[Wed Sep 16 15:02:12.145772 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 817, in _execute_clauseelement
[Wed Sep 16 15:02:12.145789 2015] [:error] [pid 1115] [remote 195.146.151.118:128] compiled_sql, distilled_params
[Wed Sep 16 15:02:12.145800 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 947, in _execute_context
[Wed Sep 16 15:02:12.145817 2015] [:error] [pid 1115] [remote 195.146.151.118:128] context)
[Wed Sep 16 15:02:12.145829 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1108, in _handle_dbapi_exception
[Wed Sep 16 15:02:12.145846 2015] [:error] [pid 1115] [remote 195.146.151.118:128] exc_info
[Wed Sep 16 15:02:12.145857 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 185, in raise_from_cause
[Wed Sep 16 15:02:12.145883 2015] [:error] [pid 1115] [remote 195.146.151.118:128] reraise(type(exception), exception, tb=exc_tb)
[Wed Sep 16 15:02:12.145895 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 940, in _execute_context
[Wed Sep 16 15:02:12.145913 2015] [:error] [pid 1115] [remote 195.146.151.118:128] context)
[Wed Sep 16 15:02:12.145924 2015] [:error] [pid 1115] [remote 195.146.151.118:128] File "/usr/local/src/syncserver/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 435, in do_execute
[Wed Sep 16 15:02:12.145942 2015] [:error] [pid 1115] [remote 195.146.151.118:128] cursor.execute(statement, parameters)
[Wed Sep 16 15:02:12.145996 2015] [:error] [pid 1115] [remote 195.146.151.118:128] ProgrammingError: (ProgrammingError) syntax error at or near "LOCK"
[Wed Sep 16 15:02:12.146006 2015] [:error] [pid 1115] [remote 195.146.151.118:128] LINE 1: ... user_collections WHERE userid=1 AND collection=0 LOCK IN SH...
[Wed Sep 16 15:02:12.146009 2015] [:error] [pid 1115] [remote 195.146.151.118:128] ^
[Wed Sep 16 15:02:12.146013 2015] [:error] [pid 1115] [remote 195.146.151.118:128] '/* [queryName=LOCK_COLLECTION_READ] */ SELECT last_modified FROM user_collections WHERE userid=%(userid)s AND collection=%(collectionid)s LOCK IN SHARE MODE' {'userid': 1, 'collectionid': 0}

Latest makefile breaks out updating-the-server-instructions

The docs give the following sequence for updating the server (from https://docs.services.mozilla.com/howtos/run-sync-1.5.html#updating-the-server):

$ cd /path/to/syncserver
$ git stash       # to save any local changes to the config file
$ git pull        # to fetch latest updates from github
$ git stash pop   # to re-apply any local changes to the config file
$ make build      # to pull in any updated dependencies

This doesn't work with the latest makefile, because it lists $(ENV) as a dependency for make build and $(ENV) has no dependencies. So the make build just does nothing.

[make test] SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I'm using cacert.org and this CA is installed in /etc/ssl/certs/ca-certificates.crt

[root@intelnuc syncserver]# make test
# Basic syntax and sanity checks.
local/bin/flake8 ./syncserver
# Testcases from syncstorage app
local/bin/nosetests -s syncstorage.tests
..................................................................SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS..SSSSSSSSSSSSSSSS...SS...............
----------------------------------------------------------------------
Ran 233 tests in 39.551s

OK (SKIP=147)
# Testcases from tokenserver app; broken due to incorrect file paths
#local/bin/nosetests -s tokenserver.tests
# Live tests against a running server.
./local/bin/pserve syncserver/tests.ini & SERVER_PID=$! ; sleep 2 ; ./local/bin/python -m syncstorage.tests.functional.test_storage --use-token-server https://sync.gitnote.eu/token/1.0/sync/1.5 ; kill $SERVER_PID
Starting server in PID 24669.
2014-04-02 12:06:48 [24669] [INFO] Starting gunicorn 18.0
2014-04-02 12:06:48 [24669] [INFO] Listening at: http://127.0.0.1:5001 (24669)
2014-04-02 12:06:48 [24669] [INFO] Using worker: sync
2014-04-02 12:06:48 [24677] [INFO] Booting worker with pid: 24677
2014-04-02 12:06:48 [24678] [INFO] Booting worker with pid: 24678
2014-04-02 12:06:48 [24679] [INFO] Booting worker with pid: 24679
2014-04-02 12:06:48 [24681] [INFO] Booting worker with pid: 24681
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/var/www/syncserver/local/lib/python2.7/site-packages/syncstorage/tests/functional/test_storage.py", line 1270, in <module>
    res = run_live_functional_tests(TestStorage, sys.argv)
  File "/var/www/syncserver/local/lib/python2.7/site-packages/syncstorage/tests/functional/support.py", line 178, in run_live_functional_tests
    creds = authenticate_to_token_server(url, opts.email, opts.audience)
  File "/var/www/syncserver/local/lib/python2.7/site-packages/syncstorage/tests/functional/support.py", line 108, in authenticate_to_token_server
    "Authorization": "BrowserID " + assertion,
  File "/var/www/syncserver/local/lib/python2.7/site-packages/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "/var/www/syncserver/local/lib/python2.7/site-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/var/www/syncserver/local/lib/python2.7/site-packages/requests/sessions.py", line 382, in request
    resp = self.send(prep, **send_kwargs)
  File "/var/www/syncserver/local/lib/python2.7/site-packages/requests/sessions.py", line 485, in send
    r = adapter.send(request, **kwargs)
  File "/var/www/syncserver/local/lib/python2.7/site-packages/requests/adapters.py", line 379, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
2014-04-02 12:06:50 [24669] [INFO] Handling signal: term

Makefile:46: recipe for target 'serve' failed

So I just built the project and wanted to start it, but it doesn't want to start. I'm not sure where I should look for information on how to fix that.

➜ jeena@jugulator syncserver (master✗) make build
virtualenv --python=`which python2 python | head -n 1` --no-site-packages ./local
Running virtualenv with interpreter /usr/bin/python2
New python executable in ./local/bin/python2
Also creating executable in ./local/bin/python
Installing setuptools, pip...done.
CFLAGS="-Wno-error -Wno-error=format-security" ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./local/bin/pip install -r requirements.txt
You are using pip version 6.0.6, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting https://github.com/mozilla-services/mozservices/archive/e00e1b68130423ad98d0f6185655bde650443da8.zip (from -r requirements.txt (line 11))
  Downloading https://github.com/mozilla-services/mozservices/archive/e00e1b68130423ad98d0f6185655bde650443da8.zip (53kB)
    100% |################################| 57kB 433kB/s 
Collecting https://github.com/mozilla-services/tokenserver/archive/92361b0e7b0bff996a8fff9c894c7be850d12d16.zip (from -r requirements.txt (line 12))
  Downloading https://github.com/mozilla-services/tokenserver/archive/92361b0e7b0bff996a8fff9c894c7be850d12d16.zip (383kB)
    100% |################################| 385kB 7.3MB/s 
Collecting https://github.com/mozilla-services/server-syncstorage/archive/1.5.11.zip (from -r requirements.txt (line 13))
  Downloading https://github.com/mozilla-services/server-syncstorage/archive/1.5.11.zip (116kB)
    100% |################################| 118kB 9.7MB/s 
Collecting cornice==0.16.2 (from -r requirements.txt (line 1))
  Using cached cornice-0.16.2.tar.gz
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'paster_plugins'
      warnings.warn(msg)
Collecting gunicorn==19.1.1 (from -r requirements.txt (line 2))
  Using cached gunicorn-19.1.1-py2.py3-none-any.whl
Collecting pyramid==1.5 (from -r requirements.txt (line 3))
  Using cached pyramid-1.5.tar.gz
Collecting WebOb==1.4.1 (from -r requirements.txt (line 4))
  Using cached WebOb-1.4.1.tar.gz
Collecting requests==2.7 (from -r requirements.txt (line 5))
  Using cached requests-2.7.0-py2.py3-none-any.whl
Collecting simplejson==3.4 (from -r requirements.txt (line 6))
  Using cached simplejson-3.4.0.tar.gz
Collecting SQLAlchemy==0.9.4 (from -r requirements.txt (line 7))
  Using cached SQLAlchemy-0.9.4.tar.gz
Collecting unittest2==0.5.1 (from -r requirements.txt (line 8))
  Using cached unittest2-0.5.1.tar.gz
Collecting zope.component==4.2.1 (from -r requirements.txt (line 9))
  Using cached zope.component-4.2.1.tar.gz
Collecting configparser==3.5.0b2 (from -r requirements.txt (line 10))
  Using cached configparser-3.5.0b2.tar.gz
Collecting konfig (from mozsvc==0.8->-r requirements.txt (line 11))
  Using cached konfig-0.9.tar.gz
Collecting PyBrowserID (from tokenserver==1.2.14->-r requirements.txt (line 12))
  Using cached PyBrowserID-0.9.2.tar.gz
Collecting testfixtures (from tokenserver==1.2.14->-r requirements.txt (line 12))
  Using cached testfixtures-4.4.0-py2.py3-none-any.whl
Collecting pyramid-hawkauth (from SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached pyramid_hawkauth-0.1.0.tar.gz
Collecting PyMySQL (from SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached PyMySQL-0.6.7-py2.py3-none-any.whl
Collecting pymysql-sa (from SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached pymysql_sa-1.0.tar.gz
Collecting umemcache (from SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached umemcache-1.6.3.zip
Collecting wsgiproxy (from SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached WSGIProxy-0.2.2.tar.gz
Collecting webtest (from SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached WebTest-2.0.20-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./local/lib/python2.7/site-packages (from pyramid==1.5->-r requirements.txt (line 3))
Collecting repoze.lru>=0.4 (from pyramid==1.5->-r requirements.txt (line 3))
  Using cached repoze.lru-0.6.tar.gz
Collecting zope.interface>=3.8.0 (from pyramid==1.5->-r requirements.txt (line 3))
  Using cached zope.interface-4.1.3.tar.gz
Collecting zope.deprecation>=3.5.0 (from pyramid==1.5->-r requirements.txt (line 3))
  Using cached zope.deprecation-4.1.2.tar.gz
Collecting venusian>=1.0a3 (from pyramid==1.5->-r requirements.txt (line 3))
  Using cached venusian-1.0.tar.gz
Collecting translationstring>=0.4 (from pyramid==1.5->-r requirements.txt (line 3))
  Using cached translationstring-1.3-py2.py3-none-any.whl
Collecting PasteDeploy>=1.5.0 (from pyramid==1.5->-r requirements.txt (line 3))
  Using cached PasteDeploy-1.5.2-py2.py3-none-any.whl
Collecting zope.event (from zope.component==4.2.1->-r requirements.txt (line 9))
  Using cached zope.event-4.1.0.tar.gz
Collecting argparse (from konfig->mozsvc==0.8->-r requirements.txt (line 11))
  Using cached argparse-1.4.0-py2.py3-none-any.whl
Collecting hawkauthlib>=0.1 (from pyramid-hawkauth->SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached hawkauthlib-0.1.1.tar.gz
Collecting tokenlib (from pyramid-hawkauth->SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached tokenlib-0.3.1.tar.gz
Collecting Paste (from wsgiproxy->SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached Paste-2.0.2-py2-none-any.whl
Collecting six (from webtest->SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting beautifulsoup4 (from webtest->SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached beautifulsoup4-4.4.1-py2-none-any.whl
Collecting waitress>=0.8.5 (from webtest->SyncStorage==1.5.11->-r requirements.txt (line 13))
  Using cached waitress-0.8.10-py2-none-any.whl
Installing collected packages: waitress, beautifulsoup4, six, Paste, tokenlib, hawkauthlib, argparse, zope.event, PasteDeploy, translationstring, venusian, zope.deprecation, zope.interface, repoze.lru, SyncStorage, webtest, wsgiproxy, umemcache, pymysql-sa, PyMySQL, pyramid-hawkauth, tokenserver, testfixtures, PyBrowserID, mozsvc, konfig, configparser, zope.component, unittest2, SQLAlchemy, simplejson, requests, WebOb, pyramid, gunicorn, cornice




  Running setup.py install for tokenlib
  Running setup.py install for hawkauthlib

  Running setup.py install for zope.event
    Skipping installation of /home/jeena/syncserver/local/lib64/python2.7/site-packages/zope/__init__.py (namespace package)
    Installing /home/jeena/syncserver/local/lib64/python2.7/site-packages/zope.event-4.1.0-py2.7-nspkg.pth


  Running setup.py install for venusian
  Running setup.py install for zope.deprecation
    Skipping installation of /home/jeena/syncserver/local/lib64/python2.7/site-packages/zope/__init__.py (namespace package)
    Installing /home/jeena/syncserver/local/lib64/python2.7/site-packages/zope.deprecation-4.1.2-py2.7-nspkg.pth
  Running setup.py install for zope.interface
    building 'zope.interface._zope_interface_coptimizations' extension
    x86_64-pc-linux-gnu-gcc -pthread -Wno-error -Wno-error=format-security -fPIC -I/usr/include/python2.7 -c src/zope/interface/_zope_interface_coptimizations.c -o build/temp.linux-x86_64-2.7/src/zope/interface/_zope_interface_coptimizations.o
    x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wno-error -Wno-error=format-security build/temp.linux-x86_64-2.7/src/zope/interface/_zope_interface_coptimizations.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/zope/interface/_zope_interface_coptimizations.so
    Skipping installation of /home/jeena/syncserver/local/lib64/python2.7/site-packages/zope/__init__.py (namespace package)
    Installing /home/jeena/syncserver/local/lib64/python2.7/site-packages/zope.interface-4.1.3-py2.7-nspkg.pth
  Running setup.py install for repoze.lru
    Skipping installation of /home/jeena/syncserver/local/lib64/python2.7/site-packages/repoze/__init__.py (namespace package)
    Installing /home/jeena/syncserver/local/lib64/python2.7/site-packages/repoze.lru-0.6-py2.7-nspkg.pth
  Running setup.py install for SyncStorage

  Running setup.py install for wsgiproxy
  Running setup.py install for umemcache
    building 'umemcache' extension
    x86_64-pc-linux-gnu-g++ -pthread -fPIC -DWIN32_LEAN_AND_MEAN -I./lib/ -I/usr/include/python2.7 -c ./python/umemcache.cpp -o build/temp.linux-x86_64-2.7/./python/umemcache.o
    ./python/umemcache.cpp: In function ‘int Client_init(PyClient*, PyObject*, PyObject*)’:
    ./python/umemcache.cpp:255:60: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
       static char *kwlist[] = {"address", "max_item_size", NULL};
                                                                ^
    ./python/umemcache.cpp:255:60: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./python/umemcache.cpp: In function ‘PyObject* Client_incr(PyClient*, PyObject*)’:
    ./python/umemcache.cpp:822:62: warning: format not a string literal and no format arguments [-Wformat-security]
             return PyErr_Format(umemcache_MemcachedError, pResult);
                                                                  ^
    ./python/umemcache.cpp: In function ‘PyObject* Client_decr(PyClient*, PyObject*)’:
    ./python/umemcache.cpp:870:62: warning: format not a string literal and no format arguments [-Wformat-security]
             return PyErr_Format(umemcache_MemcachedError, pResult);
                                                                  ^
    ./python/umemcache.cpp: At global scope:
    ./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
     };
     ^
    ./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./python/umemcache.cpp: In function ‘void initumemcache()’:
    ./python/umemcache.cpp:1124:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
           PyExc_RuntimeError, NULL);
                                   ^
    x86_64-pc-linux-gnu-g++ -pthread -fPIC -DWIN32_LEAN_AND_MEAN -I./lib/ -I/usr/include/python2.7 -c ./lib/PacketReader.cpp -o build/temp.linux-x86_64-2.7/./lib/PacketReader.o
    x86_64-pc-linux-gnu-g++ -pthread -fPIC -DWIN32_LEAN_AND_MEAN -I./lib/ -I/usr/include/python2.7 -c ./lib/PacketWriter.cpp -o build/temp.linux-x86_64-2.7/./lib/PacketWriter.o
    ./lib/PacketWriter.cpp: In function ‘void PrintBuffer(FILE*, void*, size_t, int)’:
    ./lib/PacketWriter.cpp:149:56: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
       fprintf (file, "%u %p --------------\n", len, _offset);
                                                            ^
    ./lib/PacketWriter.cpp:153:33: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         fprintf (file, "%08x: ", cnt);
                                     ^
    x86_64-pc-linux-gnu-g++ -pthread -fPIC -DWIN32_LEAN_AND_MEAN -I./lib/ -I/usr/include/python2.7 -c ./lib/Client.cpp -o build/temp.linux-x86_64-2.7/./lib/Client.o
    ./lib/Client.cpp: In member function ‘bool Client::extractErrorFromReader()’:
    ./lib/Client.cpp:554:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
           errorString = "malformed error received";
                       ^
    x86_64-pc-linux-gnu-g++ -pthread -shared build/temp.linux-x86_64-2.7/./python/umemcache.o build/temp.linux-x86_64-2.7/./lib/PacketReader.o build/temp.linux-x86_64-2.7/./lib/PacketWriter.o build/temp.linux-x86_64-2.7/./lib/Client.o -L/usr/lib64 -lstdc++ -lpython2.7 -o build/lib.linux-x86_64-2.7/umemcache.so
  Running setup.py install for pymysql-sa

  Running setup.py install for pyramid-hawkauth
  Running setup.py install for tokenserver

  Running setup.py install for PyBrowserID
  Running setup.py install for mozsvc
  Running setup.py install for konfig
  Running setup.py install for configparser
    Skipping installation of /home/jeena/syncserver/local/lib64/python2.7/site-packages/backports/__init__.py (namespace package)
    Installing /home/jeena/syncserver/local/lib64/python2.7/site-packages/configparser-3.5.0b2-py2.7-nspkg.pth
  Running setup.py install for zope.component
    Skipping installation of /home/jeena/syncserver/local/lib64/python2.7/site-packages/zope/__init__.py (namespace package)
    Installing /home/jeena/syncserver/local/lib64/python2.7/site-packages/zope.component-4.2.1-py2.7-nspkg.pth
  Running setup.py install for unittest2
    changing mode of build/scripts-2.7/unit2.py from 644 to 755
    changing mode of build/scripts-2.7/unit2 from 644 to 755
    changing mode of /home/jeena/syncserver/local/bin/unit2.py to 755
    changing mode of /home/jeena/syncserver/local/bin/unit2 to 755
    Installing unit2 script to /home/jeena/syncserver/local/bin
    Installing unit2-2.7 script to /home/jeena/syncserver/local/bin
  Running setup.py install for SQLAlchemy
    building 'sqlalchemy.cprocessors' extension
    x86_64-pc-linux-gnu-gcc -pthread -Wno-error -Wno-error=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/processors.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/processors.o
    x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wno-error -Wno-error=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/processors.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/sqlalchemy/cprocessors.so
    building 'sqlalchemy.cresultproxy' extension
    x86_64-pc-linux-gnu-gcc -pthread -Wno-error -Wno-error=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/resultproxy.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/resultproxy.o
    x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wno-error -Wno-error=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/resultproxy.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/sqlalchemy/cresultproxy.so
    building 'sqlalchemy.cutils' extension
    x86_64-pc-linux-gnu-gcc -pthread -Wno-error -Wno-error=format-security -fPIC -I/usr/include/python2.7 -c lib/sqlalchemy/cextension/utils.c -o build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/utils.o
    x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wno-error -Wno-error=format-security build/temp.linux-x86_64-2.7/lib/sqlalchemy/cextension/utils.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/sqlalchemy/cutils.so
  Running setup.py install for simplejson
    building 'simplejson._speedups' extension
    x86_64-pc-linux-gnu-gcc -pthread -Wno-error -Wno-error=format-security -fPIC -I/usr/include/python2.7 -c simplejson/_speedups.c -o build/temp.linux-x86_64-2.7/simplejson/_speedups.o
    x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wno-error -Wno-error=format-security build/temp.linux-x86_64-2.7/simplejson/_speedups.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/simplejson/_speedups.so

  Running setup.py install for WebOb
  Running setup.py install for pyramid
    Installing ptweens script to /home/jeena/syncserver/local/bin
    Installing pdistreport script to /home/jeena/syncserver/local/bin
    Installing proutes script to /home/jeena/syncserver/local/bin
    Installing pshell script to /home/jeena/syncserver/local/bin
    Installing prequest script to /home/jeena/syncserver/local/bin
    Installing pviews script to /home/jeena/syncserver/local/bin
    Installing pcreate script to /home/jeena/syncserver/local/bin
    Installing pserve script to /home/jeena/syncserver/local/bin
  Compiling /tmp/pip-build-oc0fHV/gunicorn/gunicorn/workers/_gaiohttp.py


  Running setup.py install for cornice
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'paster_plugins'
      warnings.warn(msg)
Successfully installed Paste-2.0.2 PasteDeploy-1.5.2 PyBrowserID-0.9.2 PyMySQL-0.6.7 SQLAlchemy-0.9.4 SyncStorage-1.5.11 WebOb-1.4.1 argparse-1.4.0 beautifulsoup4-4.4.1 configparser-3.5.0b2 cornice-0.16.2 gunicorn-19.1.1 hawkauthlib-0.1.1 konfig-0.9 mozsvc-0.8 pymysql-sa-1.0 pyramid-1.5 pyramid-hawkauth-0.1.0 repoze.lru-0.6 requests-2.7.0 simplejson-3.4.0 six-1.10.0 testfixtures-4.4.0 tokenlib-0.3.1 tokenserver-1.2.14 translationstring-1.3 umemcache-1.6.3 unittest2-0.5.1 venusian-1.0 waitress-0.8.10 webtest-2.0.20 wsgiproxy-0.2.2 zope.component-4.2.1 zope.deprecation-4.1.2 zope.event-4.1.0 zope.interface-4.1.3
./local/bin/python ./setup.py develop
running develop
running egg_info
writing syncserver.egg-info/PKG-INFO
writing top-level names to syncserver.egg-info/top_level.txt
writing dependency_links to syncserver.egg-info/dependency_links.txt
writing entry points to syncserver.egg-info/entry_points.txt
reading manifest file 'syncserver.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'syncserver.egg-info/SOURCES.txt'
running build_ext
Creating /home/jeena/syncserver/local/lib/python2.7/site-packages/syncserver.egg-link (link to .)
Adding syncserver 1.5.2 to easy-install.pth file

Installed /home/jeena/syncserver
Processing dependencies for syncserver==1.5.2
Finished processing dependencies for syncserver==1.5.2
touch ./local/COMPLETE
➜ jeena@jugulator syncserver (master✗) make serve 
./local/bin/gunicorn --paste ./syncserver.ini
Makefile:46: recipe for target 'serve' failed
make: *** [serve] Error 3
➜ jeena@jugulator syncserver (master✗) 

Syncserver crash on sync request

Hi, when I'm trying to sync my smartphone with my syncserver it throws this error:

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): verifier.accounts.firefox.com
ERROR:mozsvc:Uncaught exception while processing request:
GET https://<host>/token/1.0/sync/1.5
Uncaught exception:
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 59, in log_uncaught_exceptions_tween
    return handler(request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 26, in catch_backend_errors_tween
    return handler(request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/pyramid/router.py", line 163, in handle_request
    response = view_callable(context, request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 596, in __call__
    return view(context, request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 329, in attr_view
    return view(context, request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 305, in predicate_wrapper
    return view(context, request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 355, in rendered_view
    result = view(context, request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/pyramid/config/views.py", line 501, in _requestonly_view
    response = view(request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/cornice/service.py", line 514, in wrapper
    response = view_(request)
  File "/<dir>/syncserver/local/local/lib/python2.7/site-packages/tokenserver/views.py", line 202, in return_token
    user = backend.get_user(service, email)
  File "/<dir>/syncserver/syncserver/staticnode.py", line 141, in get_user
    'first_seen_at': row.created_at,
<type 'exceptions.AttributeError'>
AttributeError("Could not locate column in row for column 'created_at'",)

Request: Update releases when major milestones are met

Hi,

When running Auth/Sync servers in a production environment, it seems risky to me to be pulling from the master branch as per the instructions here: https://docs.services.mozilla.com/howtos/run-sync-1.5.html

As of this writing, the auth, content, and DB servers required all seem to have pretty commonly updated releases:

In contrast, the Sync server:

Any chance we could start seeing some 1.5.x releases?

Thanks.

Cannot query tokenserver

Is it correct that tokenserver is bundled and no separate installation/configuration is required?

The problem i'm having:

  1. Querying http://myserver:5000/new_channel in browser returns 404, response body contains single char: "0"
  2. When running client code it's getting confused by the above response and complains on invalid cast (something like: "Long instead of String").
  3. make test seems to be all okay

Are there any other options to ensure tokenserver is up and running?

make build / x86_64-linux-gnu-gcc failed with exit status 1

According to https://docs.services.mozilla.com/howtos/run-sync-1.5.html my build process failed.

$ make clean
rm -rf ./local
$ make build
// Here is the first hint during building:
Running setup.py install for umemcache
...
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/O
bjC but not for C++
./python/umemcache.cpp: In function ‘int Client_init(PyClient_, PyObject_, P
yObject_)’:
./python/umemcache.cpp:255:60: warning: deprecated conversion from string co
nstant to ‘char_’ [-Wwrite-strings]
static char kwlist[] = {"address", "max_item_size", NULL};
... ^
running build
running build_ext
building 'umemcache' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/python
creating build/temp.linux-x86_64-2.7/lib
...
cc1plus: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
...
Traceback (most recent call last):
File "./local/bin/pip", line 11, in
sys.exit(main())
File "/opt/fsync1.5/syncserver/local/local/lib/python2.7/site-packages/pip/init.py", line 235, in main
return command.main(cmd_args)
File "/opt/fsync1.5/syncserver/local/local/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
Makefile:17: recipe for target 'local/COMPLETE' failed
make: *
* [local/COMPLETE] Error 1
$

System Info:
$ dpkg -l python-dev git-core python-virtualenv
ii git 1:2.1.1-1
ii python-dev 2.7.8-1 amd64
ii python-virtual 1.11.6-2 all

$ uname -a
Linux x 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux

$ x86_64-linux-gnu-gcc --version
x86_64-linux-gnu-gcc (Debian 4.9.1-15) 4.9.1

How can I help to debug?

SyntaxError during make build

I got this when make build failed ;

Downloading/unpacking Paste==1.7.5.1 (from -r requirements.txt (line 19))
Downloading Paste-1.7.5.1.tar.gz (523kB): 523kB downloaded
Running setup.py (path:/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/build/Paste/setup.py) egg_info for package Paste

warning: no previously-included files matching '*' found under directory 'docs/_build/_sources'

Downloading/unpacking PasteDeploy==1.5.2 (from -r requirements.txt (line 20))
Downloading PasteDeploy-1.5.2-py2.py3-none-any.whl
Downloading/unpacking PasteScript==1.7.5 (from -r requirements.txt (line 21))
Downloading PasteScript-1.7.5.tar.gz (129kB): 129kB downloaded
Running setup.py (path:/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/build/PasteScript/setup.py) egg_info for package PasteScript
Traceback (most recent call last):
File "", line 17, in
File "/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/build/PasteScript/setup.py", line 16
print 'Warning: no news for this version found'
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 17, in

File "/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/build/PasteScript/setup.py", line 16

print 'Warning: no news for this version found'

                                              ^

SyntaxError: invalid syntax


Cleaning up...
Command python setup.py egg_info failed with error code 1 in /srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/build/PasteScript
Storing debug log for failure in /home/admin/.pip/pip.log
Makefile:16: recipe for target 'build' failed
make: *** [build] Error 1

And in pip.log file, I also have:

SyntaxError: invalid syntax


Cleaning up...
Removing temporary dir /srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/build...
Command python setup.py egg_info failed with error code 1 in /srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/build/PasteScript
Exception information:
Traceback (most recent call last):
File "/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/lib/python3.4/site-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/lib/python3.4/site-packages/pip/req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/lib/python3.4/site-packages/pip/req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "/srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/lib/python3.4/site-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in /srv/datadisk01/home/web/steinmetz.fr/tools/syncserver/local/build/PasteScript
~

By the way, as I have both python2.7 and python 3.4 installed, how can i force the make build step to stick with python 2.7 if not compatible with python 3.4 ?

Thanks,
Nicolas

BrowserID Verification Issues (503 Resource is not available)

Hi,
I'm trying to setup a selfhosted fxa+syncserver environment. I've got to the point where everything seems to work but the syncserver BrowserID verification with the fxa-auth-server.

On the frontend I'm using Apache HTTPS (self-signed) reverse proxies on different vhosts to the fxa-auth-server, fxa-content-server and syncserver. On the backend I use mysql with one database each for the syncserver and fxa-auth-server.

In my Firefox browser everything works but the actual connection to the syncserver:

1428340806611   Sync.ErrorHandler   DEBUG   Flushing file log.
1428340806613   Sync.BrowserIDManager   ERROR   Background fetch for key bundle failed: TokenServerClientServerError({"now":"2015-04-06T17:20:06.608Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [{\"location\": \"body\", \"name\": \"\", \"description\": \"Resource is not available\"}]}","response_headers":{"date":"Mon, 06 Apr 2015 17:20:07 GMT","server":"PasteWSGIServer/0.5 Python/2.7.3","content-length":"109","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1428340807.15","x-timestamp":"1428340807","access-control-allow-origin":"*","connection":"close"},"response_status":503}) (resource://gre/modules/services-common/tokenserverclient.js:36:35) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < [email protected]:76:62 < @sync.js:459:1 < [email protected]:137:7 < @main.js:30:1 < [email protected]:137:7 < [email protected]:21:3 < [email protected]:4442:9 < [email protected]:2161:13 < [email protected]:208:12 < [email protected]:667:5 < [email protected]:824:9 < [email protected]:2402:5 < [email protected]:55:7
1428340806614   Sync.BrowserIDManager   ERROR   Could not authenticate: TokenServerClientServerError({"now":"2015-04-06T17:20:06.608Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [{\"location\": \"body\", \"name\": \"\", \"description\": \"Resource is not available\"}]}","response_headers":{"date":"Mon, 06 Apr 2015 17:20:07 GMT","server":"PasteWSGIServer/0.5 Python/2.7.3","content-length":"109","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1428340807.15","x-timestamp":"1428340807","access-control-allow-origin":"*","connection":"close"},"response_status":503}) (resource://gre/modules/services-common/tokenserverclient.js:36:35) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < [email protected]:76:62 < @sync.js:459:1 < [email protected]:137:7 < @main.js:30:1 < [email protected]:137:7 < [email protected]:21:3 < [email protected]:4442:9 < [email protected]:2161:13 < [email protected]:208:12 < [email protected]:667:5 < [email protected]:824:9 < [email protected]:2402:5 < [email protected]:55:7
1428340806615   Sync.BrowserIDManager   INFO    currentAuthState returning error.login.reason.network due to previous failure
1428340806615   Sync.Status DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1428340806615   Sync.Status DEBUG   Status.service: error.login.failed => error.login.failed
1428340806616   Sync.ErrorHandler   DEBUG   Log cleanup threshold time: 1427476806616
1428340806617   Sync.ErrorHandler   DEBUG   No logs to clean up.
1428340808710   Sync.BrowserIDManager   INFO    currentAuthState returning error.login.reason.network due to previous failure
1428340808710   Sync.Status DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1428340808710   Sync.Status DEBUG   Status.service: error.login.failed => error.login.failed
1428340809725   Sync.BrowserIDManager   INFO    currentAuthState returning error.login.reason.network due to previous failure
1428340809725   Sync.Status DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1428340809725   Sync.Status DEBUG   Status.service: error.login.failed => error.login.failed
1428340812203   Sync.BrowserIDManager   INFO    currentAuthState returning error.login.reason.network due to previous failure
1428340812203   Sync.Status DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1428340812203   Sync.Status DEBUG   Status.service: error.login.failed => error.login.failed
1428340812203   Sync.ErrorHandler   DEBUG   Beginning user-triggered sync.
1428340812203   Sync.Service    DEBUG   User-Agent: Firefox/37.0.1 FxSync/1.39.0.20150402191859.
1428340812203   Sync.Service    INFO    Starting sync at 2015-04-06 19:20:12
1428340812203   Sync.Service    DEBUG   In sync: should login.
1428340812204   Sync.BrowserIDManager   INFO    currentAuthState returning error.login.reason.network due to previous failure
1428340812204   Sync.Status DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1428340812204   Sync.Status DEBUG   Status.service: error.login.failed => error.login.failed
1428340812204   Sync.BrowserIDManager   INFO    currentAuthState returning error.login.reason.network due to previous failure
1428340812204   Sync.Status DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1428340812204   Sync.Status DEBUG   Status.service: error.login.failed => error.login.failed
1428340812205   Sync.BrowserIDManager   INFO    Waiting for user to be verified.
1428340812205   FirefoxAccounts DEBUG   already verified
1428340812205   Sync.BrowserIDManager   INFO    Starting fetch for key bundle.
1428340812205   FirefoxAccounts DEBUG   already verified
1428340812206   Sync.BrowserIDManager   INFO    Getting an assertion from: https://syncserver.mydomain.tld/token/1.0/sync/1.5
1428340812206   FirefoxAccounts DEBUG   enter getAssertion()
1428340812206   FirefoxAccounts DEBUG   getKeyPair: already have a keyPair
1428340812206   FirefoxAccounts DEBUG    getCertificate already had one
1428340812206   FirefoxAccounts DEBUG   getAssertionFromCert
1428340812208   FirefoxAccounts DEBUG   getAssertionFromCert returning signed: true
1428340812209   Sync.BrowserIDManager   DEBUG   Getting a token
1428340812209   Common.TokenServerClient    DEBUG   Beginning BID assertion exchange: https://syncserver.mydomain.tld/token/1.0/sync/1.5
1428340812290   Common.TokenServerClient    DEBUG   Got token response: 503
1428340812290   Common.TokenServerClient    INFO    Server-reported error: {"location":"body","name":"","description":"Resource is not available"}
1428340812290   Sync.BrowserIDManager   ERROR   Non-authentication error in _fetchTokenForUser: TokenServerClientServerError({"now":"2015-04-06T17:20:12.290Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [{\"location\": \"body\", \"name\": \"\", \"description\": \"Resource is not available\"}]}","response_headers":{"date":"Mon, 06 Apr 2015 17:20:12 GMT","server":"PasteWSGIServer/0.5 Python/2.7.3","content-length":"109","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1428340812.83","x-timestamp":"1428340812","access-control-allow-origin":"*","connection":"close"},"response_status":503}) (resource://gre/modules/services-common/tokenserverclient.js:36:35) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < [email protected]:76:62 < @sync.js:459:1 < [email protected]:137:7 < @main.js:30:1 < [email protected]:137:7 < [email protected]:21:3 < [email protected]:4442:9 < [email protected]:2161:13 < [email protected]:208:12 < [email protected]:667:5 < [email protected]:824:9 < [email protected]:2402:5 < [email protected]:55:7
1428340812292   Sync.Status DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1428340812292   Sync.Status DEBUG   Status.service: error.login.failed => error.login.failed
1428340812292   Sync.SyncScheduler  DEBUG   Clearing sync triggers and the global score.
1428340812292   Sync.SyncScheduler  DEBUG   Next sync in 3600000 ms.

On syncserver the log shows the following:

INFO:mozsvc.metrics:{"code": 503, "request_time": 0.0009009838104248047, "remoteAddressChain": ["<my client ip>", "127.0.0.1"], "agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0", "token.assertion.connection_error": 1, "token.assertion.verify_failure": 1, "tokenserver.assertion.verify": 0.00037097930908203125, "path": "https://syncserver.mydomain.tld/token/1.0/sync/1.5", "method": "GET"}

Plainly accessing https://syncserver.mydomain.tld/token/1.0/sync/1.5 with curl or firefox throws a expected 401 error:

INFO:mozsvc.metrics:{"code": 401, "request_time": 0.0005269050598144531, "remoteAddressChain": ["46.244.245.183"], "agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0", "path": "https://syncserver.mydomain.tld/token/1.0/sync/1.5", "method": "GET"}

I've tried both the local and remote verifiers (tried public url: https://authserver.mydomain.tld/.well-known/browserid and http://127.0.0.1:9000/.well-known/browserid without SSL) in the [browserid] section. audiences is set to *.mydomain.tld

Any clue on what I'm missing, or how to patch the tokenserver? ;-)

Best Regards

Firefox Mobile Sync issues

Hello,

I'm currently running my own Sync Server instance for a couple of months now, and so far it's been great, running it on desktops & laptops. However, I'd like to use it on Android as well, but it seems right now that there's some error I can't fix myself...

Everything is set up correctly (given that I can sync from two other devices flawlessly), and seeing that there is an actual request to the server, it seems that the setup in firefox mobile should be correct too...

Every now and then, Firefox makes a background request to sync, and it always errors out on this one:

195.202.166.190 - - [19/Dec/2015:03:38:14 +0100] "GET /1.0/sync/1.5 HTTP/1.1" 404 1 "-" "Firefox-Android-FxAccounts/43.0 (Firefox)"

Using ADB I managed to obtain this log from Firefox:

D/FxAccounts(19418): firefox :: AndroidFxAccount :: Account is in state Married
I/FxAccounts(19418): firefox :: FxAccountNotificationManager :: State Married needs no action; cancelling any existing notification.
I/FxAccounts(19418): firefox :: LoginStateMachineDelegate :: handleMarried: in Married
D/FxAccounts(19418): firefox :: BaseResource :: HTTP GET https://sync.domain.tld/1.0/sync/1.5
D/FxAccounts(19418): firefox :: BaseResource :: Added auth header.
D/FxAccounts(19418): firefox :: BaseResource :: Response: HTTP/1.1 404 Not Found
D/FxAccounts(19418): firefox :: SkewHandler :: Updated skew: 792ms for hostname domain.tld
D/FxAccounts(19418): firefox :: TokenServerClient :: Got token response with status code 404.
D/FxAccounts(19418): firefox :: TokenServerClient :: Malformed token response.
D/FxAccounts(19418): org.mozilla.gecko.sync.NonObjectJSONException: value must be a JSON object
D/FxAccounts(19418):    at org.mozilla.gecko.sync.ExtendedJSONObject.<init>(ExtendedJSONObject.java:217)
D/FxAccounts(19418):    at org.mozilla.gecko.sync.net.MozResponse.jsonObjectBody(MozResponse.java:110)
D/FxAccounts(19418):    at org.mozilla.gecko.tokenserver.TokenServerClient.processResponse(TokenServerClient.java:152)
D/FxAccounts(19418):    at org.mozilla.gecko.tokenserver.TokenServerClient$TokenFetchResourceDelegate.handleHttpResponse(TokenServerClient.java:280)
D/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:309)
D/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:340)
D/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.get(BaseResource.java:346)
D/FxAccounts(19418):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter.syncWithAssertion$1a55e242(FxAccountSyncAdapter.java:373)
D/FxAccounts(19418):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$3.handleMarried(FxAccountSyncAdapter.java:542)
D/FxAccounts(19418):    at org.mozilla.gecko.fxa.authenticator.FxADefaultLoginStateMachineDelegate.handleFinal(FxADefaultLoginStateMachineDelegate.java:81)
D/FxAccounts(19418):    at org.mozilla.gecko.fxa.login.FxAccountLoginStateMachine$ExecuteDelegate.handleTransition(FxAccountLoginStateMachine.java:64)
D/FxAccounts(19418):    at org.mozilla.gecko.fxa.login.Cohabiting$1.handleSuccess(Cohabiting.java:28)
D/FxAccounts(19418):    at org.mozilla.gecko.background.fxa.FxAccountClient10$10.handleSuccess$2637ceed(FxAccountClient10.java:770)
D/FxAccounts(19418):    at org.mozilla.gecko.background.fxa.FxAccountClient10$ResourceDelegate$2.run(FxAccountClient10.java:291)
D/FxAccounts(19418):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
D/FxAccounts(19418):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
D/FxAccounts(19418):    at java.lang.Thread.run(Thread.java:818)
E/FxAccounts(19418): firefox :: FxAccountSyncAdapter :: Failed to get token.
E/FxAccounts(19418): org.mozilla.gecko.tokenserver.TokenServerException$TokenServerMalformedResponseException: org.mozilla.gecko.sync.NonObjectJSONException: value must be a JSON object
E/FxAccounts(19418):    at org.mozilla.gecko.tokenserver.TokenServerClient.processResponse(TokenServerClient.java:155)
E/FxAccounts(19418):    at org.mozilla.gecko.tokenserver.TokenServerClient$TokenFetchResourceDelegate.handleHttpResponse(TokenServerClient.java:280)
E/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:309)
E/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:340)
E/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.get(BaseResource.java:346)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter.syncWithAssertion$1a55e242(FxAccountSyncAdapter.java:373)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$3.handleMarried(FxAccountSyncAdapter.java:542)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.authenticator.FxADefaultLoginStateMachineDelegate.handleFinal(FxADefaultLoginStateMachineDelegate.java:81)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.login.FxAccountLoginStateMachine$ExecuteDelegate.handleTransition(FxAccountLoginStateMachine.java:64)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.login.Cohabiting$1.handleSuccess(Cohabiting.java:28)
E/FxAccounts(19418):    at org.mozilla.gecko.background.fxa.FxAccountClient10$10.handleSuccess$2637ceed(FxAccountClient10.java:770)
E/FxAccounts(19418):    at org.mozilla.gecko.background.fxa.FxAccountClient10$ResourceDelegate$2.run(FxAccountClient10.java:291)
E/FxAccounts(19418):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/FxAccounts(19418):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/FxAccounts(19418):    at java.lang.Thread.run(Thread.java:818)
E/FxAccounts(19418): Caused by: org.mozilla.gecko.sync.NonObjectJSONException: value must be a JSON object
E/FxAccounts(19418):    at org.mozilla.gecko.sync.ExtendedJSONObject.<init>(ExtendedJSONObject.java:217)
E/FxAccounts(19418):    at org.mozilla.gecko.sync.net.MozResponse.jsonObjectBody(MozResponse.java:110)
E/FxAccounts(19418):    at org.mozilla.gecko.tokenserver.TokenServerClient.processResponse(TokenServerClient.java:152)
E/FxAccounts(19418):    ... 14 more
D/FxAccounts(19418): firefox :: AndroidFxAccount :: Returning cached account bundle.
D/FxAccounts(19418): firefox :: AndroidFxAccount :: Returning cached account bundle.
D/FxAccounts(19418): firefox :: AndroidFxAccount :: Account is in state Married
I/FxAccounts(19418): firefox :: AndroidFxAccount :: Moving account named like [email protected] to state Cohabiting
D/FxAccounts(19418): firefox :: AndroidFxAccount :: Returning cached account bundle.
I/FxAccounts(19418): firefox :: LoginStateMachineDelegate :: Fetching profile avatar information.
W/FxAccounts(19418): firefox :: FxAccountSyncAdapter :: Global session failed.
E/FxAccounts(19418): firefox :: FxAccountSyncAdapter :: Got exception syncing.
E/FxAccounts(19418): org.mozilla.gecko.tokenserver.TokenServerException$TokenServerMalformedResponseException: org.mozilla.gecko.sync.NonObjectJSONException: value must be a JSON object
E/FxAccounts(19418):    at org.mozilla.gecko.tokenserver.TokenServerClient.processResponse(TokenServerClient.java:155)
E/FxAccounts(19418):    at org.mozilla.gecko.tokenserver.TokenServerClient$TokenFetchResourceDelegate.handleHttpResponse(TokenServerClient.java:280)
E/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:309)
E/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:340)
E/FxAccounts(19418):    at org.mozilla.gecko.sync.net.BaseResource.get(BaseResource.java:346)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter.syncWithAssertion$1a55e242(FxAccountSyncAdapter.java:373)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$3.handleMarried(FxAccountSyncAdapter.java:542)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.authenticator.FxADefaultLoginStateMachineDelegate.handleFinal(FxADefaultLoginStateMachineDelegate.java:81)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.login.FxAccountLoginStateMachine$ExecuteDelegate.handleTransition(FxAccountLoginStateMachine.java:64)
E/FxAccounts(19418):    at org.mozilla.gecko.fxa.login.Cohabiting$1.handleSuccess(Cohabiting.java:28)
E/FxAccounts(19418):    at org.mozilla.gecko.background.fxa.FxAccountClient10$10.handleSuccess$2637ceed(FxAccountClient10.java:770)
E/FxAccounts(19418):    at org.mozilla.gecko.background.fxa.FxAccountClient10$ResourceDelegate$2.run(FxAccountClient10.java:291)
E/FxAccounts(19418):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/FxAccounts(19418):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/FxAccounts(19418):    at java.lang.Thread.run(Thread.java:818)
E/FxAccounts(19418): Caused by: org.mozilla.gecko.sync.NonObjectJSONException: value must be a JSON object
E/FxAccounts(19418):    at org.mozilla.gecko.sync.ExtendedJSONObject.<init>(ExtendedJSONObject.java:217)
E/FxAccounts(19418):    at org.mozilla.gecko.sync.net.MozResponse.jsonObjectBody(MozResponse.java:110)
E/FxAccounts(19418):    at org.mozilla.gecko.tokenserver.TokenServerClient.processResponse(TokenServerClient.java:152)
E/FxAccounts(19418):    ... 14 more
I/FxAccounts(19418): firefox :: FxAccountSyncAdapter :: Syncing done.
D/FxAccounts(19418): firefox :: BaseResource :: HTTP GET https://profile.accounts.firefox.com/v1/profile

The stack-trace comes from here, where it mentions that sometimes the client does not return JSON... When the URL is accessed manually, a 404 is returned, with a single "0" as content, explaining the cause of the above stack trace. I have no idea however how/why this happens... One thought is that it might be related to #5.

Some more information that might be possibly relevant:

Nginx config

# SSL
server {
        listen 443 ssl default;
        listen [::]:443 ssl default;

        server_name domain.tld;

        # SSL stuff
        add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";

        ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;

        ssl_session_tickets on;
        ssl_session_timeout 5m;
        ssl_session_cache shared:SSL:10m;

        ssl_dhparam /etc/ssl/certs/dhparam.pem;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
        ssl_prefer_server_ciphers on;

        location / {
                proxy_set_header Host $http_host;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_redirect off;
                proxy_read_timeout 120;
                proxy_connect_timeout 10;
                proxy_pass http://127.0.0.1:5000/;
        }
}

Syncserver.ini:

http auth support

I do not suppose Firefox supports http auth when connecting to the syncserver, now does it? Currently, my error.log simply shows me client used wrong authentication scheme. Imho, integrating http auth would be quite nice, as we wouldn't need to worry about user registrations etc. anymore. Would it be hard to implement this? I think something needs to be changed about Firefox to support that, right?

ConfigItems handled as list instead of string

Hi everyone,

First I have to say I am no python dev, but in my installation it looks like the configurations are created as a list object and not as a string, so needed methods are not available.

sqluri = mysql://syncserver:***@localhost/syncserver

...
[Thu Feb 26 06:33:41.929573 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] File "/opt/syncserver/local/lib/python2.7/site-packages/syncstorage/init.py", line 18, in includeme
[Thu Feb 26 06:33:41.929600 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] config.include("syncstorage.storage")
[Thu Feb 26 06:33:41.929607 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] File "/opt/syncserver/local/lib/python2.7/site-packages/pyramid/config/init.py", line 754, in include
[Thu Feb 26 06:33:41.929616 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] c(configurator)
[Thu Feb 26 06:33:41.929621 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] File "/opt/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/init.py", line 479, in includeme
[Thu Feb 26 06:33:41.929712 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] storage = load_storage_from_settings("storage", settings)
[Thu Feb 26 06:33:41.929726 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] File "/opt/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/init.py", line 503, in load_storage_from_settings
[Thu Feb 26 06:33:41.929737 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] return klass(*_section_settings)
[Thu Feb 26 06:33:41.929743 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] File "/opt/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/sql/init.py", line 102, in init
[Thu Feb 26 06:33:41.929925 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] self.dbconnector = DBConnector(sqluri, *_dbkwds)
[Thu Feb 26 06:33:41.929936 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] File "/opt/syncserver/local/lib/python2.7/site-packages/syncstorage/storage/sql/dbconnect.py", line 240, in init
[Thu Feb 26 06:33:41.930096 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] parsed_sqluri = urlparse.urlparse(sqluri)
[Thu Feb 26 06:33:41.930106 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] File "/usr/lib/python2.7/urlparse.py", line 572, in urlparse
[Thu Feb 26 06:33:41.930257 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] tuple = urlsplit(url, scheme, allow_fragments)
[Thu Feb 26 06:33:41.930266 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] File "/usr/lib/python2.7/urlparse.py", line 605, in urlsplit
[Thu Feb 26 06:33:41.930276 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] cached = _parse_cache.get(key, None)
[Thu Feb 26 06:33:41.930289 2015] [:error] [pid 2816] [remote 178.10.70.26:19959] TypeError: unhashable type: 'list'

Without configured sqluri the trim for the public_url fails

...
[Thu Feb 26 06:38:23.754235 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] File "/opt/syncserver/syncserver/init.py", line 156, in main
[Thu Feb 26 06:38:23.754243 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] config = get_configurator(global_config, **settings)
[Thu Feb 26 06:38:23.754248 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] File "/opt/syncserver/syncserver/init.py", line 148, in get_configurator
[Thu Feb 26 06:38:23.754254 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] config.include(includeme)
[Thu Feb 26 06:38:23.754258 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] File "/opt/syncserver/local/lib/python2.7/site-packages/pyramid/config/init.py", line 754, in include
[Thu Feb 26 06:38:23.754265 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] c(configurator)
[Thu Feb 26 06:38:23.754269 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] File "/opt/syncserver/syncserver/init.py", line 30, in includeme
[Thu Feb 26 06:38:23.754275 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] public_url = public_url.rstrip("/")
[Thu Feb 26 06:38:23.754286 2015] [:error] [pid 2944] [remote 178.10.70.26:28255] AttributeError: 'list' object has no attribute 'rstrip'

I also tried to encase the values with ' ' and " " whithout any change of the issue.

is this caused in a missconfiguration?

cheers chris

Firefox Mobile 401 on token request with non-standard port

Version: http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-central-android/fennec-34.0a1.multi.android-arm.apk
Plugin: https://addons.mozilla.org/en-US/android/addon/fxa-custom-server-addon/

Running server on non-standard ports:

  • Auth: https://HOST.DOMAIN.com:13900/v1/certificate/sign
  • Sync: https://HOST.DOMAIN.com:13443/token/1.0/sync/1.5

Everything works fine using the desktop browser, however I get an invalid-credentials error when attempting to sync via Fennec nightlies.

In the below, notice how in /var/log/httpd/access_log_13443 there is an entry that reads "path": "https://HOST.DOMAIN.com/token/1.0/sync/1.5"? This is missing the :13443 that seems to exist in all the requests from the desktop client.

Logcat:

I/FxAccounts( 3701): fennec :: FirefoxAccounts :: Requesting sync.
I/FxAccounts( 3701): fennec :: FirefoxAccounts :: Sync hints; scheduling now: true; ignoring local rate limit: true; ignoring HOST server backoff: true.
I/FxAccounts( 3701): fennec :: FxAccountSyncAdapter :: Syncing FxAccount account named like [email protected] for authority org.mozilla.fennec.db.browser with instance org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter@4211ebd0.
I/FxAccounts( 3701): fennec :: FirefoxAccounts :: Sync hints; scheduling now: true; ignoring local rate limit: true; ignoring HOST server backoff: true.
I/FxAccounts( 3701): fennec :: Utils :: Asked to sync 'clients, tabs' and to skip ''.
D/FxAccounts( 3701): fennec :: AccountPickler :: Persisted 10 account settings to fxa.account.json.
D/FxAccounts( 3701): fennec :: BaseResource :: HTTP POST https://HOST.DOMAIN.com:13900/v1/certificate/sign
D/FxAccounts( 3701): fennec :: BaseResource :: Added auth header.
D/FxAccounts( 3701): fennec :: BaseResource :: Response: HTTP/1.1 200 OK
D/FxAccounts( 3701): fennec :: SkewHandler :: Updated skew: -130ms for hostname HOST.DOMAIN.com
D/class ch.boye.httpclientandroidlib.impl.conn.DefaultClientConnection( 3701): Connection shut down
I/FxAccounts( 3701): fennec :: FxAccountSyncAdapter :: handleTransition: LogMessage('sign succeeded') to Married
I/FxAccounts( 3701): fennec :: FxAccountSyncAdapter :: handleFinal: in Married
I/FxAccounts( 3701): fennec :: AndroidFxAccount :: Moving account named like [email protected] to state Married
I/FxAccounts( 3701): fennec :: FxAccountNotificationManager :: State Married needs no action; cancelling any existing notification.
D/FxAccounts( 3701): fennec :: BaseResource :: HTTP GET https://HOST.DOMAIN.com:13443/token/1.0/sync/1.5
D/FxAccounts( 3701): fennec :: BaseResource :: Added auth header.
D/class ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient( 3701): Target requested authentication
D/FxAccounts( 3701): fennec :: BaseResource :: Response: HTTP/1.1 401 Unauthorized
D/FxAccounts( 3701): fennec :: SkewHandler :: Updated skew: -247ms for hostname HOST.DOMAIN.com
D/FxAccounts( 3701): fennec :: TokenServerClient :: Got token response with status code 401.
D/class ch.boye.httpclientandroidlib.impl.conn.DefaultClientConnection( 3701): Connection shut down
W/FxAccounts( 3701): fennec :: TokenServerClient :: {"location":"body","description":"Unauthorized","name":""}
E/FxAccounts( 3701): fennec :: FxAccountSyncAdapter :: Failed to get token.
E/FxAccounts( 3701): org.mozilla.gecko.tokenserver.TokenServerException$TokenServerInvalidCredentialsException: {"status":"invalid-credentials","errors":[{"location":"body","description":"Unauthorized","name":""}]}
E/FxAccounts( 3701):    at org.mozilla.gecko.tokenserver.TokenServerClient.processResponse(TokenServerClient.java:183)
E/FxAccounts( 3701):    at org.mozilla.gecko.tokenserver.TokenServerClient$TokenFetchResourceDelegate.handleHttpResponse(TokenServerClient.java:280)
E/FxAccounts( 3701):    at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:280)
E/FxAccounts( 3701):    at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:315)
E/FxAccounts( 3701):    at org.mozilla.gecko.sync.net.BaseResource.get(BaseResource.java:321)
E/FxAccounts( 3701):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter.syncWithAssertion$7f7fa7c7(FxAccountSyncAdapter.java:422)
E/FxAccounts( 3701):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$3.handleFinal(FxAccountSyncAdapter.java:603)
E/FxAccounts( 3701):    at org.mozilla.gecko.fxa.login.FxAccountLoginStateMachine$ExecuteDelegate.handleTransition(FxAccountLoginStateMachine.java:64)
E/FxAccounts( 3701):    at org.mozilla.gecko.fxa.login.Cohabiting$1.handleSuccess(Cohabiting.java:24)
E/FxAccounts( 3701):    at org.mozilla.gecko.background.fxa.FxAccountClient10$10.handleSuccess$2637ceed(FxAccountClient10.java:726)
E/FxAccounts( 3701):    at org.mozilla.gecko.background.fxa.FxAccountClient10$ResourceDelegate$2.run(FxAccountClient10.java:247)
E/FxAccounts( 3701):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/FxAccounts( 3701):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/FxAccounts( 3701):    at java.lang.Thread.run(Thread.java:841)
W/FxAccounts( 3701): fennec :: FxAccountSyncAdapter :: Global session failed.
E/FxAccounts( 3701): fennec :: FxAccountSyncAdapter :: Got exception syncing.
E/FxAccounts( 3701): org.mozilla.gecko.tokenserver.TokenServerException$TokenServerInvalidCredentialsException: {"status":"invalid-credentials","errors":[{"location":"body","description":"Unauthorized","name":""}]}
E/FxAccounts( 3701):    at org.mozilla.gecko.tokenserver.TokenServerClient.processResponse(TokenServerClient.java:183)
E/FxAccounts( 3701):    at org.mozilla.gecko.tokenserver.TokenServerClient$TokenFetchResourceDelegate.handleHttpResponse(TokenServerClient.java:280)
E/FxAccounts( 3701):    at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:280)
E/FxAccounts( 3701):    at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:315)
E/FxAccounts( 3701):    at org.mozilla.gecko.sync.net.BaseResource.get(BaseResource.java:321)
E/FxAccounts( 3701):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter.syncWithAssertion$7f7fa7c7(FxAccountSyncAdapter.java:422)
E/FxAccounts( 3701):    at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$3.handleFinal(FxAccountSyncAdapter.java:603)
E/FxAccounts( 3701):    at org.mozilla.gecko.fxa.login.FxAccountLoginStateMachine$ExecuteDelegate.handleTransition(FxAccountLoginStateMachine.java:64)
E/FxAccounts( 3701):    at org.mozilla.gecko.fxa.login.Cohabiting$1.handleSuccess(Cohabiting.java:24)
E/FxAccounts( 3701):    at org.mozilla.gecko.background.fxa.FxAccountClient10$10.handleSuccess$2637ceed(FxAccountClient10.java:726)
E/FxAccounts( 3701):    at org.mozilla.gecko.background.fxa.FxAccountClient10$ResourceDelegate$2.run(FxAccountClient10.java:247)
E/FxAccounts( 3701):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/FxAccounts( 3701):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/FxAccounts( 3701):    at java.lang.Thread.run(Thread.java:841)
I/FxAccounts( 3701): fennec :: AndroidFxAccount :: Moving account named like [email protected] to state Cohabiting
I/FxAccounts( 3701): fennec :: FxAccountSyncAdapter :: Syncing done.
D/SyncManager( 1638): failed sync operation [email protected] u0 (org.mozilla.fennec_fxaccount), org.mozilla.fennec.db.browser, USER, latestRunTime 105889993, reason: 10229, SyncResult: stats [ numIoExceptions: 1 numUpdates: 1]

Server logs:

17:44:28.177Z TRACE fxa-auth-server:  (op=SessionToken.fromHex)
17:44:28.177Z  INFO fxa-auth-server:  (op=server.nonceFunc, skew=1.1770000457763672)
17:44:28.179Z TRACE fxa-auth-server:  (op=Sign.cert)
17:44:28.188Z  INFO fxa-auth-server:  (op=request.summary, code=200, errno=0, rid=1406569468174-3473-55109, path=/v1/certificate/sign, lang=en-US, agent="Firefox-Android-FxAccounts/34.0a1 (Nightly)", t=14, uid=a6b1aadefe8d41f5b2b6f2a932177950)
    HOSTAddressChain: [
      "192.168.3.1",
      "127.0.0.1"
    ]

==> /var/log/httpd/access_log_13900 <==
192.168.3.1 - - [28/Jul/2014:13:44:28 -0400] "POST /v1/certificate/sign HTTP/1.1" 200 1882 "-" "Firefox-Android-FxAccounts/34.0a1 (Nightly)"

==> /var/log/httpd/error_log <==
[Mon Jul 28 13:44:28 2014] [error] INFO:mozsvc.metrics:{"code": 200, "request_time": 0.0015408992767333984, "HOSTAddressChain": ["192.168.3.1"], "agent": "Firefox-Android-FxAccounts/34.0a1 (Nightly)", "token.assertion.audience_mismatch_error": 1, "token.assertion.verify_failure": 1, "tokenserver.assertion.verify": 0.00012683868408203125, "path": "https://HOST.DOMAIN.com/token/1.0/sync/1.5", "method": "GET"}

==> /var/log/httpd/access_log_13443 <==
192.168.3.1 - - [28/Jul/2014:13:44:28 -0400] "GET /token/1.0/sync/1.5 HTTP/1.1" 401 110 "-" "Firefox-Android-FxAccounts/34.0a1 (Nightly)"

==> /var/log/firefox/fxa-auth-server.log <==
17:44:33.730Z  INFO fxa-auth-server:  (stat=mysql, errors=0, connections=2, queue=0, free=2, op=stat)
17:44:33.730Z  INFO fxa-auth-server:  (stat=mem, rss=77996032, heapUsed=28218320, op=stat)
17:44:48.731Z  INFO fxa-auth-server:  (stat=mysql, errors=0, connections=2, queue=0, free=2, op=stat)
17:44:48.731Z  INFO fxa-auth-server:  (stat=mem, rss=77996032, heapUsed=28249464, op=stat)

Problem building syncserver -- issue with umemcache

I upgraded to Fedora 21 a few days ago and tried to build syncserver. There seems to be a problem with umemcache:

...

Running setup.py install for umemcache
building 'umemcache' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -Wno-error -fPIC -DWIN32_LEAN_AND_MEAN -I./lib/ -I/usr/include/python2.7 -c ./python/umemcache.cpp -o build/temp.linux-x86_64-2.7/./python/umemcache.o
./python/umemcache.cpp: In function ‘int Client_init(PyClient_, PyObject_, PyObject_)’:
./python/umemcache.cpp:255:60: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
static char kwlist[] = {"address", "max_item_size", NULL};
^
./python/umemcache.cpp:255:60: warning: deprecated conversion from string constant to ‘char
’ [-Wwrite-strings]
./python/umemcache.cpp: In function ‘PyObject* Client_incr(PyClient_, PyObject_)’:
./python/umemcache.cpp:822:62: error: format not a string literal and no format arguments [-Werror=format-security]
return PyErr_Format(umemcache_MemcachedError, pResult);
^
./python/umemcache.cpp: In function ‘PyObject* Client_decr(PyClient_, PyObject_)’:
./python/umemcache.cpp:870:62: error: format not a string literal and no format arguments [-Werror=format-security]
return PyErr_Format(umemcache_MemcachedError, pResult);
^
./python/umemcache.cpp: At global scope:
./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
};
^
./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
./python/umemcache.cpp: In function ‘void initumemcache()’:
./python/umemcache.cpp:1124:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
PyExc_RuntimeError, NULL);
^
cc1plus: some warnings being treated as errors
error: command 'gcc' failed with exit status 1
Complete output from command /var/www/weave/syncserver/local/bin/python2 -c "import setuptools, tokenize;file='/var/www/weave/syncserver/local/build/umemcache/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-MZOSi1-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/weave/syncserver/local/include/site/python2.7:
running install

running build

running build_ext

building 'umemcache' extension

creating build

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/python

creating build/temp.linux-x86_64-2.7/lib

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -Wno-error -fPIC -DWIN32_LEAN_AND_MEAN -I./lib/ -I/usr/include/python2.7 -c ./python/umemcache.cpp -o build/temp.linux-x86_64-2.7/./python/umemcache.o

./python/umemcache.cpp: In function ‘int Client_init(PyClient_, PyObject_, PyObject*)’:

./python/umemcache.cpp:255:60: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

static char *kwlist[] = {"address", "max_item_size", NULL};

                                                        ^

./python/umemcache.cpp:255:60: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

./python/umemcache.cpp: In function ‘PyObject* Client_incr(PyClient_, PyObject_)’:

./python/umemcache.cpp:822:62: error: format not a string literal and no format arguments [-Werror=format-security]

     return PyErr_Format(umemcache_MemcachedError, pResult);

                                                          ^

./python/umemcache.cpp: In function ‘PyObject* Client_decr(PyClient_, PyObject_)’:

./python/umemcache.cpp:870:62: error: format not a string literal and no format arguments [-Werror=format-security]

     return PyErr_Format(umemcache_MemcachedError, pResult);

                                                          ^

./python/umemcache.cpp: At global scope:

./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

};

^

./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

./python/umemcache.cpp:1056:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

./python/umemcache.cpp: In function ‘void initumemcache()’:

./python/umemcache.cpp:1124:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

   PyExc_RuntimeError, NULL);

                           ^

cc1plus: some warnings being treated as errors

error: command 'gcc' failed with exit status 1


Cleaning up...
Command /var/www/weave/syncserver/local/bin/python2 -c "import setuptools, tokenize;file='/var/www/weave/syncserver/local/build/umemcache/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-MZOSi1-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/weave/syncserver/local/include/site/python2.7 failed with error code 1 in /var/www/weave/syncserver/local/build/umemcache
Traceback (most recent call last):
File "./local/bin/pip", line 11, in
sys.exit(main())
File "/var/www/weave/syncserver/local/lib/python2.7/site-packages/pip/init.py", line 185, in main
return command.main(cmd_args)
File "/var/www/weave/syncserver/local/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 40: ordinal not in range(128)
Makefile:22: recipe for target 'local/COMPLETE' failed
make: *** [local/COMPLETE] Error 1

python --version

Python 2.7.8

rpm -qa | grep virtualenv

python-virtualenv-1.11.6-1.fc21.noarch

gcc --version

gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

uname -r

3.17.4-301.fc21.x86_64

This seems related to an earlier closed bug. This is with a fresh pull done this evening, so that compiler flag should be in effect.

What else do you need from me?

Thanks!

info messages logged as error by apache mod_wsgi server

I am running syncserver 1.5 using Apache 2.2, mod_wsgi 3.3. When clients connect to the server, the error log fills with info level messages even though I have the log level in apache set to "warn".

From Apache's error log:

[Fri Jun 20 11:03:31 2014] [error] INFO:mozsvc.metrics:{"code": 200, "request_time": 0.005326032638549805, "remoteAddressChain": ["130.86.92.7"], "agent": "Firefox/30.0 FxSync/1.32.0.20140605174243.desktop", "syncstorage.storage.sql.pool.get": 4.315376281738281e-05, "syncstorage.storage.sql.db.execute": 0.002168893814086914, "path": "https://hostname:port/storage/1.5/1/storage/meta/global", "method": "PUT"}

cannot switch to a different thread

After figuring out how to set the server up, I now get the following error whenever my Firefox tries to connect to my server. I tried changing the number of threads and processes apache/wsgi uses, but that does not help. I am running a small virtual server, so I do have just one processor anyway. But that wouldn't hurt the spawning of multiple threads. Anything I can do to remedy this? Also, how many threads does the sync-server need at the minimum? Since only I will use it, I'd like to limit the number of threads to the bare minimum.

Thanks!
a.

[Mon Apr 07 18:51:13 2014] [error] Traceback (most recent call last):
[Mon Apr 07 18:51:13 2014] [error] File "/path/to/syncserver/local/lib/python2.7/site-packages/gevent/event.py", line 287, in _notify_links
[Mon Apr 07 18:51:13 2014] [error] error: cannot switch to a different thread
[Mon Apr 07 18:51:13 2014] [error](built-in method switch of greenlet.greenlet object at 0xa097307c>,
[Mon Apr 07 18:51:13 2014] [error] <gevent.event.AsyncResult object at 0xa0516fac) failed with error
[Mon Apr 07 18:51:13 2014] [error]
[Mon Apr 07 18:51:13 2014] [error] [client] mod_wsgi (pid=6053): Exception occurred processing WSGI script '/path/to/syncserver/syncserver.wsgi'.
[Mon Apr 07 18:51:13 2014] [error] [client] Traceback (most recent call last):
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/router.py", line 251, in call
[Mon Apr 07 18:51:13 2014] [error] [client] response = self.invoke_subrequest(request, use_tweens=True)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/router.py", line 227, in invoke_subrequest
[Mon Apr 07 18:51:13 2014] [error] [client] response = handle_request(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/tokenserver/tweens.py", line 15, in set_x_timestamp_header_tween
[Mon Apr 07 18:51:13 2014] [error] [client] response = handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 115, in fuzz_backoff_headers_tween
[Mon Apr 07 18:51:13 2014] [error] [client] response = handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 71, in log_uncaught_exceptions_tween
[Mon Apr 07 18:51:13 2014] [error] [client] return handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/mozsvc/tweens.py", line 37, in catch_backend_errors_tween
[Mon Apr 07 18:51:13 2014] [error] [client] return handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 120, in convert_non_json_responses_tween
[Mon Apr 07 18:51:13 2014] [error] [client] response = handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 96, in convert_cornice_errors_to_respcodes_tween
[Mon Apr 07 18:51:13 2014] [error] [client] response = handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 52, in set_default_accept_header_tween
[Mon Apr 07 18:51:13 2014] [error] [client] return handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/syncstorage/tweens.py", line 29, in set_x_timestamp_header_tween
[Mon Apr 07 18:51:13 2014] [error] [client] response = handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
[Mon Apr 07 18:51:13 2014] [error] [client] response = handler(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/router.py", line 161, in handle_request
[Mon Apr 07 18:51:13 2014] [error] [client] response = view_callable(context, request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 588, in call
[Mon Apr 07 18:51:13 2014] [error] [client] return view(context, request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 321, in attr_view
[Mon Apr 07 18:51:13 2014] [error] [client] return view(context, request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 297, in predicate_wrapper
[Mon Apr 07 18:51:13 2014] [error] [client] return view(context, request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 347, in rendered_view
[Mon Apr 07 18:51:13 2014] [error] [client] result = view(context, request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/pyramid/config/views.py", line 493, in _requestonly_view
[Mon Apr 07 18:51:13 2014] [error] [client] response = view(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/cornice/service.py", line 506, in wrapper
[Mon Apr 07 18:51:13 2014] [error] [client] validator(request)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/tokenserver/views.py", line 85, in valid_assertion
[Mon Apr 07 18:51:13 2014] [error] [client] assertion = verifier.verify(assertion)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/tokenserver/verifiers.py", line 74, in verify
[Mon Apr 07 18:51:13 2014] [error] [client] headers=headers)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/requests/sessions.py", line 424, in post
[Mon Apr 07 18:51:13 2014] [error] [client] return self.request('POST', url, data=data, *_kwargs)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/requests/sessions.py", line 382, in request
[Mon Apr 07 18:51:13 2014] [error] [client] resp = self.send(prep, *_send_kwargs)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/requests/sessions.py", line 485, in send
[Mon Apr 07 18:51:13 2014] [error] [client] r = adapter.send(request, *_kwargs)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/requests/adapters.py", line 324, in send
[Mon Apr 07 18:51:13 2014] [error] [client] timeout=timeout
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 478, in urlopen
[Mon Apr 07 18:51:13 2014] [error] [client] body=body, headers=headers)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 285, in _make_request
[Mon Apr 07 18:51:13 2014] [error] [client] conn.request(method, url, *_httplib_request_kw)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/usr/lib/python2.7/httplib.py", line 958, in request
[Mon Apr 07 18:51:13 2014] [error] [client] self._send_request(method, url, body, headers)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/usr/lib/python2.7/httplib.py", line 992, in _send_request
[Mon Apr 07 18:51:13 2014] [error] [client] self.endheaders(body)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
[Mon Apr 07 18:51:13 2014] [error] [client] self._send_output(message_body)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
[Mon Apr 07 18:51:13 2014] [error] [client] self.send(msg)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/usr/lib/python2.7/httplib.py", line 776, in send
[Mon Apr 07 18:51:13 2014] [error] [client] self.connect()
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 73, in connect
[Mon Apr 07 18:51:13 2014] [error] [client] timeout=self.timeout,
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/gevent/socket.py", line 570, in create_connection
[Mon Apr 07 18:51:13 2014] [error] [client] for res in getaddrinfo(host, port, 0 if has_ipv6 else AF_INET, SOCK_STREAM):
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/gevent/socket.py", line 621, in getaddrinfo
[Mon Apr 07 18:51:13 2014] [error] [client] return get_hub().resolver.getaddrinfo(host, port, family, socktype, proto, flags)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/gevent/resolver_thread.py", line 34, in getaddrinfo
[Mon Apr 07 18:51:13 2014] [error] [client] return self.pool.apply_e(self.expected_errors, _socket.getaddrinfo, args, kwargs)
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/gevent/threadpool.py", line 222, in apply_e
[Mon Apr 07 18:51:13 2014] [error] [client] success, result = self.spawn(wrap_errors, expected_errors, function, args, kwargs).get()
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/gevent/event.py", line 226, in get
[Mon Apr 07 18:51:13 2014] [error] [client] result = self.hub.switch()
[Mon Apr 07 18:51:13 2014] [error] [client] File "/path/to/syncserver/local/lib/python2.7/site-packages/gevent/hub.py", line 331, in switch
[Mon Apr 07 18:51:13 2014] [error] [client] return greenlet.switch(self)
[Mon Apr 07 18:51:13 2014] [error] [client] LoopExit: This operation would block forever

Python component errors when running under apache 2.2

[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62] mod_wsgi (pid=10690): Target WSGI script '/haven/data/htdocs/ffsync/syncserver.wsgi' cannot be loaded as Python module.
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62] mod_wsgi (pid=10690): Exception occurred processing WSGI script '/haven/data/htdocs/ffsync/syncserver.wsgi'.
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62] Traceback (most recent call last):
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/syncserver.wsgi", line 40, in <module>
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     application = loadapp('config:%s'% ini_file)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     return loadobj(APP, uri, name=name, **kw)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     global_conf=global_conf)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     global_conf=global_conf)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     return loader.get_context(object_type, name, global_conf)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 454, in get_context
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     section)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     object_type, name=use, global_conf=global_conf)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 406, in get_context
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     global_conf=global_conf)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     global_conf=global_conf)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     return loader.get_context(object_type, name, global_conf)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 620, in get_context
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     object_type, name=name)
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     possible.append((entry.load(), protocol, entry.name))
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 1989, in load
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     entry = __import__(self.module_name, globals(),globals(), ['__name__'])
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/haven/data/htdocs/ffsync/syncserver/__init__.py", line 9, in <module>
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     from pyramid.response import Response
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/usr/lib/python2.7/dist-packages/pyramid/__init__.py", line 1, in <module>
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     from pyramid.request import Request
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/usr/lib/python2.7/dist-packages/pyramid/request.py", line 17, in <module>
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     from pyramid.url import URLMethodsMixin
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/usr/lib/python2.7/dist-packages/pyramid/url.py", line 13, in <module>
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     from pyramid.threadlocal import get_current_registry
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/usr/lib/python2.7/dist-packages/pyramid/threadlocal.py", line 3, in <module>
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     from pyramid.registry import global_registry
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]   File "/usr/lib/python2.7/dist-packages/pyramid/registry.py", line 1, in <module>
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62]     from zope.component.registry import Components
[Tue Nov 11 19:50:47 2014] [error] [client 192.168.0.62] ImportError: No module named component.registry

Running on Debian Wheezy x64 with python-zope.component 3.10 installed.

ImportError ExtendedInterpolation

Hi there,
I just cloned the repo and ran make build which went fine. Trying to start the server I get "ImportError: cannot import name ExtendedInterpolation"
I wonder if I'm doing something wrong...
Using Debian 6 python2.7, python2.7-dev and python2.7-virtualenv are installed as required

Distribution package making

Hi

Is it possible not to install python dependencies with make build ? It would be possible to use distribution packages instead.

Docker container

A nice to have would be an up to date Docker image to make deployment and testing easier. Perhaps also an AMI? Maybe we should look at http://www.packer.io/ or something for this kind of thing.

Very little logging with https-certificate problems

I am fiddling around with my own 1.5 syncserver, but stumbled over a problem, that could still use some error handling.

I entered my domain-name and startet a sync. But absolutely nothing happened.
Later i figured out, that i have several applications on that domain, that use https and firefox will default back to https, if there has been a point in time, where https has been used for that domain. (I read that somewhere, is that true?)

So in this case, on the client-side there is no information or logging and the connection is never established.

If you feel, that this issue is to simple or most users that install their own sync-server know, what they are doing, then feel free to just close this issue. :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.