Bug#798610: ciderwebmail: Error message "Please come back later" shown when running via uWSGI

2015-09-12 Thread Jonas Smedegaard
[resent, adding bugreport as recipient]

Quoting James Valleroy (2015-09-12 04:03:51)
> On 09/11/2015 07:06 PM, Jonas Smedegaard wrote:
>> I will leave this bug open, treating it a as a bug in the default 
>> snippet.
>
> Could I also suggest moving the snippet to 
> /etc/apache2/conf-available/ciderwebmail.conf? That will make it 
> slightly easier to enable with a2enconf (in Apache 2.4).

Good point.  Not sure how well it fares with existing users, however - I 
will consider it!


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#798610: ciderwebmail: Error message "Please come back later" shown when running via uWSGI

2015-09-11 Thread Jonas Smedegaard
Hi James,

Quoting James Valleroy (2015-09-11 01:22:21)
> I attempted to integrate ciderwebmail with Apache2 via uWSGI, based on 
> the instructions given in README.Debian. But when I access 
> http://localhost/cider, I just get a page that says "(en) Please come 
> back later" (along with several other translations of that error 
> message). I don't see any error messages in the uwsgi logs.

From your description it sounds like CiderWebmail instance may be served 
perfectly fine, but the Apache2 proxy is misconfigured to redirect to it 
somehow.

> This was tested on a fresh installation using the latest Debian stretch
> installer, then dist-upgraded to sid. Here's a list of the steps I took:
> # apt install apache2 uwsgi uwsgi-plugin-psgi
> # apt install libapache2-mod-uwsgi
> # ln -s -t /etc/uwsgi/apps-enabled ../apps-available/ciderwebmail.ini
> # ln -s -t /etc/apache2/conf-enabled /etc/ciderwebmail/apache-uwsgi.conf
> # service uwsgi restart ciderwebmail
> # service apache2 restart

How did you configure apache apart from that?  In particular, which 
uWSGI driver did you install and how was it configured in apache? 
(there's arguably a documentation flaw of not covering that aspect of 
setting up CiderWebmail...)


> I've attached the log file (/var/log/uwsgi/app/ciderwebmail.log).

Please provide apache logs too - and if you dd _any_ customization of 

Please also provide relevant parts of your apache2 config (e.g. vhost 
setup, if any).


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#798610: ciderwebmail: Error message "Please come back later" shown when running via uWSGI

2015-09-11 Thread James Valleroy
On 09/11/2015 04:30 AM, Jonas Smedegaard wrote:
> Hi James,
> 
> Quoting James Valleroy (2015-09-11 01:22:21)
>> I attempted to integrate ciderwebmail with Apache2 via uWSGI, based on 
>> the instructions given in README.Debian. But when I access 
>> http://localhost/cider, I just get a page that says "(en) Please come 
>> back later" (along with several other translations of that error 
>> message). I don't see any error messages in the uwsgi logs.
> 
> From your description it sounds like CiderWebmail instance may be served 
> perfectly fine, but the Apache2 proxy is misconfigured to redirect to it 
> somehow.

The page showing the error doesn't look like a usual Apache error page.
I attached a screenshot.

>> This was tested on a fresh installation using the latest Debian stretch
>> installer, then dist-upgraded to sid. Here's a list of the steps I took:
>> # apt install apache2 uwsgi uwsgi-plugin-psgi
>> # apt install libapache2-mod-uwsgi
>> # ln -s -t /etc/uwsgi/apps-enabled ../apps-available/ciderwebmail.ini
>> # ln -s -t /etc/apache2/conf-enabled /etc/ciderwebmail/apache-uwsgi.conf
>> # service uwsgi restart ciderwebmail
>> # service apache2 restart
> 
> How did you configure apache apart from that?  In particular, which 
> uWSGI driver did you install and how was it configured in apache? 
> (there's arguably a documentation flaw of not covering that aspect of 
> setting up CiderWebmail...)

There was no additional configuration other than what's shown above. I
just installed libapache2-mod-uwsgi, and it enabled itself after install.

I've attached a listing/printout of my configuration (apache-configs.txt).

> 
>> I've attached the log file (/var/log/uwsgi/app/ciderwebmail.log).
> 
> Please provide apache logs too - and if you dd _any_ customization of 
> 
> Please also provide relevant parts of your apache2 config (e.g. vhost 
> setup, if any).

I've attached the apache logs.

Thanks for the quick response!

--
James


apache_logs.tar.gz
Description: application/gzip
jvalleroy@debian:/etc/apache2$ ls sites-enabled/
000-default.conf
jvalleroy@debian:/etc/apache2$ cat sites-enabled/000-default.conf 

# The ServerName directive sets the request scheme, hostname and port 
that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
jvalleroy@debian:/etc/apache2$ ls mods-enabled/
access_compat.load  authz_host.load  dir.loadnegotiation.conf
alias.conf  authz_user.load  env.loadnegotiation.load
alias.load  autoindex.conf   filter.load setenvif.conf
auth_basic.load autoindex.load   mime.conf   setenvif.load
authn_core.load deflate.conf mime.load   status.conf
authn_file.load deflate.load mpm_event.conf  status.load
authz_core.load dir.conf mpm_event.load  uwsgi.load
jvalleroy@debian:/etc/apache2$ ls conf-enabled/
apache2-uwsgi.conf  localized-error-pages.confsecurity.conf
charset.confother-vhosts-access-log.conf  serve-cgi-bin.conf
jvalleroy@debian:/etc/apache2$ cat conf-enabled/apache2-uwsgi.conf 

SetHandler uwsgi-handler
uWSGISocket /run/uwsgi/app/ciderwebmail/socket

jvalleroy@debian:/etc/apache2$ 


signature.asc
Description: OpenPGP digital signature


Bug#798610: ciderwebmail: Error message "Please come back later" shown when running via uWSGI

2015-09-11 Thread James Valleroy
On 09/11/2015 06:15 PM, Jonas Smedegaard wrote:
> Ahhh, I thinks I found the cause of the problem: You are missing a final 
> slash in your URL: Try this instead: http://localhost/cider/
> 
> I use this in my vhost config - probably makes sense to add the same to 
> the snippet shipped with the package:
> 
>   RedirectMatch permanent ^/cider$ /cider/
> 
> 
>  - Jonas
> 

Yes, that works, thanks!

--
James



signature.asc
Description: OpenPGP digital signature


Bug#798610: ciderwebmail: Error message "Please come back later" shown when running via uWSGI

2015-09-11 Thread Jonas Smedegaard
Quoting James Valleroy (2015-09-11 22:47:12)
> On 09/11/2015 04:30 AM, Jonas Smedegaard wrote:
>> Quoting James Valleroy (2015-09-11 01:22:21)
>>> I attempted to integrate ciderwebmail with Apache2 via uWSGI, based 
>>> on the instructions given in README.Debian. But when I access 
>>> http://localhost/cider, I just get a page that says "(en) Please 
>>> come back later" (along with several other translations of that 
>>> error message). I don't see any error messages in the uwsgi logs.
>>
>> From your description it sounds like CiderWebmail instance may be 
>> served perfectly fine, but the Apache2 proxy is misconfigured to 
>> redirect to it somehow.
>
> The page showing the error doesn't look like a usual Apache error 
> page.

uWSGI has two parts:
  * Each app spawns and offers connections via a UNIX socket
  * A reverse proxy routes http(s) connections to those UNIX sockets

Your comment of "[no] error messages in the uwsgi logs" means the app 
part seemingly works fine.

The error served when browsing into the URL comes from the reverse proxy 
- the log files for that is the apache2 log.

> I attached a screenshot.

Ahhh, I thinks I found the cause of the problem: You are missing a final 
slash in your URL: Try this instead: http://localhost/cider/

I use this in my vhost config - probably makes sense to add the same to 
the snippet shipped with the package:

  RedirectMatch permanent ^/cider$ /cider/


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#798610: ciderwebmail: Error message "Please come back later" shown when running via uWSGI

2015-09-11 Thread Jonas Smedegaard
Quoting James Valleroy (2015-09-12 00:20:44)
> On 09/11/2015 06:15 PM, Jonas Smedegaard wrote:
>> Ahhh, I thinks I found the cause of the problem: You are missing a final 
>> slash in your URL: Try this instead: http://localhost/cider/
>> 
>> I use this in my vhost config - probably makes sense to add the same to 
>> the snippet shipped with the package:
>> 
>>   RedirectMatch permanent ^/cider$ /cider/

> Yes, that works, thanks!

Phew :-)

I will leave this bug open, treating it a as a bug in the default 
snippet.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#798610: ciderwebmail: Error message "Please come back later" shown when running via uWSGI

2015-09-11 Thread James Valleroy
On 09/11/2015 07:06 PM, Jonas Smedegaard wrote:
> I will leave this bug open, treating it a as a bug in the default 
> snippet.

Could I also suggest moving the snippet to
/etc/apache2/conf-available/ciderwebmail.conf? That will make it
slightly easier to enable with a2enconf (in Apache 2.4).

--
James



signature.asc
Description: OpenPGP digital signature


Bug#798610: ciderwebmail: Error message "Please come back later" shown when running via uWSGI

2015-09-10 Thread James Valleroy
Package: ciderwebmail
Version: 1.05-5
Severity: normal

Dear Maintainer,

I attempted to integrate ciderwebmail with Apache2 via uWSGI, based on
the instructions given in README.Debian. But when I access
http://localhost/cider, I just get a page that says "(en) Please come
back later" (along with several other translations of that error
message). I don't see any error messages in the uwsgi logs.

Ciderwebmail is working fine when run with plackup. I get to the login
screen.

This was tested on a fresh installation using the latest Debian stretch
installer, then dist-upgraded to sid. Here's a list of the steps I took:
# apt install apache2 uwsgi uwsgi-plugin-psgi
# apt install libapache2-mod-uwsgi
# ln -s -t /etc/uwsgi/apps-enabled ../apps-available/ciderwebmail.ini
# ln -s -t /etc/apache2/conf-enabled /etc/ciderwebmail/apache-uwsgi.conf
# service uwsgi restart ciderwebmail
# service apache2 restart

I've attached the log file (/var/log/uwsgi/app/ciderwebmail.log).

--
James



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 4.1.0-2-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ciderwebmail depends on:
ii  adduser 3.113+nmu3
ii  dpkg1.18.2
ii  libcatalyst-action-renderview-perl  0.16-2
ii  libcatalyst-authentication-credential-http-perl 1.016-2
ii  libcatalyst-model-dbic-schema-perl  0.65-1
ii  libcatalyst-perl [libcatalyst-plugin-unicode-encoding-perl  5.90097-1
ii  libcatalyst-plugin-authentication-perl  0.10023-2
ii  libcatalyst-plugin-configloader-perl0.34-2
ii  libcatalyst-plugin-log-dispatch-perl0.121-2
ii  libcatalyst-plugin-session-state-cookie-perl0.17-3
ii  libcatalyst-plugin-session-store-fastmmap-perl  0.16-2
ii  libcatalyst-plugin-stacktrace-perl  0.12-2
ii  libcatalyst-plugin-static-simple-perl   0.33-1
ii  libcatalyst-view-petal-perl 0.03-1
ii  libclone-perl   0.38-1
ii  libcrypt-cbc-perl   2.33-1
ii  libcrypt-random-source-perl 0.08-2
ii  libcrypt-rijndael-perl  1.13-1
ii  libcrypt-util-perl  0.11-3
ii  libdata-ical-perl   0.22+dfsg-1
ii  libdatetime-format-iso8601-perl 0.08-2
ii  libdatetime-format-mail-perl0.4010-1
ii  libdatetime-perl2:1.20-1
ii  libemail-address-perl   1.907-1
ii  libemail-sender-perl1.300020-1
ii  libemail-simple-perl2.208-1
ii  libemail-valid-perl 1.196-1
ii  libhtml-defang-perl 1.04-2
ii  libhtml-tidy-perl   1.56-1+b1
ii  libio-socket-ssl-perl   2.019-1
ii  libjson-xs-perl 3.010-2
ii  liblist-moreutils-perl  0.413-1
ii  liblocale-maketext-gettext-perl 1.28-2
ii  liblog-dispatch-config-perl 1.04-1
ii  liblog-dispatch-perl2.45-1
ii  libmail-imapclient-perl 3.37-1
ii  libmime-base64-urlsafe-perl 0.01-1
ii  libmime-tools-perl  5.505-1
ii  libmoose-perl   2.1405-1
ii  libmoosex-role-withoverloading-perl 0.15-1+b1
ii  libnet-managesieve-perl 0.10-1
ii  libparse-recdescent-perl
1.967009+dfsg-2
ii  libpetal-utils-perl 0.06-3
ii  libregexp-common-email-address-perl 1.01-4
ii  libregexp-common-perl   2013031301-1
ii  libtext-autoformat-perl 1.72-1
ii  libtext-iconv-perl  1.7-5+b2
ii  libtry-tiny-perl0.22-1
ii  libtry-tiny-smartcatch-perl 0.5-1
ii  liburi-perl 1.69-1
ii  libyaml-libyaml-perl