Baruwa 2.0.1 installation problem on Debian Wheezy

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Baruwa 2.0.1 installation problem on Debian Wheezy

Botka Istvan
Hi All,

I have used baruwa 1.x on my debian 6 based mail gateway box with
postfix  since a lot.
I have upgraded the debian to Wheezy and I would like to upgrade
(reinstall  a fresh 2.0.1) on same host.


I have did the instructions from Baruwa 2 Community Install Guide
(https://www.baruwa.org/docs/2.0/community/install.html) but I've got
some issues. Some of them already fixed:

- The "curl -O" does not download anything but "curl -LO" does it.
- The path in the python virtualenv has changed from px/lib/python2.6/
to px/lib/python2.7

- M2Crypto seems to installing via pip without error (version 0.22.3)
I have read the patch from
https://github.com/akissa/baruwa2/blob/master/extras/patches/0002-Disable-SSLv2_method.patch
and found that the M2Crypto-0.22.3/SWIG/_ssl.i does not contain SSLv2
anymore (but SSLv23).

-PostgreSQL:
On my box the PostgreSQL cluster has been initalized with SQL-ASCII
instead of UTF-8.
I found a fix (https://groups.google.com/forum/#!topic/mlug-au/ywJJKYhje70):
pg_dropcluster --stop 9.1 main
pg_createcluster --start -e UTF-8 9.1 main


- Sphinx :
/etc/init.d/sphinxsearch start
Starting sphinxsearch: Sphinx 2.0.4-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
WARNING: compat_sphinxql_magics=1 is deprecated; please update your
application and config
FATAL: failed to lock pid file '/var/log/sphinxsearch/searchd.pid':
Resource temporarily unavailable (searchd already running?)
 ERROR.

There is a missing compat_sphinxql_magics=0 from the searchd section of
sphinx.conf.
The pid file has wrong path in sphinx.conf also. It is need to be in
/var/run instead of /var/log.

I'm suggesting the following patch:
--- a/sphinx.conf 2014-06-10 16:51:34.000000000 +0200
+++ b/sphinx.conf 2014-06-10 18:21:05.000000000 +0200
@@ -5,6 +5,7 @@

 searchd
 {
+    compat_sphinxql_magics=0
     listen = 127.0.0.1:9312
     listen = 127.0.0.1:9306:mysql41
     log = /var/log/sphinxsearch/searchd.log
     query_log  = /var/log/sphinxsearch/query.log
     read_timeout = 5
     max_children = 30
-    pid_file     = /var/log/sphinxsearch/searchd.pid
+    pid_file     = /var/run/sphinxsearch/searchd.pid
     max_matches  = 500
     seamless_rotate = 1
     preopen_indexes = 0



The sphinx is running fine in my environment now.

- In the step 5e of install guide I got a warning and an error when I
starting celery daemon by the
paster celeryd /etc/baruwa/production.ini -f /var/log/baruwa/celeryd.log &
command.
- The warning is about deprecated celery configurationin the
production.ini. It would be use "broker.url"  instead of combination
broker.host, broker.port, broker.user, broker.password and
broker.vhost.  I have edited the production.ini like this:

# celery settings
#broker.host = 127.0.0.1
#broker.port = 5672
#broker.user = baruwa
#broker.password = mysecretpw
#broker.vhost = baruwa
broker.url = amqp://baruwa:mysecretpw@127.0.0.1:5672/baruwa

It is fix the warning.

- The error traceback:
Traceback (most recent call last):
  File "/home/baruwa/px/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/paste/script/command.py",
line 104, in run
    invoke(command, command_name, options, args[1:])
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/paste/script/command.py",
line 143, in invoke
    exit_code = runner.run(args)
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/baruwa/lib/mq/commands.py",
line 77, in run
    return super(BasePasterCommand, self).run(args[1:])
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/paste/script/command.py",
line 238, in run
    result = self.command()
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/baruwa/lib/mq/commands.py",
line 119, in command
    return cmd.run(**vars(self.options))
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/celery/bin/celeryd.py",
line 153, in run
    return self.app.Worker(**kwargs).run()
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/celery/apps/worker.py",
line 162, in run
    self.app.loader.init_worker()
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/celery/loaders/base.py",
line 130, in init_worker
    self.import_default_modules()
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/celery/loaders/base.py",
line 123, in import_default_modules
    tuple(maybe_list(self.app.conf.CELERY_INCLUDE))
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/celery/loaders/base.py",
line 106, in import_task_module
    return self.import_from_cwd(module)
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/celery/loaders/base.py",
line 115, in import_from_cwd
    package=package,
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/celery/utils/imports.py",
line 99, in import_from_cwd
    return imp(module, package=package)
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/celery/loaders/base.py",
line 109, in import_module
    return importlib.import_module(module, package=package)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/baruwa/tasks/__init__.py",
line 11, in <module>
    from baruwa.tasks.domains import test_smtp_server, exportdomains
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/baruwa/tasks/domains.py",
line 23, in <module>
    from baruwa.tasks.organizations import DOMAINFIELDS, DAFIELDS
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/baruwa/tasks/organizations.py",
line 26, in <module>
    from baruwa.forms.domains import AddDomainForm, AddDomainAlias
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/baruwa/forms/domains.py",
line 40, in <module>
    LANGUAGES = [lang.popitem() for lang in get_languages()]
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/baruwa/lib/misc.py",
line 120, in <genexpr>
    for lang in langs if check_language(lang))
  File
"/home/baruwa/px/local/lib/python2.7/site-packages/babel/core.py", line
150, in __init__
    raise UnknownLocaleError(identifier)
babel.core.UnknownLocaleError: unknown locale 'no'

I have tried to downgrade Babel package via pip. Only the
pip install babel==0.9.6
was ok. All of Babel 1.x packages producing unknown locale error 'no'.

- In the step 5f
The
paster serve --reload /etc/baruwa/production.ini
starts the internal webserver but I'm getting only an HTTP 500 error on
browser,
On console:
Error - <type 'exceptions.AttributeError'>: 'HTTPUnauthorized' object
has no attribute 'exception'

By email:

URL: http://karanten.duf.hu:5000/
File '/home/baruwa/px/local/lib/python2.7/site-packages/weberror/errormiddleware.py', line 162 in __call__
  app_iter = self.application(environ, sr_checker)
File '/home/baruwa/px/local/lib/python2.7/site-packages/repoze/who/middleware.py', line 107 in __call__
  app_iter = app(environ, wrapper.wrap_start_response)
File '/home/baruwa/px/local/lib/python2.7/site-packages/beaker/middleware.py', line 155 in __call__
  return self.wrap_app(environ, session_start_response)
File '/home/baruwa/px/local/lib/python2.7/site-packages/routes/middleware.py', line 131 in __call__
  response = self.app(environ, start_response)
File '/home/baruwa/px/local/lib/python2.7/site-packages/pylons/wsgiapp.py', line 103 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/home/baruwa/px/local/lib/python2.7/site-packages/pylons/wsgiapp.py', line 313 in dispatch
  return controller(environ, start_response)
File '/home/baruwa/px/local/lib/python2.7/site-packages/baruwa/lib/base.py', line 93 in __call__
  return WSGIController.__call__(self, environ, start_response)
File '/home/baruwa/px/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 214 in __call__
  response = self._dispatch_call()
File '/home/baruwa/px/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 164 in _dispatch_call
  response = self._inspect_call(func)
File '/home/baruwa/px/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 107 in _inspect_call
  result = self._perform_call(func, args)
File '/home/baruwa/px/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 57 in _perform_call
  return func(**args)
File '<string>', line 2 in index
File '/home/baruwa/px/local/lib/python2.7/site-packages/repoze/what/plugins/pylonshq/protectors.py', line 117 in wrap_action
  abort(code, comment=reason)
File '/home/baruwa/px/local/lib/python2.7/site-packages/pylons/controllers/util.py', line 210 in abort
  raise exc.exception
AttributeError: 'HTTPUnauthorized' object has no attribute 'exception'


The install guide directs me to this list when I getting error at this
point.
So I'm there and waiting for some help.
What I did wrong?

--
By(t)e,

_______________________________________________
http://pledgie.com/campaigns/12056
AJ
Reply | Threaded
Open this post in threaded view
|

Re: Baruwa 2.0.1 installation problem on Debian Wheezy

AJ
Hi there,


> AttributeError: 'HTTPUnauthorized' object has no attribute 'exception'

I have gone through all of the same issues as you have, and am having the
same problem.

I have gone a little further than you and deployed this using the Apache2
method from the installation guide. This worked except I had to update the
apache2 site configuration file to use python2.7 folder locations, but I do
receive the same error as above.

I do notice one other behavior, if I use this URL:

http://127.0.0.1/accounts/login

I get a login page where I am able to log in, then promptly get another 500
error. But, if I again change the URL to the following:

http://127.0.0.1/

This will take me to the main page.

This feels like a problem with a redirect, but I don't know where to look in
order to find the cause of this error.

Can anyone help us?

AJ



_______________________________________________
http://pledgie.com/campaigns/12056
AJ
Reply | Threaded
Open this post in threaded view
|

Re: Baruwa 2.0.1 installation problem on Debian Wheezy

AJ
Hi again,

It would appear that I have found a fix to this issue:

pip uninstall webob
pip install webob==1.3

According to the below post they removed the "exception" attribute.


I'm not sure if downgrading the webob package is the right thing to do, but it did appear to work for the time being.

If anyone knows of a better solution, please let us know.

Regards,
AJ



On Thu, Jun 12, 2014 at 11:00 AM, AJ <[hidden email]> wrote:
Hi there,


> AttributeError: 'HTTPUnauthorized' object has no attribute 'exception'

I have gone through all of the same issues as you have, and am having the
same problem.

I have gone a little further than you and deployed this using the Apache2
method from the installation guide. This worked except I had to update the
apache2 site configuration file to use python2.7 folder locations, but I do
receive the same error as above.

I do notice one other behavior, if I use this URL:

BARUWA MAILFW warning: numerical links are often malicious: http://127.0.0.1/accounts/login

I get a login page where I am able to log in, then promptly get another 500
error. But, if I again change the URL to the following:

BARUWA MAILFW warning: numerical links are often malicious: http://127.0.0.1/

This will take me to the main page.

This feels like a problem with a redirect, but I don't know where to look in
order to find the cause of this error.

Can anyone help us?

AJ



_______________________________________________
http://pledgie.com/campaigns/12056


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: Baruwa 2.0.1 installation problem on Debian Wheezy

Botka Istvan
In reply to this post by AJ
Hi AJ,

6/12/2014 20:00 keltezéssel, AJ írta:
>> AttributeError: 'HTTPUnauthorized' object has no attribute 'exception'
> I have gone through all of the same issues as you have, and am having the
> same problem.
>
> I have gone a little further than you and deployed this using the Apache2
> method from the installation guide. This worked except I had to update the
> apache2 site configuration file to use python2.7 folder locations, but I do
> receive the same error as above.
I have had already deployed into apache and got same error. The error is
not depend on the calling side (paster serve, apache+wsgi and I'm think
the nginx+uwsgi will be same).

Thanks,
Istvan Botka

_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: {Disarmed} Re: Baruwa 2.0.1 installation problem on Debian Wheezy

Botka Istvan
In reply to this post by AJ
2014.06.12. 20:41 keltezéssel, Angus Jordan írta:
>
> pip uninstall webob
> pip install webob==1.3
>

Yep! it's works for me also.


_______________________________________________
http://pledgie.com/campaigns/12056