Hi list! I'm trying to install Baruwa 2 on a FreeBSD (9) server I have two problems when I test it with "paster serve":
- Some of the (statics) contents are missing (got 404) like /css/grid.css or /js/baruwa/common.js. Static_files "true" or "false" in production.ini give me the same result. - Paster serve throw some exceptions like "AttributeError: 'NoneType' object has no attribute 'twophase'" (see it below). As it's seems to be related to sqlalchemy, I've also checked the connection to the db with the same username/password/port/db and everything seems good. Any idea are welcome ! Thank you. PS: I'm running python 2.7 and the last python modules you can have with pip. CGI Variables ------------- AUTH_TYPE: 'cookie' CONTENT_LENGTH: '0' HTTP_ACCEPT: 'text/css,*/*;q=0.1' HTTP_ACCEPT_CHARSET: 'ISO-8859-1,utf-8;q=0.7,*;q=0.3' HTTP_ACCEPT_ENCODING: 'gzip,deflate,sdch' HTTP_ACCEPT_LANGUAGE: 'en-GB,en-US;q=0.8,en;q=0.6' HTTP_CONNECTION: 'keep-alive' HTTP_COOKIE: 'baruwaauth="0e474ff---71f24admin!<repoze.who.plugins.sa.SQLAlchemyAuthe nticatorPlugin object at 0x80a3629d0>,!userid_type:unicode"; baruwa=674d---25ff06b1f91abbf8053dbbeca4c0a46a65' HTTP_HOST: '172.31.0.23:5000' HTTP_REFERER: 'http://172.31.0.23:5000/css/grid.css' HTTP_USER_AGENT: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11' PATH_INFO: '/css/text.css' REMOTE_ADDR: '10.6.1.117' REMOTE_USER_DATA: 'userid_type:unicode' REMOTE_USER_TOKENS: ['<repoze.who.plugins.sa.SQLAlchemyAuthenticatorPlugin object at 0x80a3629d0>', ''] REQUEST_METHOD: 'GET' SERVER_NAME: '0.0.0.0' SERVER_PORT: '5000' SERVER_PROTOCOL: 'HTTP/1.1' WSGI Variables -------------- application: <baruwa.lib.auth.middleware.BaruwaPAM object at 0x8041982d0> paste.cookies: (<SimpleCookie: baruwa='674d586178bcba25ff06b1f91abbf8053dbbeca4c0a2bc9b25984aeba0cf881a 08046a65' baruwaauth='0e474ff73ef918af41ee99846beded3450b71f24admin!<repoze.who.pl ugins.sa.SQLAlchemyAuthenticatorPlugin object at 0x80a3629d0>,!userid_type:unicode'>, 'baruwaauth="0e474ff73ef918af41ee99846beded3450b71f24admin!<repoze.who.p lugins.sa.SQLAlchemyAuthenticatorPlugin object at 0x80a3629d0>,!userid_type:unicode"; baruwa=674d586178bc ba25ff06b1f91abbf8053dbbeca4c0a2bc9b25984aeba0cf881a08046a65') paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0x80a77d910> paste.registry: <paste.registry.Registry object at 0x811bc6910> paste.throw_errors: True repoze.who.application: <beaker.middleware.SessionMiddleware object at 0x80a77d1d0> repoze.who.logger: <logging.Logger object at 0x80a77d590> repoze.who.plugins: {'authorization_md': <repoze.what.middleware.AuthorizationMetadata object at 0x806733a50>, 'form': <FriendlyFormPlugin 34535364944>, 'baruwa_pop3_auth': <baruwa.lib.auth.pop3auth.BaruwaPOPAuthPlugin obje ct at 0x80ef1f810>, 'baruwa_smtp_auth': <baruwa.lib.auth.smtpauth.BaruwaSMTPAuthPlugin object at 0x80e0fced0>, 'baruwa_radius_auth': <baruwa.lib.auth.radiusauth.BaruwaRadiusAuthPlugin object at 0x80a783c90>, 'sa_auth': <repoz e.who.plugins.sa.SQLAlchemyAuthenticatorPlugin object at 0x80a77db50>, 'auth_tkt': <AuthTktCookiePlugin 34610643856>, 'baruwa_imap_auth': <baruwa.lib.auth.imapauth.BaruwaIMAPAuthPlugin object at 0x80ef1f990>, 'sa_md': <repoze .who.plugins.sa.SQLAlchemyUserMDPlugin object at 0x80ef29850>, 'baruwa_ldap_auth': <BaruwaLDAPAuthPlugin 34535387216>} webob._parsed_query_vars: (GET([]), '') wsgi process: 'Multithreaded' ------------------------------------------------------------ Exception happened during processing of request from ('10.6.1.117', 1444) Traceback (most recent call last): File "/usr/home/baruwa/px/lib/python2.7/site-packages/paste/httpserver.py", line 1068, in process_request_in_thread self.finish_request(request, client_address) File "/usr/local/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/local/lib/python2.7/SocketServer.py", line 638, in __init__ self.handle() File "/usr/home/baruwa/px/lib/python2.7/site-packages/paste/httpserver.py", line 442, in handle BaseHTTPRequestHandler.handle(self) File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 340, in handle self.handle_one_request() File "/usr/home/baruwa/px/lib/python2.7/site-packages/paste/httpserver.py", line 437, in handle_one_request self.wsgi_execute() File "/usr/home/baruwa/px/lib/python2.7/site-packages/paste/httpserver.py", line 287, in wsgi_execute self.wsgi_start_response) File "/usr/home/baruwa/px/lib/python2.7/site-packages/paste/cascade.py", line 130, in __call__ return self.apps[-1](environ, start_response) File "/usr/home/baruwa/px/lib/python2.7/site-packages/paste/registry.py", line 379, in __call__ app_iter = self.application(environ, start_response) File "/usr/home/baruwa/px/lib/python2.7/site-packages/pylons/middleware.py", line 177, in __call__ self.app, new_environ, catch_exc_info=True) File "/usr/home/baruwa/px/lib/python2.7/site-packages/pylons/util.py", line 50, in call_wsgi_application app_iter = application(environ, start_response) File "/usr/home/baruwa/px/lib/python2.7/site-packages/weberror/errormiddlewar e.py", line 156, in __call__ return self.application(environ, start_response) File "/usr/home/baruwa/px/lib/python2.7/site-packages/repoze/who/middleware.p y", line 85, in __call__ self.add_metadata(environ, classification, identity) File "/usr/home/baruwa/px/lib/python2.7/site-packages/repoze/who/middleware.p y", line 179, in add_metadata plugin.add_metadata(environ, identity) File "/usr/home/baruwa/px/lib/python2.7/site-packages/repoze/who/plugins/sa.p y", line 210, in add_metadata identity['user'] = self.get_user(identity['repoze.who.userid']) File "/usr/home/baruwa/px/lib/python2.7/site-packages/repoze/who/plugins/sa.p y", line 64, in get_user return query.one() File "/usr/home/baruwa/px/lib/python2.7/site-packages/sqlalchemy/orm/query.py ", line 2184, in one ret = list(self) File "/usr/home/baruwa/px/lib/python2.7/site-packages/baruwa/lib/caching_quer y.py", line 77, in __iter__ return Query.__iter__(self) File "/usr/home/baruwa/px/lib/python2.7/site-packages/sqlalchemy/orm/query.py ", line 2227, in __iter__ return self._execute_and_instances(context) File "/usr/home/baruwa/px/lib/python2.7/site-packages/sqlalchemy/orm/query.py ", line 2240, in _execute_and_instances close_with_result=True) File "/usr/home/baruwa/px/lib/python2.7/site-packages/sqlalchemy/orm/query.py ", line 2231, in _connection_from_session **kw) File "/usr/home/baruwa/px/lib/python2.7/site-packages/sqlalchemy/orm/session. py", line 777, in connection close_with_result=close_with_result) File "/usr/home/baruwa/px/lib/python2.7/site-packages/sqlalchemy/orm/session. py", line 781, in _connection_for_bind return self.transaction._connection_for_bind(engine) File "/usr/home/baruwa/px/lib/python2.7/site-packages/sqlalchemy/orm/session. py", line 308, in _connection_for_bind if self.session.twophase and self._parent is None: AttributeError: 'NoneType' object has no attribute 'twophase' ----- My production.ini bellow ------ [DEFAULT] debug = false email_to = [email protected] smtp_server = 172.31.0.25 error_email_from = [email protected] [uwsgi] socket = /var/run/baruwa/baruwa.sock master = true processes = 5 daemonize = /var/log/uwsgi/uwsgi-baruwa.log [server:main] use = egg:Paste#http host = 0.0.0.0 port = 5000 [app:main] use = egg:baruwa full_stack = true static_files = true cache_dir = /var/lib/baruwa/data beaker.session.key = baruwa beaker.session.secret = TuBYuRppNy6Kan0TbYE6yJXjR beaker.session.httponly = true beaker.session.secure = false app_instance_uuid = {55a61cf0-d8b6-4ae6-91fd-b9eead139428} beaker.cache.data_dir = /var/lib/baruwa/data/cache beaker.session.data_dir = /var/lib/baruwa/data/sessions beaker.cache.regions=default,short_term,long_term,sql_cache_short,sql_ca che_med,sql_cache_long,system_status beaker.cache.default.type=memcached beaker.cache.default.url = 127.0.0.1:11211 beaker.cache.default.expire=360 beaker.cache.short_term.type=memcached beaker.cache.short_term.url = 127.0.0.1:11211 beaker.cache.short_term.expire=60 beaker.cache.long_term.type=file beaker.cache.long_term.expire=36000 beaker.cache.sql_cache_short.type=memcached beaker.cache.sql_cache_short.url = 127.0.0.1:11211 beaker.cache.sql_cache_short.expire=60 beaker.cache.sql_cache_med.type=memcached beaker.cache.sql_cache_med.url = 127.0.0.1:11211 beaker.cache.sql_cache_med.expire=360 beaker.cache.sql_cache_long.type=file beaker.cache.sql_cache_long.expire=3600 beaker.cache.system_status.type=memcached beaker.cache.system_status.url = 127.0.0.1:11211 beaker.cache.system_status.expire=180 beaker.session.type = ext:memcached beaker.session.url = 127.0.0.1:11211 # SQLAlchemy database URL sqlalchemy.url = postgresql://baruwa:[email protected]:5432/baruwa # SphinxSQL URL sphinx.url = mysql://root:@127.0.0.1:9306 # authentication settings what_config_file = %(here)s/what.ini who_config_file = %(here)s/who.ini what_log_file = /var/log/baruwa/what-who.log # MailScanner settings ms.config = /usr/local/etc/MailScanner/MailScanner.conf ms.quickpeek = /usr/local/libexec/MailScanner/Quick.Peek ms.quarantine.days_to_keep = 30 ms.saprefs = /usr/local/etc/MailScanner/spam.assassin.prefs.conf ms.signatures.base = /usr/local/etc/MailScanner/baruwa/signatures # Spamassassin settings spamassassin.salearn = /usr/local/bin/sa-learn spamassassin.dirs = /usr/local/share/spamassassin, /var/db/spamassassin/3.003002, /usr/local/etc/mail/spamassassin # Marrow.mailer mail.manager.use = dynamic mail.transport.use = smtp mail.transport.host = 127.0.0.1 mail.transport.tls = optional mail.transport.local_hostname = localhost mail.transport.username = mail.transport.password = mail.transport.max_messages_per_connection = 10 # baruwa settings baruwa.media.url = / baruwa.default.url = http://localhost baruwa.ipv6db = /usr/local/share/GeoIP/GeoIPv6.dat baruwa.reports.sender = [email protected] baruwa.locks.dir = /var/lock/baruwa baruwa.dkim.dir = /usr/local/etc/MailScanner/baruwa/dkim # celery settings broker.host = 127.0.0.1 broker.port = 5672 broker.user = baruwa broker.password = NOTMYPASSWORD broker.vhost = baruwa broker.pool.limit = 10 celeryd.pool = eventlet #celeryd.force.execv = true celeryd.concurrency = 100 # workaround for broken pastedeploy celeryd.log.format = %|asctime|s Baruwa[%|process|d]: %|message|s celeryd.task.log.format = %|asctime|s Baruwa[%|process|d]: %|task_name|s %|task_id|s %|message|s celery.message.compression = bzip2 celery.task.result.expires = 300 celery.result.serialier = json celery.result.backend = amqp celery.result.dburi = amqp:// celery.result.engine.options = {"echo": False} celery.result.exchange = celeryresults2 celery.imports = baruwa.tasks celery.disable.rate.limits = True celery.queues = {"mailgate-am-2":{"exchange": "host", "exchange_type": "direct","binding_key":"mailgate-am-2",},"msbackend":{"exchange":"ms", "exchange_type":"fanout","binding_key":"mstasks"},"default": {"exchange": "default" ,"binding_key": "default"}} celery.default.queue = default celery.default.exchange = default celery.default.exchange_type = direct celery.default.routing_key = default celery.create.missing.queues = False -- Adrien Pujol Systems Administrator AAC Services Ltd _______________________________________________ Keep Baruwa FREE - http://pledgie.com/campaigns/12056

