Hi Ryan,

Am 10.02.2016 um 08:36 schrieb Ryan Kelly:
> On 5/02/2016 23:37, Nikolaus Thümmel wrote:
>> I was recently trying to set up a personal firefox sync + account
>> server,
> Thanks for reaching out, and sorry for the delay replying here.  I'm
> always happy to hear about people trying this out, even if it doesn't
> always go as smoothly as we might like...
No problem, it's great you are helping to figure this out!
>> and wondered how to set up the fxa-auth-server in production
>> mode. What is the "official" way of doing so?
> It probably doesn't sound suitably "official", but in production we run
> fxa-auth-server under the circus process manager [1], running a command
> like this (but all on one line obviously):
>
>   CONFIG_FILES=/path/to/config/file.json \
>   NODE_ENV=prod \
>   ./scripts/start-server.sh
>
> Stdout and stderr are directed to log files and slurped up by our log
> aggregation software.
>
> On the same box, we also run the auth-db-mysql server as:
>
>   /usr/bin/node ./bin/server.js
Auth-db-mysql was already running fine, and using the start-server.sh
script I also got the auth-server running with the correct configuration
in a production environment. Thank you!
>
>> It looks like all npm scripts are actually enforcing NODE_ENV=dev.
> IIUC this is mostly just so they're easy to use in dev and testing
> environments.  Perhaps we should change them to respect any existing
> NODE_ENV= environment variable rather than always overwriting it to dev.
>
>> Also, when running in this enforced dev mode, there is a hidden file
>> test/.env.dev which seems to overwrite some config entries with some
>> arbitrary values. Why?
> This is an envc [2] settings file, just used as a convenient way to
> store the settings necessary to run the tests.
Thanks, that makes sense, I guess. I think it would be very helpful if
the behaviour was to be documented in the README (it took me a while to
figure out while I could not run in production mode and why my
configuration was overridden). Considering already present NODE_ENV
would also be great, currently it is a bit inconsistent with the other
services, where you can run the server in a production environment using
npm start.
> I hope this helps a little, please feel free to ask any follow-up
> questions here as well.
Having the servers up and running I am struggling with a new problem. I
am able to register a new account and log in to existing ones, but once
I am logged in, I am confronted by an "unexpected error" message, which
roughly translates to: "System not available, please try again later."
This is a bit strange since I can only see result code 200 / errno 0
messages in the server logs. Example from the auth-server log:

{"Timestamp":1455113872527000000,"Logger":"fxa-auth-server","Type":"request.summary","Severity":6,"Pid":4624,"EnvVersion":"2.0","Fields":{"op":"request.summary","code":200,"errno":0,"rid":"1455113872522:ffsync2:4624:ikgwijce:10054","path":"/v1/session/status","lang":"de,en-US;q=0.7,en;q=0.3","agent":"Mozilla/5.0
(Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101
Firefox/44.0","remoteAddressChain":"[\"192.168.1.50\",\"127.0.0.1\"]","t":5,"uid":"<myuserid>"}}

Same goes for the auth-db-mysql and content-server, no error codes
there. So I wonder what is causing the error which can be observed in
the user interface. I also tried pairing it with a syncserver and tried
to synchronize, though being able to log in, synchronization is never
happening and I am asked to log in again after the first try. The
about:sync-log is giving me an unauthorized error:

1455112853599 Sync.BrowserIDManager ERROR Could not authenticate:
{"details":{"now":"2016-02-10T14:00:53.578Z","message":"Authentication
failed.","cause":"invalid-credentials","response_body":"{\"status\":
\"invalid-credentials\", \"errors\": [{\"location\": \"body\", \"name\":
\"\", \"description\":
\"Unauthorized\"}]}","response_headers":{"content-type":"application/json;
charset=UTF-8","date":"Wed, 10 Feb 2016 14:00:58
GMT","x-timestamp":"1455112858","content-length":"110","connection":"keep-alive"},"response_status":401,"name":"TokenServerClientServerError"}}

I am 100% sure the credentials are correct though. Also, the login page
is not showing any "wrong credentials" error messages.
Note: I did carry over an old accounts database from a previous account
server installation. It doesn't make a difference whether I use old
accounts or freshly created accounts though. Also, I created a new
public/secret keypair for the auth-server.
Do you have an idea what could be wrong here?

Thank you!
Nikolaus

_______________________________________________
Dev-fxacct mailing list
[email protected]
https://mail.mozilla.org/listinfo/dev-fxacct

Reply via email to