przemko
November 28, 2022, 10:15pm
21
Can You tell me how to get rid of that unused processes like Cloudflare I see there?
The output:
dietpi@DietPi:~$ ls -lah /tmp
razem 1,1M
drwxrwxrwt 13 root root 520 11-28 23:13 .
drwxr-xr-x 24 root root 4,0K 11-19 23:58 ..
prwx------ 1 emby dietpi 0 11-28 13:46 clr-debug-pipe-1375135-7826008-inprwx------ 1 emby dietpi 0 11-28 13:46 clr-debug-pipe-1375135-7826008-out
prwx------ 1 ombi nogroup 0 11-27 16:02 clr-debug-pipe-736-1115-in
prwx------ 1 ombi nogroup 0 11-27 16:02 clr-debug-pipe-736-1115-out
-rw-r--r-- 1 dietpi dietpi 689 11-28 14:04 crontab
drwxrwxrwx 3 emby dietpi 60 11-27 16:02 .dotnet
srw------- 1 emby dietpi 0 11-28 13:46 dotnet-diagnostic-1375135-7826008-socket
srw------- 1 ombi nogroup 0 11-27 16:02 dotnet-diagnostic-736-1115-socketdrwxrwxrwt 2 root root 40 11-27 16:02 .font-unix
drwxrwxrwt 2 root root 40 11-27 16:02 .ICE-unix
-rw-r--r-- 1 dietpi dietpi 245 11-28 14:04 jDaEBluImq6Ux04T.stderr
-rw-r--r-- 1 dietpi dietpi 1,1M 11-28 14:05 jDaEBluImq6Ux04T.stdout
drwx------ 3 root root 60 11-28 13:46 systemd-private-1a58c2e03c394821959839c3d393e4e3-bazarr.service-JtIz0e
drwx------ 3 root root 60 11-27 16:02 systemd-private-1a58c2e03c394821959839c3d393e4e3-haveged.service-S6OTHg
drwx------ 3 root root 60 11-28 13:46 systemd-private-1a58c2e03c394821959839c3d393e4e3-redis-server.service-7HY5rj
drwx------ 3 root root 60 11-27 16:02 systemd-private-1a58c2e03c394821959839c3d393e4e3-systemd-logind.service-a2lezi
drwxrwxrwt 2 root root 40 11-27 16:02 .Test-unix
-rw------- 1 dietpi dietpi 16 11-27 23:51 tmp.6aywuabdYZ
-rw------- 1 dietpi dietpi 16 11-28 00:21 tmp.9LwUfibGm2
drwxr-xr-x 3 www-data www-data 60 11-27 16:02 www-data-temp-aspnet-0
drwxrwxrwt 2 root root 40 11-27 16:02 .X11-unix
drwxrwxrwt 2 root root 40 11-27 16:02 .XIM-unix
-rw-r--r-- 1 root root 178 11-28 22:03 XpKVF4WGqgj3D1N0.stderr
-rw-r--r-- 1 root root 0 11-28 22:03 XpKVF4WGqgj3D1N0.stdout
dietpi@DietPi:~$
can you reboot your system and share following
ls -la /tmp
ps -ef | grep crontab-ui
przemko
November 29, 2022, 6:24am
23
dietpi@DietPi:~$ ls -la /tmp
razem 4
drwxrwxrwt 13 root root 380 11-29 07:23 .
drwxr-xr-x 24 root root 4096 11-19 23:58 ..
prwx------ 1 emby dietpi 0 11-29 07:10 clr-debug-pipe-1076-1941-in
prwx------ 1 emby dietpi 0 11-29 07:10 clr-debug-pipe-1076-1941-out
prwx------ 1 ombi nogroup 0 11-29 07:10 clr-debug-pipe-739-1147-in
prwx------ 1 ombi nogroup 0 11-29 07:10 clr-debug-pipe-739-1147-out
drwxrwxrwx 3 emby dietpi 60 11-29 07:10 .dotnet
srw------- 1 emby dietpi 0 11-29 07:10 dotnet-diagnostic-1076-1941-socket
srw------- 1 ombi nogroup 0 11-29 07:10 dotnet-diagnostic-739-1147-socket
drwxrwxrwt 2 root root 40 11-29 07:10 .font-unix
drwxrwxrwt 2 root root 40 11-29 07:10 .ICE-unix
drwx------ 3 root root 60 11-29 07:10 systemd-private-27f237672ff44df994077b47b681b0ea-bazarr.service-Wf3iGi
drwx------ 3 root root 60 11-29 07:10 systemd-private-27f237672ff44df994077b47b681b0ea-haveged.service-NzMYxh
drwx------ 3 root root 60 11-29 07:10 systemd-private-27f237672ff44df994077b47b681b0ea-redis-server.service-HVt8jh
drwx------ 3 root root 60 11-29 07:10 systemd-private-27f237672ff44df994077b47b681b0ea-systemd-logind.service-sMqNMh
drwxrwxrwt 2 root root 40 11-29 07:10 .Test-unix
drwxr-xr-x 3 www-data www-data 60 11-29 07:10 www-data-temp-aspnet-0
drwxrwxrwt 2 root root 40 11-29 07:10 .X11-unix
drwxrwxrwt 2 root root 40 11-29 07:10 .XIM-unix
dietpi@DietPi:~$ ps -ef | grep crontab-ui
root 733 1 0 07:10 ? 00:00:00 node /usr/local/bin/crontab-ui
dietpi 22770 21892 0 07:24 pts/0 00:00:00 grep crontab-ui
przemko
November 29, 2022, 9:49am
24
Hi, today after reboot it works. I can save to crontab from webUI.
Do You know why that command don’t work when I want to backup my other device from crontab-ui?
rsync -avz --exclude=.cache dietpi@192.168.0.111:/home/dietpi /mnt/Toshiba/Backup/dietpi-laptop/home
I exchange ssh keys and can login without password between that two devices.
trendy
November 29, 2022, 10:06am
25
Cronjob runs as root, not as dietpi.
The other thing is to use full paths for the commands.
przemko
November 29, 2022, 10:34am
26
OK, but do You know why that command works with termial and when I Run it from crontab-ui I have errors:
Tue Nov 29 11:32:17 CET 2022
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]
on system:
dietpi@DietPi:~$ sudo systemctl status crontab-ui.service
● crontab-ui.service - Crontab UI
Loaded: loaded (/etc/systemd/system/crontab-ui.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-11-29 07:10:40 CET; 4h 23min ago
Main PID: 733 (node)
Tasks: 11 (limit: 9352)
Memory: 79.6M
CPU: 2.396s
CGroup: /system.slice/crontab-ui.service
└─733 node /usr/local/bin/crontab-ui
lis 29 10:35:09 DietPi crontab-ui[733]: env vars
lis 29 10:35:09 DietPi crontab-ui[733]: Running job
lis 29 10:35:09 DietPi crontab-ui[733]: ID: XpKVF4WGqgj3D1N0
lis 29 10:35:09 DietPi crontab-ui[733]: Original command: rsync -avz --exclude=.cache dietpi@192.168.0.111:/home/dietpi /mnt/Toshiba/Backup/dietpi-laptop/home
lis 29 10:35:09 DietPi crontab-ui[733]: Executed command: ((({ rsync -avz --exclude=.cache dietpi@192.168.0.111:/home/dietpi /mnt/Toshiba/Backup/dietpi-laptop/home; } | tee /tmp/XpKVF4WGqgj3D1N0.stdout) 3>&1 1>&2 2>&3 | tee /tmp/XpKVF4WGqgj3D1N0.stderr) 3>&1 1>&2 2>&3); if test -f /tmp/XpKVF4WGqgj3D1N0.stderr; then date >> "/usr/local/lib/node_modules/crontab-ui/crontabs/logs/XpKVF4WGqgj3D1N0.log"; cat /tmp/XpKVF4WGqgj3D1N0.stderr >> "/usr/local/lib/node_modules/crontab-ui/crontabs/logs/XpKVF4WGqgj3D1N0.log"; fi; if test -f /tmp/XpKVF4WGqgj3D1N0.stdout; then date >> "/usr/local/lib/node_modules/crontab-ui/crontabs/logs/XpKVF4WGqgj3D1N0.stdout.log"; cat /tmp/XpKVF4WGqgj3D1N0.stdout >> "/usr/local/lib/node_modules/crontab-ui/crontabs/logs/XpKVF4WGqgj3D1N0.stdout.log"; fi
lis 29 11:32:17 DietPi crontab-ui[733]: env vars
lis 29 11:32:17 DietPi crontab-ui[733]: Running job
lis 29 11:32:17 DietPi crontab-ui[733]: ID: XpKVF4WGqgj3D1N0
lis 29 11:32:17 DietPi crontab-ui[733]: Original command: rsync -avz --exclude=.cache dietpi@192.168.0.111:/home/dietpi /mnt/Toshiba/Backup/dietpi-laptop/home
lis 29 11:32:17 DietPi crontab-ui[733]: Executed command: ((({ rsync -avz --exclude=.cache dietpi@192.168.0.111:/home/dietpi /mnt/Toshiba/Backup/dietpi-laptop/home; } | tee /tmp/XpKVF4WGqgj3D1N0.stdout) 3>&1 1>&2 2>&3 | tee /tmp/XpKVF4WGqgj3D1N0.stderr) 3>&1 1>&2 2>&3); if test -f /tmp/XpKVF4WGqgj3D1N0.stderr; then date >> "/usr/local/lib/node_modules/crontab-ui/crontabs/logs/XpKVF4WGqgj3D1N0.log"; cat /tmp/XpKVF4WGqgj3D1N0.stderr >> "/usr/local/lib/node_modules/crontab-ui/crontabs/logs/XpKVF4WGqgj3D1N0.log"; fi; if test -f /tmp/XpKVF4WGqgj3D1N0.stdout; then date >> "/usr/local/lib/node_modules/crontab-ui/crontabs/logs/XpKVF4WGqgj3D1N0.stdout.log"; cat /tmp/XpKVF4WGqgj3D1N0.stdout >> "/usr/local/lib/node_modules/crontab-ui/crontabs/logs/XpKVF4WGqgj3D1N0.stdout.log"; fi
there seems to be a log file. Simply have a look.
przemko
November 29, 2022, 10:41am
28
I show log above. That is the same:
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]
Mon Nov 28 21:11:05 CET 2022
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]
Mon Nov 28 21:12:55 CET 2022
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]
Mon Nov 28 21:55:56 CET 2022
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]
Mon Nov 28 22:03:01 CET 2022
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]
Tue Nov 29 10:35:09 CET 2022
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]
Tue Nov 29 11:32:17 CET 2022
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]
trendy
November 29, 2022, 10:43am
29
Your command is using relative paths, use absolute ones.
Also run as user root the command ssh dietpi@192.168.0.111
to verify the host key.
przemko
November 29, 2022, 10:43am
30
Do I need to make file /etc/rsync.conf
like in this tutorial:
?
przemko
November 29, 2022, 10:44am
31
I can rsync with that command from termial without any problem.
Meybe I will add bug report on github on crontab-ui.
the host key verification failed
przemko
November 29, 2022, 11:26am
33
Can I do something with that?
Jappe
November 29, 2022, 11:53am
34
This error is caused most likely by old/changed keys.
Here is some more info:
https://bobcares.com/blog/rsync-host-key-verification-failed/
przemko
November 29, 2022, 11:59am
35
I have some ssh keys before when install cookpit and it make such keys but yesterday I checked and connection with keys don’t work so I make new keys and now it works ok.
systemd units run as root user, unless you define the user explicitly. For editing crontab, it is also required, or does it edit the user crontab only?
However when running your rsync, assure that the root user has the matching public SSH key in /root/.ssh/authorized_keys
. Since you login at the remote as dietpi
user, I guess also on the local host the dietpi
user has the key accepted, but root not yet.
You do not need rsyncd
daemon running. That would be for a different transport protocol, while SSH is used by default.
przemko
November 29, 2022, 12:21pm
37
So I need to make ssh-keys as root?
yes, you need to configure ssh key access for user root
. Keys configured for user dietpi
will not be used.
1 Like
przemko
November 29, 2022, 2:40pm
39
OK, I don’t change root in crontab-ui command. Now it works great.
Thanks for Your help nad patience
Regards.