Bug 253937 - www/minio: "Unable to write to the backend" after upgrade to 2021.02.24.18.44.45
Summary: www/minio: "Unable to write to the backend" after upgrade to 2021.02.24.18.44.45
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-01 14:53 UTC by Boris Korzun
Modified: 2021-03-19 16:54 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (swills)


Attachments
patch to avoid issue (1.39 KB, patch)
2021-03-15 17:35 UTC, Steve Wills
no flags Details | Diff
updated patch to fix port (2.43 KB, patch)
2021-03-15 18:09 UTC, Steve Wills
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Korzun 2021-03-01 14:53:14 UTC
We have got an error after upgrade from 2021.02.11.08.23.43 to 2021.02.24.18.44.45. The problem is occurred also on clean install of the last version.

ERROR Unable to initialize backend: Unable to write to the backend
      > Please ensure MinIO binary has write permissions for the backend
      HINT:
        Run the following command to add write permissions: `sudo chown -R minio /var/db/minio/1 && sudo chmod u+rxw /var/db/minio/1`

Minio works in distributed mode.

# ls -l /var/db/minio/1
total 1
drwxr-xr-x  5 minio  minio  5  1 March 12:19 .minio.sys
Comment 1 Steve Wills freebsd_committer freebsd_triage 2021-03-01 15:01:52 UTC
(In reply to Boris Korzun from comment #0)
Hmm, not sure what could be causing this. Can you share your minio related /etc/rc.conf settings? And also run "sh -x /usr/local/etc/rc.d/minio start" and see what the args to minio are?
Comment 2 Boris Korzun 2021-03-01 16:40:08 UTC
(In reply to Steve Wills from comment #1)
#!/bin/sh
minio_enable="YES"
minio_env="MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS"
minio_disks="http://storage-0{1...3}:9000/var/db/minio/{1...12}"


# sh -x /usr/local/etc/rc.d/minio start
...
+ sourced_files=:/etc/rc.conf::/etc/rc.conf.local:
+ [ -r /etc/rc.conf.local ]
+ _rc_conf_loaded=true
+ [ -n minio ]
+ _d=/etc
+ [ -f /etc/rc.conf.d/minio ]
+ [ -d /etc/rc.conf.d/minio ]
+ _d=/usr/local/etc
+ [ -f /usr/local/etc/rc.conf.d/minio ]
+ debug 'Sourcing /usr/local/etc/rc.conf.d/minio'
+ . /usr/local/etc/rc.conf.d/minio
+ minio_enable=YES
+ minio_env='MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS'
+ minio_disks=http://storage-0{1...3}:9000/var/db/minio/{1...12}
+ eval '_defval=$minio_enable_defval'
+ _defval=''
+ [ -n '' ]
+ : YES
+ : /usr/local/etc/minio/certs
+ : http://storage-0{1...3}:9000/var/db/minio/{1...12}
+ : :9000
+ : minio
+ : minio
+ : YES
+ : /var/log/minio.log
+ start_precmd=minio_start_precmd
+ checkyesno minio_syslog_enable
+ eval '_value=$minio_syslog_enable'
+ _value=YES
+ debug 'checkyesno: minio_syslog_enable is set to YES.'
+ return 0
+ [ -n '' ]
+ minio_syslog_output_flags='-T minio'
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ pidfile=/var/run/minio.pid
+ procname=/usr/local/bin/minio
+ command=/usr/sbin/daemon
+ command_args='-f -t minio -T minio -p /var/run/minio.pid /usr/bin/env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/local/bin/minio  -S "/usr/local/etc/minio/certs" --quiet server --address=":9000" http://storage-0{1...3}:9000/var/db/minio/{1...12} '
+ run_rc_command start
+ _return=0
+ rc_arg=start
+ [ -z minio ]
+ shift 1
+ rc_extra_args=''
+ _rc_prefix=''
+ eval '_override_command=$minio_program'
+ _override_command=''
+ command=/usr/sbin/daemon
+ _keywords='start stop restart rcvar enable disable delete enabled describe extracommands '
+ rc_pid=''
+ _pidcmd=''
+ _procname=/usr/local/bin/minio
+ [ -n /usr/local/bin/minio ]
+ [ -n /var/run/minio.pid ]
+ _pidcmd='rc_pid=$(check_pidfile /var/run/minio.pid /usr/local/bin/minio )'
+ _keywords='start stop restart rcvar enable disable delete enabled describe extracommands  status poll'
+ [ -z start ]
+ [ start '=' enabled ]
+ [ -n '' ]
+ eval 'rc_flags=$minio_flags'
+ rc_flags=''
+ eval '_chdir=$minio_chdir' '_chroot=$minio_chroot' '_nice=$minio_nice' '_user=$minio_user' '_group=$minio_group' '_groups=$minio_groups' '_fib=$minio_fib' '_env=$minio_env' '_prepend=$minio_prepend' '_login_class=${minio_login_class:-daemon}' '_limits=$minio_limits' '_oomprotect=$minio_oomprotect' '_env_file=$minio_env_file'
+ _chdir='' _chroot='' _nice='' _user=minio _group=minio _groups='' _fib='' _env='MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS' _prepend='' _login_class=daemon _limits='' _oomprotect='' _env_file=''
+ [ -n '' ]
+ [ -n minio ]
+ eval if [ -x /usr/bin/id '];' then /usr/bin/id '-un;' fi
+ [ -x /usr/bin/id ]
+ /usr/bin/id -un
+ [ minio '=' root ]
+ [ -z '' ]
+ eval 'rc_pid=$(check_pidfile' /var/run/minio.pid /usr/local/bin/minio ')'
+ check_pidfile /var/run/minio.pid /usr/local/bin/minio
+ _pidfile=/var/run/minio.pid
+ _procname=/usr/local/bin/minio
+ _interpreter=''
+ [ -z /var/run/minio.pid -o -z /usr/local/bin/minio ]
+ [ ! -f /var/run/minio.pid ]
+ read _pid _junk
+ [ -z 56412 ]
+ _find_processes /usr/local/bin/minio . '-p 56412'
+ [ 3 -ne 3 ]
+ _procname=/usr/local/bin/minio
+ _interpreter=.
+ _psargs='-p 56412'
+ _pref=''
+ [ . '!=' . ]
+ _procnamebn=minio
+ _fp_args='_arg0 _argv'
+ _fp_match=$'case "$_arg0" in
\t\t    $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")'
+ _proccheck=$'\t\t/bin/ps -ww 2>/dev/null -o pid= -o jid= -o command= -p 56412 |
\t\twhile read _npid _jid _arg0 _argv; do
\t\t\tcase "$_arg0" in
\t\t    $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")
\t\t\t\tif [ "$JID" -eq "$_jid" ];
\t\t\t\tthen echo -n "$_pref$_npid";
\t\t\t\t_pref=" ";
\t\t\t\tfi
\t\t\t\t;;
\t\t\tesac
\t\tdone'
+ eval /bin/ps -ww '2>/dev/null' -o 'pid=' -o 'jid=' -o 'command=' -p 56412 '|' while read _npid _jid _arg0 '_argv;' do case '"$_arg0"' in '$_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")' if [ '"$JID"' -eq '"$_jid"' '];' then echo -n '"$_pref$_npid";' '_pref="' '";' fi ';;' esac done
+ /bin/ps -ww -o 'pid=' -o 'jid=' -o 'command=' -p 56412
+ read _npid _jid _arg0 _argv
+ rc_pid=''
+ [ start '!=' start ]
+ [ -n minio_enable -a start '!=' rcvar -a start '!=' stop -a start '!=' delete -a start '!=' enable -a start '!=' describe ]
+ checkyesno minio_enable
+ eval '_value=$minio_enable'
+ _value=YES
+ debug 'checkyesno: minio_enable is set to YES.'
+ return 0
+ [ start '=' start -a -z '' -a -n '' ]
+ eval '_cmd=$start_cmd' '_precmd=$start_precmd' '_postcmd=$start_postcmd'
+ _cmd='' _precmd=minio_start_precmd _postcmd=''
+ [ -n '' ]
+ [ ! -x /usr/sbin/daemon ]
+ _run_rc_precmd
+ check_required_before start
+ local _f
+ return 0
+ [ -n minio_start_precmd ]
+ debug 'run_rc_command: start_precmd: minio_start_precmd '
+ eval 'minio_start_precmd '
+ minio_start_precmd
+ [ ! -e /var/run/minio.pid ]
+ echo http://storage-0{1...3}:9000/var/db/minio/{1...12}
+ egrep -q -v '^[^/]|\.{3}'
+ [ -n '' -a ! -d '' ]
+ checkyesno minio_syslog_enable
+ eval '_value=$minio_syslog_enable'
+ _value=YES
+ debug 'checkyesno: minio_syslog_enable is set to YES.'
+ return 0
+ _return=0
+ [ 0 -ne 0 ]
+ check_required_after start
+ local _f _args
+ return 0
+ return 0
+ check_startmsgs
+ [ -n '' ]
+ return 0
+ echo 'Starting minio.'
Starting minio.
+ [ -n '' ]
+ _cd=''
+ _doit='env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/sbin/daemon  -f -t minio -T minio -p /var/run/minio.pid /usr/bin/env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/local/bin/minio  -S "/usr/local/etc/minio/certs" --quiet server --address=":9000" http://storage-0{1...3}:9000/var/db/minio/{1...12} '
+ [ -n minio ]
+ _doit=$'su -m minio -c \'sh -c "env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/sbin/daemon  -f -t minio -T minio -p /var/run/minio.pid /usr/bin/env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/local/bin/minio  -S "/usr/local/etc/minio/certs" --quiet server --address=":9000" http://storage-0{1...3}:9000/var/db/minio/{1...12} "\''
+ [ -n '' ]
+ [ -n '' ]
+ _doit=$' limits -C daemon  su -m minio -c \'sh -c "env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/sbin/daemon  -f -t minio -T minio -p /var/run/minio.pid /usr/bin/env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/local/bin/minio  -S "/usr/local/etc/minio/certs" --quiet server --address=":9000" http://storage-0{1...3}:9000/var/db/minio/{1...12} "\''
+ _run_rc_doit $' limits -C daemon  su -m minio -c \'sh -c "env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/sbin/daemon  -f -t minio -T minio -p /var/run/minio.pid /usr/bin/env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/local/bin/minio  -S "/usr/local/etc/minio/certs" --quiet server --address=":9000" http://storage-0{1...3}:9000/var/db/minio/{1...12} "\''
+ debug $'run_rc_command: doit:  limits -C daemon  su -m minio -c \'sh -c "env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/sbin/daemon  -f -t minio -T minio -p /var/run/minio.pid /usr/bin/env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/local/bin/minio  -S "/usr/local/etc/minio/certs" --quiet server --address=":9000" http://storage-0{1...3}:9000/var/db/minio/{1...12} "\''
+ eval $' limits -C daemon  su -m minio -c \'sh -c "env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/sbin/daemon  -f -t minio -T minio -p /var/run/minio.pid /usr/bin/env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/local/bin/minio  -S "/usr/local/etc/minio/certs" --quiet server --address=":9000" http://storage-0{1...3}:9000/var/db/minio/{1...12} "\''
+ limits -C daemon su -m minio -c 'sh -c "env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/sbin/daemon  -f -t minio -T minio -p /var/run/minio.pid /usr/bin/env MINIO_BROWSER=off MINIO_STORAGE_CLASS_STANDARD=EC:5 MINIO_DOMAIN=localhost MINIO_ROOT_USER=89ZNm2lgC7MgsqWX6rT MINIO_ROOT_PASSWORD=7VTQoW0Lcwlt3jGX9fAS /usr/local/bin/minio  -S "/usr/local/etc/minio/certs" --quiet server --address=":9000" http://storage-0{1...3}:9000/var/db/minio/{1...12} "'
+ _return=0
+ [ 0 -ne 0 ]
+ return 0
+ _run_rc_postcmd
+ [ -n '' ]
+ return 0
+ [ -n '' ]
+ return 0
Comment 3 Steve Wills freebsd_committer freebsd_triage 2021-03-01 16:47:53 UTC
(In reply to Boris Korzun from comment #2)
Thanks. Can you check if 2021.03.01.04.20.55 might fix it? I will do some more research and see if there's an upstream bug here.
Comment 4 Boris Korzun 2021-03-01 18:37:42 UTC
(In reply to Steve Wills from comment #3)
The problem keeps occurring on 2021.03.01.04.20.55.
Thx.
Comment 5 xin3qu 2021-03-10 16:25:32 UTC
I have exactly this problem.

The problem occurs no matter what directory permissions are in place. Even if minio creates the directories itself, it runs into this error.

Ironically, there is a " .minio.sys " directory in every sub directory. So, minio server claims not to be able to write right after writing.

To reproduce, simply run

  $ minio server testdir{1...4}

as a normal user within your $HOME or any directory where you have full RW access.
Comment 6 Thiago Damas 2021-03-15 02:32:34 UTC
Same problem here. Using FreeBSD 12.2-p4 and minio-2020.03.25.07.03.04_1
Comment 7 Thiago Damas 2021-03-15 02:37:53 UTC
(In reply to Thiago Damas from comment #6)
  In fact, using RELEASE.2021-03-01T04-20-55Z
Comment 8 Thiago Damas 2021-03-15 03:03:49 UTC
It works 100% on minio-2021.01.30.00.20.58.txz
Comment 9 Steve Wills freebsd_committer freebsd_triage 2021-03-15 03:52:37 UTC
(In reply to Thiago Damas from comment #8)
Strange. It seems like it must be an upstream bug, and only in distributed mode, possibly only on FreeBSD?
Comment 10 Thiago Damas 2021-03-15 04:50:08 UTC
It could be an upstream bug, since I,m not using in distributed mode.
Comment 11 Steve Wills freebsd_committer freebsd_triage 2021-03-15 17:35:06 UTC
Created attachment 223299 [details]
patch to avoid issue

Please try this patch. (See https://github.com/minio/minio/pull/11615 for more details)
Comment 12 Steve Wills freebsd_committer freebsd_triage 2021-03-15 18:09:50 UTC
Created attachment 223300 [details]
updated patch to fix port

One other change is needed, try this.
Comment 14 commit-hook freebsd_committer freebsd_triage 2021-03-15 18:42:53 UTC
A commit references this bug:

Author: swills
Date: Mon Mar 15 18:41:55 UTC 2021
New revision: 568491
URL: https://svnweb.freebsd.org/changeset/ports/568491

Log:
  www/minio: fix runtime issue

  PR:		253937
  Reported by:	Boris Korzun <drtr0jan@yandex.ru>
  Reported by:	xin3qu@protonmail.com
  Reported by:	Thiago Damas <tdamas@gmail.com>

Changes:
  head/www/minio/Makefile
  head/www/minio/files/patch-cmd_xl-storage__noatime__notsupported.go
  head/www/minio/files/patch-cmd_xl-storage__noatime__supported.go
  head/www/minio/files/patch-pkg_ioutil_read__file__noatime__notsupported.go
  head/www/minio/files/patch-pkg_ioutil_read__file__noatime__supported.go
Comment 15 commit-hook freebsd_committer freebsd_triage 2021-03-17 13:10:23 UTC
A commit references this bug:

Author: swills
Date: Wed Mar 17 13:09:40 UTC 2021
New revision: 568655
URL: https://svnweb.freebsd.org/changeset/ports/568655

Log:
  MFH: r565160 r566653 r566861 r568294 r568491 r568654

  www/minio: update to 2021.02.11.08.23.43

  www/minio: update to 2021.02.24.18.44.45

  www/minio: update to 2021.03.01.04.20.55

  www/minio: update to 2021.03.12.00.00.47

  www/minio: fix runtime issue

  PR:		253937
  Reported by:	Boris Korzun <drtr0jan@yandex.ru>
  Reported by:	xin3qu@protonmail.com
  Reported by:	Thiago Damas <tdamas@gmail.com>

  www/minio: update to 2021.03.17.02.33.02

  Security:	b073677f-253a-41f9-bf2b-2d16072a25f6

  Approved by:	ports-secteam (implicit)

Changes:
_U  branches/2021Q1/
  branches/2021Q1/www/minio/Makefile
  branches/2021Q1/www/minio/distinfo
Comment 16 xin3qu 2021-03-19 16:54:29 UTC
(In reply to commit-hook from comment #14)

I rolled out 2021-03-17T02:33:02Z today, can confirm it works without problems.

Thank you very much for the patch!