synchrone / sandstorm-radicale

A calendars and contacts app for Sandstorm.io
https://apps.sandstorm.io/app/8kr4rvyrggvzfvc160htzdt4u5rfvjc2dgdn27n5pt66mxa40m1h
13 stars 3 forks source link

Failed to start grain with Fatal Python error #6

Closed funwhilelost closed 8 years ago

funwhilelost commented 8 years ago

Tried to boot v3 on my self-hosted Sandstorm (on Ubuntu) and it failed to start. Here's a log snippet:

...** SANDSTORM SUPERVISOR: Starting up grain.
Starting new instance (carddav)
waiting for uwsgi to be available at /var/run/uwsgi.sock
*** Starting uWSGI 2.0.7-debian (64bit) on [Wed Feb 10 01:35:38 2016] ***
compiled with version: 4.9.1 on 25 October 2014 19:17:54
os: Linux-3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015
nodename: sandbox
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /
detected binary path: uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 3750
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /var/run/uwsgi.sock fd 3
Python version: 3.4.2 (default, Oct  8 2014, 10:47:48)  [GCC 4.9.1]
Set PythonHome to /opt/app/env
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions registered: can't find encoding
Starting NGINX (carddav)
2016/02/10 01:35:41 [error] 16#0: *56 connect() to unix:///var/run/uwsgi.sock failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "REPORT /radicale/owner/addressbook.vcf/ HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi.sock:", host: "5bc8bfb3526d077dce68972e4d43d63b.sandstorm._____.___"
2016/02/10 01:35:45 [error] 16#0: *164 connect() to unix:///var/run/uwsgi.sock failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "REPORT /radicale/owner/addressbook.vcf/ HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi.sock:", host: "5bc8bfb3526d077dce68972e4d43d63b.sandstorm.______.___"
synchrone commented 8 years ago

For some reason, this happens in production mode with python3.

That needs to be investigated, in the mean time I will rollback to python2

synchrone commented 8 years ago

Decided to stick with python3. Resolved by 9ae8aeac03ac0c13f73150cbf831bac82311a0b5

funwhilelost commented 8 years ago

Great. Thank you. I'll drop in the new package as soon as the spk is ready.

synchrone commented 8 years ago

v4 was tagged and the build is attached to the release

funwhilelost commented 8 years ago

Excellent. It's working perfectly.