Thanks for reporting the bug. I wrote "python wmcounter.py" in my crontab. What should I write?
2014-05-14 22:36 GMT+02:00 Tim Landscheidt <[email protected]>: > Emilio J. Rodríguez-Posada <[email protected]> wrote in a > different order: > > >> > I coded a script that uses several wiki databases and servers. When I > >> > manually execute it, it works fine, but after adding it to cron, it > >> returns > >> > this error: > >> [...] > >> > _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host > >> > 's3.labsdb' (0)") > > >> Sounds like whatever host you end up running on is missing /etc/hosts > >> entries. > > >> See > >> > https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Connecting_to_the_database_replicas_from_other_Labs_instances > > > Why things are so difficult? :-/ > > That's what you would need from another Labs project. In > Tools, you should be able to connect to s3.labsdb from all > hosts. > > And indeed, all exec nodes have s3.labsdb in their > /etc/hosts: > > | scfc@tools-login:~$ for HOST in tools-exec-{01..10}; do ssh $HOST > 'fgrep -q s3.labsdb /etc/hosts || hostname'; done > | scfc@tools-login:~$ > > But all aliases are missing on tools-submit: > > | scfc@tools-login:~$ ssh tools-submit cat /etc/hosts > | 127.0.0.1 localhost > | 127.0.1.1 ubuntu.pmtpa.wmflabs ubuntu > > | # The following lines are desirable for IPv6 capable hosts > | ::1 ip6-localhost ip6-loopback > | fe00::0 ip6-localnet > | ff00::0 ip6-mcastprefix > | ff02::1 ip6-allnodes > | ff02::2 ip6-allrouters > | ff02::3 ip6-allhosts > | scfc@tools-login:~$ > > which leads me to the conclusion that you aren't submitting > your cron job to the grid with jsub/qsub, but executing it > on tools-submit itself (which is allowed under certain con- > ditions). I filed https://bugzilla.wikimedia.org/65308 for > the missing aliases/NAT on tools-submit. > > Unfortunately, I don't have sudo rights on tools-submit, so > I can't fix it right away. So you could either wait for > Coren to return from his holiday on Friday, or change your > cron job so that it is submitted to the grid instead. > > Tim > > > _______________________________________________ > Labs-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/labs-l >
_______________________________________________ Labs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/labs-l
