Tons of command line errors after running DietPi-Backup on 6.8

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
AdvancedFollower
Posts: 20
Joined: Wed Dec 20, 2017 6:42 pm

Tons of command line errors after running DietPi-Backup on 6.8

Post by AdvancedFollower »

Hi,
After updating to 6.8, I get tons of incorrect command line arguments and other errors. This comes up in the terminal as the services restart after having run DietPi-Backup.

E.g.

Code: Select all

cron: can't lock /var/run/crond.pid, otherpid may be 23474: Resource temporarily unavailable
2018-05-27 17:28:57,480 fail2ban.server         [23988]: INFO    Starting Fail2ban v0.9.6
2018-05-27 17:28:57,481 fail2ban.server         [23988]: INFO    Starting in daemon mode
2018-05-27 17:28:57: netdata ERROR: CONFIG: cannot open file '/etc/netdata/netdata.conf' (errno 2, No such file or directory)

USAGE: noip2 [ -C [ -F][ -Y][ -U #min]
        [ -u username][ -p password][ -x progname]]
        [ -c file][ -d][ -D pid][ -i addr][ -S][ -M][ -h]

Version Linux-2.1.9
Options: -C               create configuration data
         -F               force NAT off
         -Y               select all hosts/groups
         -U minutes       set update interval
         -u username      use supplied username
         -p password      use supplied password
         -x executable    use supplied executable
         -c config_file   use alternate data path
         -d               increase debug verbosity
         -D processID     toggle debug flag for PID
         -i IPaddress     use supplied address
         -I interface     use supplied interface
         -S               show configuration data
         -M               permit multiple instances
         -K processID     terminate instance PID
         -z               activate shm dump code
         -h               help (this text)
sshd re-exec requires execution with an absolute path
Options error: I'm trying to parse "0" as an --option parameter but I don't see a leading '--'
Use --help for more information.

dnsmasq: junk found in command line
Usage: apache2 [-D name] [-d directory] [-f file]
               [-C "directive"] [-c "directive"]
               [-k start|restart|graceful|graceful-stop|stop]
               [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
  -D name            : define a name for use in <IfDefine name> directives
  -d directory       : specify an alternate initial ServerRoot
  -f file            : specify an alternate ServerConfigFile
  -C "directive"     : process directive before reading config files
  -c "directive"     : process directive after reading config files
  -e level           : show startup errors of level (see LogLevel)
  -E file            : log startup errors to file
  -v                 : show version number
  -V                 : show compile settings
  -h                 : list available command line options (this page)
  -l                 : list compiled in modules
  -L                 : list available configuration directives
  -t -D DUMP_VHOSTS  : show parsed vhost settings
  -t -D DUMP_RUN_CFG : show parsed run settings
  -S                 : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
  -t -D DUMP_MODULES : show all loaded modules
  -M                 : a synonym for -t -D DUMP_MODULES
  -t -D DUMP_INCLUDES: show all included configuration files
  -t                 : run syntax check for config files
  -T                 : start without DocumentRoot(s) check
  -X                 : debug mode (only one worker, do not detach)
mariadb  Ver 15.1 Distrib 10.1.23-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Usage: mariadb [OPTIONS] [database]

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysql client client-server client-mariadb
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.

  -?, --help          Display this help and exit.
  -I, --help          Synonym for -?
  --abort-source-on-error
                      Abort 'source filename' operations in case of errors
  --auto-rehash       Enable automatic rehashing. One doesn't need to use
                      'rehash' to get table and field completion, but startup
                      and reconnecting may take a longer time. Disable with
                      --disable-auto-rehash.
                      (Defaults to on; use --skip-auto-rehash to disable.)
  -A, --no-auto-rehash
                      No automatic rehashing. One has to use 'rehash' to get
                      table and field completion. This gives a quicker start of
                      mysql and disables rehashing on reconnect.
  --auto-vertical-output
                      Automatically switch to vertical output mode if the
                      result is wider than the terminal width.
  -B, --batch         Don't use history file. Disable interactive behavior.
                      (Enables --silent.)
  --character-sets-dir=name
                      Directory for character set files.
  --column-type-info  Display column type information.
  -c, --comments      Preserve comments. Send comments to the server. The
                      default is --skip-comments (discard comments), enable
                      with --comments.
  -C, --compress      Use compression in server/client protocol.
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.
  --debug-check       Check memory and open file usage at exit.
  -T, --debug-info    Print some debug info at exit.
  -D, --database=name Database to use.
  --default-character-set=name
                      Set the default character set.
  --delimiter=name    Delimiter to be used.
  -e, --execute=name  Execute command and quit. (Disables --force and history
                      file.)
  -E, --vertical      Print the output of a query (rows) vertically.
  -f, --force         Continue even if we get an SQL error. Sets
                      abort-source-on-error to 0
  -G, --named-commands
                      Enable named commands. Named commands mean this program's
                      internal commands; see mysql> help . When enabled, the
                      named commands can be used from any line of the query,
                      otherwise only from the first line, before an enter.
                      Disable with --disable-named-commands. This option is
                      disabled by default.
  -i, --ignore-spaces Ignore space after function names.
  --init-command=name SQL Command to execute when connecting to MySQL server.
                      Will automatically be re-executed when reconnecting.
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
  -b, --no-beep       Turn off beep on error.
  -h, --host=name     Connect to host.
  -H, --html          Produce HTML output.
  -X, --xml           Produce XML output.
  --line-numbers      Write line numbers for errors.
                      (Defaults to on; use --skip-line-numbers to disable.)
  -L, --skip-line-numbers
                      Don't write line number for errors.
  -n, --unbuffered    Flush buffer after each query.
  --column-names      Write column names in results.
                      (Defaults to on; use --skip-column-names to disable.)
  -N, --skip-column-names
                      Don't write column names in results.
  --sigint-ignore     Ignore SIGINT (CTRL-C).
  -o, --one-database  Ignore statements except those that occur while the
                      default database is the one named at the command line.
  --pager[=name]      Pager to use to display results. If you don't supply an
                      option, the default pager is taken from your ENV variable
                      PAGER. Valid pagers are less, more, cat [> filename],
                      etc. See interactive help (\h) also. This option does not
                      work in batch mode. Disable with --disable-pager. This
                      option is disabled by default.
  -p, --password[=name]
                      Password to use when connecting to server. If password is
                      not given it's asked from the tty.
  -P, --port=#        Port number to use for connection or 0 for default to, in
                      order of preference, my.cnf, $MYSQL_TCP_PORT,
                      /etc/services, built-in default (3306).
  --progress-reports  Get progress reports for long running commands (like
                      ALTER TABLE)
                      (Defaults to on; use --skip-progress-reports to disable.)
  --prompt=name       Set the mysql prompt to this value.
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,
                      memory).
  -q, --quick         Don't cache result, print it row by row. This may slow
                      down the server if the output is suspended. Doesn't use
                      history file.
  -r, --raw           Write fields without conversion. Used with --batch.
  --reconnect         Reconnect if the connection is lost. Disable with
                      --disable-reconnect. This option is enabled by default.
                      (Defaults to on; use --skip-reconnect to disable.)
  -s, --silent        Be more silent. Print results with a tab as separator,
                      each row on new line.
  -S, --socket=name   The socket file to use for connection.
  --ssl               Enable SSL for connection (automatically enabled with
                      other flags).
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies
                      --ssl).
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).
  --ssl-cipher=name   SSL cipher to use (implies --ssl).
  --ssl-key=name      X509 key in PEM format (implies --ssl).
  --ssl-crl=name      Certificate revocation list (implies --ssl).
  --ssl-crlpath=name  Certificate revocation list path (implies --ssl).
  --ssl-verify-server-cert
                      Verify server's "Common Name" in its cert against
                      hostname used when connecting. This option is disabled by
                      default.
  -t, --table         Output in table format.
  --tee=name          Append everything into outfile. See interactive help (\h)
                      also. Does not work in batch mode. Disable with
                      --disable-tee. This option is disabled by default.
  -u, --user=name     User for login if not current user.
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
  -v, --verbose       Write more. (-v -v -v gives the table output format).
  -V, --version       Output version information and exit.
  -w, --wait          Wait and retry if connection is down.
  --connect-timeout=# Number of seconds before connection timeout.
  --max-allowed-packet=#
                      The maximum packet length to send to or receive from
                      server.
  --net-buffer-length=#
                      The buffer size for TCP/IP and socket communication.
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.
  --max-join-size=#   Automatic limit for rows in a join when using
                      --safe-updates.
  --secure-auth       Refuse client connecting to server if it uses old
                      (pre-4.1.1) protocol.
  --server-arg=name   Send embedded server this as a parameter.
  --show-warnings     Show warnings after every statement.
  --plugin-dir=name   Directory for client-side plugins.
  --default-auth=name Default authentication client-side plugin to use.
  --binary-mode       By default, ASCII '\0' is disallowed and '\r\n' is
                      translated to '\n'. This switch turns off both features,
                      and also turns off parsing of all clientcommands except
                      \C and DELIMITER, in non-interactive mode (for input
                      piped to mysql or loaded using the 'source' command).
                      This is necessary when processing output from mysqlbinlog
                      that may contain blobs.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
abort-source-on-error             FALSE
auto-rehash                       TRUE
auto-vertical-output              FALSE
character-sets-dir                (No default value)
column-type-info                  FALSE
comments                          FALSE
compress                          FALSE
debug-check                       FALSE
debug-info                        FALSE
database                          (No default value)
default-character-set             utf8mb4
delimiter                         ;
vertical                          FALSE
force                             FALSE
named-commands                    FALSE
ignore-spaces                     FALSE
init-command                      (No default value)
local-infile                      FALSE
no-beep                           FALSE
host                              (No default value)
html                              FALSE
xml                               FALSE
line-numbers                      TRUE
unbuffered                        FALSE
column-names                      TRUE
sigint-ignore                     FALSE
port                              0
progress-reports                  TRUE
prompt                            \N [\d]>
quick                             FALSE
raw                               FALSE
reconnect                         TRUE
socket                            (No default value)
ssl                               FALSE
ssl-ca                            (No default value)
ssl-capath                        (No default value)
ssl-cert                          (No default value)
ssl-cipher                        (No default value)
ssl-key                           (No default value)
ssl-crl                           (No default value)
ssl-crlpath                       (No default value)
ssl-verify-server-cert            FALSE
table                             FALSE
user                              (No default value)
safe-updates                      FALSE
i-am-a-dummy                      FALSE
connect-timeout                   0
max-allowed-packet                16777216
net-buffer-length                 16384
select-limit                      1000
max-join-size                     1000000
secure-auth                       FALSE
show-warnings                     FALSE
plugin-dir                        (No default value)
default-auth                      (No default value)
binary-mode                       FALSE
2018-05-27 17:28:57 1988399104 [Note] mysqld (mysqld 10.1.23-MariaDB-9+deb9u1) starting as process 24035 ...
User avatar
MichaIng
Site Admin
Posts: 2262
Joined: Sat Nov 18, 2017 6:21 pm

Re: Tons of command line errors after running DietPi-Backup on 6.8

Post by MichaIng »

@AdvancedFollower
Uhh, what the hell...

Okay let's debug this step by step:

1. Did you face any errors on dietpi-update to v6.8? Did reboot, especially service startup go well on the restart directly after update?

2. Did you face any errors on the dietpi-backup run itself? It should have done a free space check and then rsync, before starting up the services again.

3. DietPi-Services then just does "systemctl start ..." for every service that we control. There must be something gone wrong earlier.

3b. /etc/netdata/netdata.conf is claimed to be missing. Please check if it is present on file system and/or within the backup.

4. Try to restart the services manually one by one to see what exactly is broken there. Start with dnsmasq since other services/network depend on it. Actually I wonder why this one is started, since DietPi does not control it. It should not have been stopped on backup start. Maybe you still can check this within terminal?
AdvancedFollower
Posts: 20
Joined: Wed Dec 20, 2017 6:42 pm

Re: Tons of command line errors after running DietPi-Backup on 6.8

Post by AdvancedFollower »

1. No errors during the update at all.

2. No errors during the backup, everything is OK until it tries to restart services

3. /etc/netdata/netdata.conf is indeed missing. I uninstalled Netdata for now using Dietpi-Software. The same errors came up as it tried to restart the services after uninstalling (minus the Netdata.conf error of course).

I can manually stop and restart services with no problems:

Code: Select all

root@DietPi:~# systemctl stop dnsmasq
root@DietPi:~# systemctl start dnsmasq
root@DietPi:~# systemctl stop mysql
root@DietPi:~# systemctl start mysql
I now get the following when running Dietpi-Backup

Code: Select all

[  OK  ] Root access verified.
[  OK  ] DietPi-Drive_Manager | RootFS R/W access verified.

[  OK  ] DietPi-Backup | Checking for pre-req APT packages: rsync
[ INFO ] DietPi-Backup | Pre-req APT packages are installed

 DietPi-Backup
─────────────────────────────────────────────────────
 Mode: Backup

[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[  OK  ] DietPi-Services | stop : rpimonitor
[  OK  ] DietPi-Services | stop : noip2
[  OK  ] DietPi-Services | stop : apache2
[  OK  ] DietPi-Services | stop : mysql
[  OK  ] DietPi-Services | stop : fail2ban
[ INFO ] DietPi-Backup | Backing up to: /mnt/nfs_client/dietpi-backup
[  OK  ] DietPi-Backup | Free space check: path=/mnt/nfs_client/dietpi-backup/dietpi-backup_system | available=1493116 MB | required=6824 MB
[  OK  ] DietPi-Backup | rsync -aH --delete --include-from=/tmp/.dietpi-backup_filter_inc_exc -v --log-file=/var/log/dietpi-backup.log / /mnt/nfs_client/dietpi-backup/dietpi-backup_system/
[  OK  ] DietPi-Backup | Free space check: path=/mnt/nfs_client/dietpi-backup/dietpi-backup_userdata | available=1493146 MB | required=25 MB
[  OK  ] DietPi-Backup | rsync -aH --delete -v --log-file=/var/log/dietpi-backup.log /mnt/dietpi_userdata/ /mnt/nfs_client/dietpi-backup/dietpi-backup_userdata/
[ SUB1 ] DietPi-Services > start
[  OK  ] DietPi-Services | start : fail2ban
[  OK  ] DietPi-Services | start : mysql
[  OK  ] DietPi-Services | start : apache2
[  OK  ] DietPi-Services | start : noip2
[  OK  ] DietPi-Services | start : rpimonitor
[  OK  ] DietPi-Services | start : cron
cron: can't lock /var/run/crond.pid, otherpid may be 3940: Resource temporarily unavailable
2018-05-29 16:06:58,662 fail2ban.server         [4438]: INFO    Starting Fail2ban v0.9.6
2018-05-29 16:06:58,663 fail2ban.server         [4438]: INFO    Starting in daemon mode
/DietPi/dietpi/.dietpi-process_tool: line 3: netdata: command not found

USAGE: noip2 [ -C [ -F][ -Y][ -U #min]
        [ -u username][ -p password][ -x progname]]
        [ -c file][ -d][ -D pid][ -i addr][ -S][ -M][ -h]

Version Linux-2.1.9
Options: -C               create configuration data
         -F               force NAT off
         -Y               select all hosts/groups
         -U minutes       set update interval
         -u username      use supplied username
         -p password      use supplied password
         -x executable    use supplied executable
         -c config_file   use alternate data path
         -d               increase debug verbosity
         -D processID     toggle debug flag for PID
         -i IPaddress     use supplied address
         -I interface     use supplied interface
         -S               show configuration data
         -M               permit multiple instances
         -K processID     terminate instance PID
         -z               activate shm dump code
         -h               help (this text)
sshd re-exec requires execution with an absolute path
Options error: I'm trying to parse "0" as an --option parameter but I don't see a leading '--'
Use --help for more information.

dnsmasq: junk found in command line
Usage: apache2 [-D name] [-d directory] [-f file]
               [-C "directive"] [-c "directive"]
               [-k start|restart|graceful|graceful-stop|stop]
               [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
  -D name            : define a name for use in <IfDefine name> directives
  -d directory       : specify an alternate initial ServerRoot
  -f file            : specify an alternate ServerConfigFile
  -C "directive"     : process directive before reading config files
  -c "directive"     : process directive after reading config files
  -e level           : show startup errors of level (see LogLevel)
  -E file            : log startup errors to file
  -v                 : show version number
  -V                 : show compile settings
  -h                 : list available command line options (this page)
  -l                 : list compiled in modules
  -L                 : list available configuration directives
  -t -D DUMP_VHOSTS  : show parsed vhost settings
  -t -D DUMP_RUN_CFG : show parsed run settings
  -S                 : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
  -t -D DUMP_MODULES : show all loaded modules
  -M                 : a synonym for -t -D DUMP_MODULES
  -t -D DUMP_INCLUDES: show all included configuration files
  -t                 : run syntax check for config files
  -T                 : start without DocumentRoot(s) check
  -X                 : debug mode (only one worker, do not detach)
mariadb  Ver 15.1 Distrib 10.1.23-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Usage: mariadb [OPTIONS] [database]

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysql client client-server client-mariadb
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.

  -?, --help          Display this help and exit.
  -I, --help          Synonym for -?
  --abort-source-on-error
                      Abort 'source filename' operations in case of errors
  --auto-rehash       Enable automatic rehashing. One doesn't need to use
                      'rehash' to get table and field completion, but startup
                      and reconnecting may take a longer time. Disable with
                      --disable-auto-rehash.
                      (Defaults to on; use --skip-auto-rehash to disable.)
  -A, --no-auto-rehash
                      No automatic rehashing. One has to use 'rehash' to get
                      table and field completion. This gives a quicker start of
                      mysql and disables rehashing on reconnect.
  --auto-vertical-output
                      Automatically switch to vertical output mode if the
                      result is wider than the terminal width.
  -B, --batch         Don't use history file. Disable interactive behavior.
                      (Enables --silent.)
  --character-sets-dir=name
                      Directory for character set files.
  --column-type-info  Display column type information.
  -c, --comments      Preserve comments. Send comments to the server. The
                      default is --skip-comments (discard comments), enable
                      with --comments.
  -C, --compress      Use compression in server/client protocol.
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.
  --debug-check       Check memory and open file usage at exit.
  -T, --debug-info    Print some debug info at exit.
  -D, --database=name Database to use.
  --default-character-set=name
                      Set the default character set.
  --delimiter=name    Delimiter to be used.
  -e, --execute=name  Execute command and quit. (Disables --force and history
                      file.)
  -E, --vertical      Print the output of a query (rows) vertically.
  -f, --force         Continue even if we get an SQL error. Sets
                      abort-source-on-error to 0
  -G, --named-commands
                      Enable named commands. Named commands mean this program's
                      internal commands; see mysql> help . When enabled, the
                      named commands can be used from any line of the query,
                      otherwise only from the first line, before an enter.
                      Disable with --disable-named-commands. This option is
                      disabled by default.
  -i, --ignore-spaces Ignore space after function names.
  --init-command=name SQL Command to execute when connecting to MySQL server.
                      Will automatically be re-executed when reconnecting.
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
  -b, --no-beep       Turn off beep on error.
  -h, --host=name     Connect to host.
  -H, --html          Produce HTML output.
  -X, --xml           Produce XML output.
  --line-numbers      Write line numbers for errors.
                      (Defaults to on; use --skip-line-numbers to disable.)
  -L, --skip-line-numbers
                      Don't write line number for errors.
  -n, --unbuffered    Flush buffer after each query.
  --column-names      Write column names in results.
                      (Defaults to on; use --skip-column-names to disable.)
  -N, --skip-column-names
                      Don't write column names in results.
  --sigint-ignore     Ignore SIGINT (CTRL-C).
  -o, --one-database  Ignore statements except those that occur while the
                      default database is the one named at the command line.
  --pager[=name]      Pager to use to display results. If you don't supply an
                      option, the default pager is taken from your ENV variable
                      PAGER. Valid pagers are less, more, cat [> filename],
                      etc. See interactive help (\h) also. This option does not
                      work in batch mode. Disable with --disable-pager. This
                      option is disabled by default.
  -p, --password[=name]
                      Password to use when connecting to server. If password is
                      not given it's asked from the tty.
  -P, --port=#        Port number to use for connection or 0 for default to, in
                      order of preference, my.cnf, $MYSQL_TCP_PORT,
                      /etc/services, built-in default (3306).
  --progress-reports  Get progress reports for long running commands (like
                      ALTER TABLE)
                      (Defaults to on; use --skip-progress-reports to disable.)
  --prompt=name       Set the mysql prompt to this value.
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,
                      memory).
  -q, --quick         Don't cache result, print it row by row. This may slow
                      down the server if the output is suspended. Doesn't use
                      history file.
  -r, --raw           Write fields without conversion. Used with --batch.
  --reconnect         Reconnect if the connection is lost. Disable with
                      --disable-reconnect. This option is enabled by default.
                      (Defaults to on; use --skip-reconnect to disable.)
  -s, --silent        Be more silent. Print results with a tab as separator,
                      each row on new line.
  -S, --socket=name   The socket file to use for connection.
  --ssl               Enable SSL for connection (automatically enabled with
                      other flags).
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies
                      --ssl).
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).
  --ssl-cipher=name   SSL cipher to use (implies --ssl).
  --ssl-key=name      X509 key in PEM format (implies --ssl).
  --ssl-crl=name      Certificate revocation list (implies --ssl).
  --ssl-crlpath=name  Certificate revocation list path (implies --ssl).
  --ssl-verify-server-cert
                      Verify server's "Common Name" in its cert against
                      hostname used when connecting. This option is disabled by
                      default.
  -t, --table         Output in table format.
  --tee=name          Append everything into outfile. See interactive help (\h)
                      also. Does not work in batch mode. Disable with
                      --disable-tee. This option is disabled by default.
  -u, --user=name     User for login if not current user.
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
  -v, --verbose       Write more. (-v -v -v gives the table output format).
  -V, --version       Output version information and exit.
  -w, --wait          Wait and retry if connection is down.
  --connect-timeout=# Number of seconds before connection timeout.
  --max-allowed-packet=#
                      The maximum packet length to send to or receive from
                      server.
  --net-buffer-length=#
                      The buffer size for TCP/IP and socket communication.
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.
  --max-join-size=#   Automatic limit for rows in a join when using
                      --safe-updates.
  --secure-auth       Refuse client connecting to server if it uses old
                      (pre-4.1.1) protocol.
  --server-arg=name   Send embedded server this as a parameter.
  --show-warnings     Show warnings after every statement.
  --plugin-dir=name   Directory for client-side plugins.
  --default-auth=name Default authentication client-side plugin to use.
  --binary-mode       By default, ASCII '\0' is disallowed and '\r\n' is
                      translated to '\n'. This switch turns off both features,
                      and also turns off parsing of all clientcommands except
                      \C and DELIMITER, in non-interactive mode (for input
                      piped to mysql or loaded using the 'source' command).
                      This is necessary when processing output from mysqlbinlog
                      that may contain blobs.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
abort-source-on-error             FALSE
auto-rehash                       TRUE
auto-vertical-output              FALSE
character-sets-dir                (No default value)
column-type-info                  FALSE
comments                          FALSE
compress                          FALSE
debug-check                       FALSE
debug-info                        FALSE
database                          (No default value)
default-character-set             utf8mb4
delimiter                         ;
vertical                          FALSE
force                             FALSE
named-commands                    FALSE
ignore-spaces                     FALSE
init-command                      (No default value)
local-infile                      FALSE
no-beep                           FALSE
host                              (No default value)
html                              FALSE
xml                               FALSE
line-numbers                      TRUE
unbuffered                        FALSE
column-names                      TRUE
sigint-ignore                     FALSE
port                              0
progress-reports                  TRUE
prompt                            \N [\d]>
quick                             FALSE
raw                               FALSE
reconnect                         TRUE
socket                            (No default value)
ssl                               FALSE
ssl-ca                            (No default value)
ssl-capath                        (No default value)
ssl-cert                          (No default value)
ssl-cipher                        (No default value)
ssl-key                           (No default value)
ssl-crl                           (No default value)
ssl-crlpath                       (No default value)
ssl-verify-server-cert            FALSE
table                             FALSE
user                              (No default value)
safe-updates                      FALSE
i-am-a-dummy                      FALSE
connect-timeout                   0
max-allowed-packet                16777216
net-buffer-length                 16384
select-limit                      1000
max-join-size                     1000000
secure-auth                       FALSE
show-warnings                     FALSE
plugin-dir                        (No default value)
default-auth                      (No default value)
binary-mode                       FALSE
2018-05-29 16:06:58 1988558848 [Note] mysqld (mysqld 10.1.23-MariaDB-9+deb9u1) starting as process 4448 ...
The services appear to still work in spite of all the junk it spits out on the command line.

For example

Code: Select all

root@DietPi:~# systemctl status noip2
● noip2.service - noip2
   Loaded: loaded (/etc/systemd/system/noip2.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-05-29 16:06:55 CEST; 1min 29s ago
  Process: 3860 ExecStart=/usr/local/bin/noip2 (code=exited, status=0/SUCCESS)
 Main PID: 3862 (noip2)
   CGroup: /system.slice/noip2.service
           └─3862 /usr/local/bin/noip2
           May 29 16:06:55 DietPi systemd[1]: Starting noip2...
May 29 16:06:55 DietPi noip2[3862]: v2.1.9 daemon started with NAT enabled
May 29 16:06:55 DietPi systemd[1]: Started noip2.
root@DietPi:~# systemctl status cron
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-05-29 16:06:56 CEST; 1min 57s ago
     Docs: man:cron(8)
 Main PID: 3940 (cron)
   CGroup: /system.slice/cron.service
           └─3940 /usr/sbin/cron -f

May 29 16:06:56 DietPi systemd[1]: Started Regular background program processing daemon.
May 29 16:06:56 DietPi cron[3940]: (CRON) INFO (pidfile fd = 3)
May 29 16:06:56 DietPi cron[3940]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
root@DietPi:~# systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-05-29 16:03:10 CEST; 6min ago
  Process: 593 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
  Process: 567 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
  Process: 541 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
 Main PID: 591 (dnsmasq)
   CGroup: /system.slice/dnsmasq.service
           └─591 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,
19036,8,2,49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5 --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d

May 29 16:03:09 DietPi dnsmasq[591]: DNS service limited to local subnets
May 29 16:03:09 DietPi dnsmasq-dhcp[591]: DHCP, IP range 192.168.7.100 -- 192.168.7.150, lease time 6h
May 29 16:03:09 DietPi dnsmasq[591]: using local addresses only for domain lan.local
May 29 16:03:09 DietPi dnsmasq[591]: no servers found in /run/dnsmasq/resolv.conf, will retry
May 29 16:03:09 DietPi dnsmasq[591]: read /etc/hosts - 7 addresses
May 29 16:03:10 DietPi dnsmasq[591]: reading /run/dnsmasq/resolv.conf
May 29 16:03:10 DietPi dnsmasq[591]: using local addresses only for domain lan.local
May 29 16:03:10 DietPi dnsmasq[591]: using nameserver 8.8.8.8#53
May 29 16:03:10 DietPi dnsmasq[591]: using nameserver 8.8.4.4#53
May 29 16:03:10 DietPi systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
User avatar
MichaIng
Site Admin
Posts: 2262
Joined: Sat Nov 18, 2017 6:21 pm

Re: Tons of command line errors after running DietPi-Backup on 6.8

Post by MichaIng »

@AdvancedFollower
Please post at very first the content of your /DietPi/dietpi/.dietpi-process_tool, as this seems to be the reason.
Issue on github opened for investigation: https://github.com/Fourdee/DietPi/issues/1808

cron: can't lock /var/run/crond.pid, otherpid may be 3940: Resource temporarily unavailable
I also saw this from time to time. No idea where it's coming from for now, but it's harmless at least.
/DietPi/dietpi/.dietpi-process_tool: line 3: netdata: command not found
Jep this is indeed an issue with the process tool. It saves the "nice" info etc. for all found processes within this file, but does not handle removed processes nicely. This needs some quick fix @Fourdee
€: Not the reason for this error!

Indeed it seems like the process tool is the issue, not dietpi-services itself. Try to remove /DietPi/dietpi/.dietpi-process_tool, it will be cleanly recreated on next execution.

€: Okay I checked to code a bid. /DietPi/dietpi/.dietpi-process_tool should actually not contain a line, starting with just "netdata" instead it should contain lines, that will fill some arrays when being sourced/read:

Code: Select all

aname_save[0]='cron'
anice_save[0]=0
aaffinity_save[0]='0'
aschedule_policy_save[0]='SCHED_OTHER'
aschedule_priority_save[0]='0'
aname_save[1]='dhclient'
anice_save[1]=0
aaffinity_save[1]='0'
aschedule_policy_save[1]='SCHED_OTHER'
aschedule_priority_save[1]='0'
aname_save[2]='dropbear'
aschedule_priority_save[2]='0'
anice_save[2]=0
aaffinity_save[2]='0'
aschedule_policy_save[2]='SCHED_OTHER'
Before settings being applied, it is checked, if those processes are available. So this is not the problem.
In your case, and also I watched this one time, is simply seems to contain unexpected entries. I couldn't find a reason for this, so far, needs investigation. I will open an issue about this on github.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Tons of command line errors after running DietPi-Backup on 6.8

Post by Fourdee »

@AdvancedFollower

Hi,

Can we please see the following file:

Code: Select all

cat /DietPi/dietpi/.dietpi-process_tool
Actually, if possible a bug report would be better, will contain most of the configs/system files we need to check:

Code: Select all

dietpi-bugreport
Then reply with the reference code.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
AdvancedFollower
Posts: 20
Joined: Wed Dec 20, 2017 6:42 pm

Re: Tons of command line errors after running DietPi-Backup on 6.8

Post by AdvancedFollower »

Reference CODE: a70334b9-6f17-4f99-a54f-6be340b20101-0

/DietPi/dietpi/.dietpi-process_tool

Code: Select all

cron 0 0-3 SCHED_OTHER 0
fail2ban-server 0 0-3 SCHED_OTHER 0
netdata 19 0-3 SCHED_OTHER 0
noip2 0 0-3 SCHED_OTHER 0
sshd 0 0-3 SCHED_OTHER 0
openvpn 0 0-3 SCHED_OTHER 0
dnsmasq 0 0-3 SCHED_OTHER 0
apache2 0 0-3 SCHED_OTHER 0
mariadb 0 0-3 SCHED_OTHER 0
mysqld 0 0-3 SCHED_OTHER 0
User avatar
MichaIng
Site Admin
Posts: 2262
Joined: Sat Nov 18, 2017 6:21 pm

Re: Tons of command line errors after running DietPi-Backup on 6.8

Post by MichaIng »

@AdvancedFollower
I just checked our last changes of the process tool and jep, the style of this file was just changed with v6.8: https://github.com/Fourdee/DietPi/commi ... 222d378606
The problem is, that if DietPi-Process_Tool is not actively used, the file is not rewritten in new style. The new file (see above) can be sourced, the old one not, thus leading to the errors you face.

As you did no manual changes, just remove the file and you are good. It will be recreated in new style. So nothing on your system is "broken", that's the good message. Just some impossible command calls without any effect.

@Fourdee
Maybe we need to implement a patch to read and write back the saved process information? Or just remove the file on update? Now better add it to v6.9 patch, as some users might already be affected, just not yet interactively restarted dietpi-services...
AdvancedFollower
Posts: 20
Joined: Wed Dec 20, 2017 6:42 pm

Re: Tons of command line errors after running DietPi-Backup on 6.8

Post by AdvancedFollower »

@MichaIng

I deleted the file and re-ran Dietpi-Backup and now there were no errors on the command line. Also the file has the new style, for example:

Code: Select all

aname_save[2]='noip2'
anice_save[2]=0
aaffinity_save[2]='0-3'
aschedule_policy_save[2]='SCHED_OTHER'
aschedule_priority_save[2]='0'
So all is well, thanks :)
Post Reply