MariaDB Rockon install failure

Hello all.
Having an install failure when trying to install MariaDB Rockon.
Looked in the rockstor log but doesn’t show up anything.
Tried reinstalling, new share, changed uid & gid etc.but no luck.
Can anyone suggest a course of action?
Any input would be great.
Many thanks

Update…
Tried to update the rock-ons as MariaDB was missing from the list. Had the following error:

Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/storageadmin/views/rockon.py”, line 106, in post
self._create_update_meta(r, rockons[r])
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/utils/decorators.py”, line 145, in inner
return func(*args, **kwargs)
File “/opt/rockstor/src/rockstor/storageadmin/views/rockon.py”, line 267, in _create_update_meta
handle_exception(Exception(e_msg), self.request)
File “/opt/rockstor/src/rockstor/storageadmin/util.py”, line 47, in handle_exception
trace=traceback.format_exc())
RockStorAPIException: [‘Cannot add/remove volume definitions of the container(linuxserver-mariadb) as it belongs to an installed Rock-on(MariaDB). Uninstall it first and try again.’, ‘Traceback (most recent call last):\n File “/opt/rockstor/eggs/gunicorn-0.16.1-py2.7.egg/gunicorn/workers/sync.py”, line 34, in run\n client, addr = self.socket.accept()\n File “/usr/lib64/python2.7/socket.py”, line 202, in accept\n sock, addr = self._sock.accept()\nerror: [Errno 11] Resource temporarily unavailable\n’]

MariaDb isn’t showing as installed in the rovkons page.
Tried to uninstall using command line but says it’s not installed!
Any help would be great!

Hi @PaulK,

I actually just tested installing this Rockon and was about to get back to you when I saw your update. There seem to be two different things happening here (1) discrepancy between what Rockstor has in its database and what is actually installed (likely due to the first failed install), and (2) the initial problem you had with the install (your first post).

The first step would be to clear problem #1 by removing all traces of the Rock-On on your system so that we can start fresh. Before doing so, however, could you please provide some more details on the following?

I suppose you meant clicking the “Update” button on the top right of the Rock-ons webUI, is that correct?

Do you mean uninstalling the docker container manually with docker rm linuxserver-mariadb?

Regardless of the above, there is a handy but powerful little script to wipe any trace of the container in both your system and Rockstor database, as described by @phillxnet

 /opt/rockstor/bin/delete-rockon

Delete metadata, containers and images of a Rock-on
	Usage: /opt/rockstor/bin/delete-rockon <rockon name>

In you case, I believe the rockon name should be linuxserver-mariadb resulting in the following command:
/opt/rockstor/bin/delete-rockon linuxserver-mariadb

Regarding problem #2–your initial install of the RockOn–we would need to know a little more about what you used to know what went wrong.
The container’s logs could be helpful (docker logs linuxserver-mariadb) but you would need to look at them before running the delete-rockon script above.
As I mentioned above, I just tried to install it on my test VM and it worked without a problem. I used the following settings:

  1. created a new share on my main pool (different from the rockstor_rockstor pool)
  2. set UID and GID to 1000 (corresponding to my main user)

Let us know how the first cleanup step goes and we’ll try to go further from there.

1 Like

Thanks Flox a very comprehensive reply. I will do all you suggested tomorrow and let you know how I got on. Will post a full reply. Thank you again.

Hi Flox
Here’s what’s happened:
Yes Update error happens when I click the update button and I used the command docker rm command.

So I ran the get docker container logs and got this:

docker logs linuxserver-mariadb
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 10-adduser: executing…


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/

GID/UID

User uid: 1003
User gid: 1002

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30_config: executing…
[cont-init.d] 30_config: exited 0.
[cont-init.d] 40-initialise-db: executing…
[cont-init.d] 40-initialise-db: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
181130 12:49:45 mysqld_safe Logging to syslog.
181130 12:49:45 mysqld_safe Starting mysqld daemon with databases from /config/databases
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 10-adduser: executing…
usermod: no changes

      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/

GID/UID

User uid: 1003
User gid: 1002

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30_config: executing…
[cont-init.d] 30_config: exited 0.
[cont-init.d] 40-initialise-db: executing…
[cont-init.d] 40-initialise-db: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
181130 12:55:41 mysqld_safe Logging to syslog.
181130 12:55:41 mysqld_safe Starting mysqld daemon with databases from /config/databases

I then ran the delete rock-on script and got this:

/opt/rockstor/bin/delete-rockon linuxserver-mariadb
Rock-On(linuxserver-mariadb) does not exist

After this i ran the update rock-ons button again but original error is still there.

Hopefully you’ll be able to decipher what’s going on!

Many thanks

Paul

I’ll have to double check when I have a chance but your docker logs seem similar to a successful start. I’ll paste what I have when I have time to get access to that.

In the meantime, let’s take care of cleaning up your Rockstor database:

This tells you that linuxserver-mariadb wasn’t the correct name. It is partly my fault as I should have been more attentive to your first earlier message. Indeed, linuxserver-mariadb is the name of the container, while the name of the Rock-On (which this scripts expects) seems to be MariaDB.
See your earlier error message above:

Bottom line the following command should work:

/opt/rockstor/bin/delete-rockon MariaDB

Hi @PaulK,

I finally found the time to re-install this Rockon to have a clean log output:

[root@rockdev ~]# docker logs linuxserver-mariadb
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/
Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    1000
User gid:    1000
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30_config: executing...
[cont-init.d] 30_config: exited 0.
[cont-init.d] 40-initialise-db: executing...
Setting Up Initial Databases
Installing MariaDB/MySQL system tables in '/config/databases' ...
2018-12-03 14:30:09 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h 4e27ca436d30 password 'new-password'
Alternatively you can run:
'/usr/bin/mysql_secure_installation'
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.
You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/config/databases'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
2018-12-03 14:30:18 0 [Note] mysqld (mysqld 10.3.11-MariaDB-1:10.3.11+maria~bionic-log) starting as process 287 ...
2018-12-03 14:30:18 0 [Note] InnoDB: Using Linux native AIO
2018-12-03 14:30:18 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-12-03 14:30:18 0 [Note] InnoDB: Uses event mutexes
2018-12-03 14:30:18 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-12-03 14:30:18 0 [Note] InnoDB: Number of pools: 1
2018-12-03 14:30:18 0 [Note] InnoDB: Using SSE2 crc32 instructions
2018-12-03 14:30:18 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2018-12-03 14:30:18 0 [Note] InnoDB: Completed initialization of buffer pool
2018-12-03 14:30:18 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-12-03 14:30:19 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-12-03 14:30:19 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-12-03 14:30:19 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-12-03 14:30:19 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-12-03 14:30:19 0 [Note] InnoDB: Waiting for purge to start
2018-12-03 14:30:19 0 [Note] InnoDB: 10.3.11 started; log sequence number 1630824; transaction id 21
2018-12-03 14:30:19 0 [Note] InnoDB: Loading buffer pool(s) from /config/databases/ib_buffer_pool
2018-12-03 14:30:19 0 [Note] Plugin 'FEEDBACK' is disabled.
2018-12-03 14:30:19 0 [Note] InnoDB: Buffer pool(s) load completed at 181203 14:30:19
2018-12-03 14:30:19 0 [Note] Server socket created on IP: '::'.
2018-12-03 14:30:19 0 [Note] Reading of all Master_info entries succeded
2018-12-03 14:30:19 0 [Note] Added new Master_info '' to hash table
2018-12-03 14:30:19 0 [Note] mysqld: ready for connections.
Version: '10.3.11-MariaDB-1:10.3.11+maria~bionic-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2018-12-03 14:30:20 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
2018-12-03 14:30:20 0 [Note] InnoDB: FTS optimize thread exiting.
2018-12-03 14:30:20 0 [Note] Event Scheduler: Purging the queue. 0 events
2018-12-03 14:30:20 0 [Note] InnoDB: Starting shutdown...
2018-12-03 14:30:20 0 [Note] InnoDB: Dumping buffer pool(s) to /config/databases/ib_buffer_pool
2018-12-03 14:30:20 0 [Note] InnoDB: Buffer pool(s) dump completed at 181203 14:30:20
2018-12-03 14:30:21 0 [Note] InnoDB: Shutdown completed; log sequence number 1630833; transaction id 24
2018-12-03 14:30:21 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-12-03 14:30:21 0 [Note] mysqld: Shutdown complete
Database Setup Completed
[cont-init.d] 40-initialise-db: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
181203 14:30:24 mysqld_safe Logging to syslog.
181203 14:30:24 mysqld_safe Starting mysqld daemon with databases from /config/databases

As you can see, the logs are similar to what you pasted and as a result I do not see evidence for an error in your original install. If you were able to successfully clean-up Rockstor’s database of your previously failed install, would you be able to provide more details on the feedback you had at first regarding your install failure?

Thanks!