User talk:Paucabot
Welcome to Toolforge!
Hello Paucabot, welcome to the Toolforge project! Your request for access was processed, and you should be able to use ssh to connect to login.tools.wmflabs.org. You will need to logout and login again at https://toolsadmin.wikimedia.org/ to activate your new permissions there.
Check the Toolforge help page for tips on using your account. You can also ask questions in our IRC channel at #wikimedia-cloud connect or send an e-mail to our mailing list cloud@lists.wikimedia.org.
Thank you, and have fun making Tools! --StrikerBot (talk) 21:04, 2 January 2019 (UTC)
Your cronjob problem reported on irc 2020-05-09
Sorry nobody noticed your question while you were still in the channel. I took a look at your rebot tool and think I figured out the problem. There was a job stuck in Error state on the job grid. Here's how I found that and what I did to try and fix it for you:
Shell session output |
---|
$ sudo become rebot
$ crontab -l
# Wikimedia Toolforge specific note:
# Please be aware that *only* jsub and jstart are acceptable
# commands to schedule via cron. Any command specified here will
# be modified to be invoked through jsub unless it is one of
# the two.
#
# m h dom mon dow command
43 13 * * * /usr/bin/jsub -N cron-29 -once -quiet sh robot.sh
# Commented out by bd808 on 2020-05-09. this would not do what you think
# it might do. The output would end up in the /tmp dir on the cron host
# and it woud be empty because of the '-quiet' flag to jsub.
#* * * * * /usr/bin/jsub -N cron-8 -once -quiet /bin/echo "cron works" >> /tmp/file
$ cat cron-29.err
[Wed May 6 13:28:02 2020] there is a job named 'cron-29' already active
[Wed May 6 13:39:04 2020] there is a job named 'cron-29' already active
[Wed May 6 13:43:02 2020] there is a job named 'cron-29' already active
[Thu May 7 13:43:04 2020] there is a job named 'cron-29' already active
[Fri May 8 13:43:01 2020] there is a job named 'cron-29' already active
[Sat May 9 13:43:02 2020] there is a job named 'cron-29' already active
$ qstat
job-ID prior name user state submit/start at queue slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
1750323 0.25000 cron-29 tools.rebot Eqw 03/29/2020 10:20:10 1
$ qstat -j 1750323
==============================================================
job_number: 1750323
exec_file: job_scripts/1750323
submission_time: Sun Mar 29 10:20:10 2020
owner: tools.rebot
uid: 53933
group: tools.rebot
gid: 53933
sge_o_home: /data/project/rebot
sge_o_log_name: tools.rebot
sge_o_path: /usr/bin:/bin
sge_o_shell: /bin/sh
sge_o_workdir: /mnt/nfs/labstore-secondary-tools-project/rebot
sge_o_host: tools-sgecron-01
account: sge
stderr_path_list: NONE:NONE:/data/project/rebot/cron-29.err
hard resource_list: h_vmem=524288k
mail_list: tools.rebot@tools.wmflabs.org
notify: FALSE
job_name: cron-29
stdout_path_list: NONE:NONE:/data/project/rebot/cron-29.out
jobshare: 0
hard_queue_list: task
env_list: TERM=NONE
job_args: sh,robot.sh
script_file: /usr/bin/nohup
binding: NONE
job_type: binary
error reason 1: can't get password entry for user "tools.rebot". Either user does not exist or error with NIS/LDAP etc.
scheduling info: Job is in error state
$ qdel 1750323
tools.rebot has deleted job 1750323
|
The can't get password entry for user "tools.rebot" error reason is something that happens occasionally to grid jobs. It usually means that some error has happened on the grid engine scheduler node which prevented it from looking up your tool's unix account information in our LDAP directory. These are unfortunate, but transient errors. You should have been sent an email by the grid engine service when this happened, but those emails are sometimes sent to spam folders or even rejected entirely by some mail servers.
Anyway, with the broken job deleted I would expect your bot's job to run starting at 13:43 on 2020-05-10. --BryanDavis (talk) 20:16, 9 May 2020 (UTC)
- Thanks for your detailed information and for the solution, BryanDavis. I'm so grateful! Thanks again! Paucabot (talk) 20:39, 9 May 2020 (UTC)
- Hi BryanDavis. My cron job seems to be stuck again. I tried to do what you told me, but this time it seems there is no job in qstat. What am I doing wrong? Thanks in advance, Paucabot (talk) 17:52, 12 May 2020 (UTC)
$ sudo become rebot $ crontab -l # Wikimedia Toolforge specific note: # Please be aware that *only* jsub and jstart are acceptable # commands to schedule via cron. Any command specified here will # be modified to be invoked through jsub unless it is one of # the two. # # m h dom mon dow command 0 22 * * * /usr/bin/jsub -N cron-29 -once -quiet screen - m -d sh robot.sh
- This crontab line is attempting to start a GNU Screen instance on the job grid. Looking at $HOME/cron-29.out I can see that this is failing with the message "Must be connected to a terminal". Cron is starting the job, but the job itself is finishing almost immediately with this error. This is not surprising to me as Screen is a terminal multiplexer application intended for interactive use rather than running as a workload on a distributed job grid. It is also designed not to terminate, so if you did manage to get it running on the grid you would be back to the error of having an active job of the same name on the grid error from before, although for a slightly different reason.
- I think your crontab line should look more like
0 22 * * * /usr/bin/jsub -N cron-29 -once -quiet /data/project/rebot/robot.sh
. You might want to change -N cron-29 to a more descriptive name for the job. --BryanDavis (talk) 23:01, 12 May 2020 (UTC)- Thanks, BryanDavis. As you can see, I am a newbie here and I maybe lack the he knowledge to do some things. I'm very grateful to you for your patience and explanations.
- I have changed my crontab accordingly to what you said. The reason why I introduced the screen command was because I was not sure how to access to the job and stop it, but with your answers, you helped me (I learned about qstat) and I think now I will be able to stop the bot if something goes south.
- Thanks again for your help. Paucabot (talk) 06:09, 13 May 2020 (UTC)
- Hi BryanDavis. My cron job seems to be stuck again. I tried to do what you told me, but this time it seems there is no job in qstat. What am I doing wrong? Thanks in advance, Paucabot (talk) 17:52, 12 May 2020 (UTC)
rebot review
Hi, we're doing a review to make sure as many tools meet a minimum standard. I noticed rebot tool doesn't have a published repo. Could you add this information to this tool? Thanks! Komla Sapaty (talk) 02:48, 11 July 2023 (UTC)
- @Komla Sapaty: I am not a very advanced Toolforge user. My tool only uses basic pywikibot scripts. I have put the url where I have the source code on the description. Is it enough? If not, could you help me do it properly? Thanks in advance. Paucabot (talk) 08:04, 11 July 2023 (UTC)