ZhangHuangbin wrote:dittman wrote:migrate_cluebringer_greylisting.py hangs on this:
qr = conn_cb.select('greylisting',
what='id',
where="name='Greylisting Inbound Emails' AND usegreylisting=1",
limit=1)
I'm a little confused here, what do you mean "hangs on this"? This script didn't finish?
Could you please find line "web.config.debug = False" in migrate_cluebringer_greylisting.py, change False to True, and re-run the script? Show us the terminal output.
By "hangs on this" I mean that I added code to print something before and after that command and the one after never printed anything.
I've tried to run it with debug turned on but it looks like something I did after this messed things up as it fails to connect now instead of hanging:
[root@clarke tools]# python migrate_cluebringer_greylisting.py
* Backend: mysql
* Migrate global greylisting setting.
- Query enabled global greylisting setting.
Traceback (most recent call last):
File "migrate_cluebringer_greylisting.py", line 70, in <module>
limit=1)
File "/usr/lib/python2.7/site-packages/web/db.py", line 682, in select
return self.query(qout, processed=True)
File "/usr/lib/python2.7/site-packages/web/db.py", line 643, in query
db_cursor = self._db_cursor()
File "/usr/lib/python2.7/site-packages/web/db.py", line 566, in _db_cursor
return self.ctx.db.cursor()
File "/usr/lib/python2.7/site-packages/web/db.py", line 507, in _getctx
self._load_context(self._ctx)
File "/usr/lib/python2.7/site-packages/web/db.py", line 518, in _load_context
ctx.db = self._connect(self.keywords)
File "/usr/lib/python2.7/site-packages/web/db.py", line 546, in _connect
return self.db_module.connect(**keywords)
File "/usr/lib64/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (111)")
But manually connecting still works:
[root@clarke tools]# mysql -u cluebringer -p --port=10031
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3682
Server version: 5.5.44-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> quit
Bye
I had gone ahead after this with the rest of the steps as I needed to get my email server runnng again and figured that I should still be able to pull the values out of the database since I didn't remove it.