Hi,
I tried it. If I run it from a login shell, it works. If a cron job
starts it, it fails with
Traceback (most recent call last):
File "test.py", line 19, in <module>
main()
File "test.py", line 10, in main
db = MySQLdb.connect(db="enwiki_p", host="enwiki.labsdb",
read_default_file=os.path.expanduser("~/replica.my.cnf"))
File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in
Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.7/dist-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
'enwiki.labsdb' (110)")
Regards,
André (aka)
Am 27.06.2014 12:12, schrieb John:
Can you try and run https://dpaste.de/O2jg its a python script. If it
throws an error send that back too.
Thanks
On Fri, Jun 27, 2014 at 5:38 AM, Andre Karwath <[email protected]
<mailto:[email protected]>> wrote:
Hi,
I just migrated a tool from the toolserver to labs. It works as
long as I ran it from a shell, but it gets no database connection
if I start it as cronjob.
I put a small example script to http://pastebin.com/hSnhee8U
I already tried to use an absolute path to the .cnf file, but this
did not solve the problem.
Any ideas?
Regards,
André (aka)
--
André Karwath, Dipl. Inf.
[email protected] <mailto:[email protected]>
_______________________________________________
Labs-l mailing list
[email protected] <mailto:[email protected]>
https://lists.wikimedia.org/mailman/listinfo/labs-l
_______________________________________________
Labs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/labs-l
--
André Karwath, Dipl. Inf.
[email protected]
_______________________________________________
Labs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/labs-l