Page 6 of 8

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 01 Aug 2013, 13:53
by Gordon
elsbernd wrote: I'm a sysadmin for non-linux and non-windows systems :-) . But within the company I work for, there is no such database system having no passwords. Never. And we're behind a firewall and we trust (ähm) all our users. So it's good practice to have a password on all data-systems.
While that appears to make sense, it actually doesn't. The thing is that the MySQL server on the B3 doesn't even expose itself, so you have to be running a process on the B3 itself to be able to access any database that is provided by this server. Also the B3 is not your typical high end machine where you would host a multi-user database and it would therefore make more sense to direct applications on the B3 to use an outside server than to enable outside access to MySQL on the B3.

And besides you already know that setting a password on the MySQL root account breaks the regular update/upgrade routine on the B3 and requires you to do the updates from console so that you can respond to interactions that are not handled by the web interface.
elsbernd wrote:The installer tries to upgrade the existing database abd fails with the error messag

Code: Select all

 mysql said: ERROR 1060 (42S21) at line 1: Duplicate column name 'created'
I had to

Code: Select all

alter table image drop created ; drop index last_activity_idx on sessions;
then the installation of

Code: Select all

apt-get install bubba-album
runs through.
Thanks again, I learned much more about b3.
Really?
What I think is that your system is f*cked up. What you said is that you forcibly removed bubba-album, but the installer still wanted to do updates to a database that didn't exist. In other words: according to the installer you were upgrading from a previous version. You could say that the installer is kind of dumn this way, because it doesn't check if anyone deleted the database at some point. Second strange thing is that even though you had removed the package bubba-album, you apparently still had the SQL script to create the tables for the bubba-album database, which is part of that package and should have been gone as well. And so now you reinstalled the package and again it thought it was running as an upgrade, so there must have been some kind of version stamping still around, and tried to make changes to a database that was created with the correct layout already and therefore again causing errors while creating duplicate entries.

I told someone else and I'm telling you now: if you make changes to the system make sure not to conflict with (the behaviour of) core Bubba components. Work around them or take precautions so that the changes become unnoticed to these packages. In your case: add the .my.cnf file to (the root only readable) /root (chmod the file to 600 to make sure) - do note that the password that you assign to the MySQL root doesn't have to be the same as the one for root/admin/administrator anywhere else on the network.

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 02 Aug 2013, 11:40
by elsbernd
Gordon wrote:What I think is that your system is f*cked up.
Freedom, please calm down :-)
The "true" story is: I changed the mysql login from none to something useful. I didn't notice that from then on the album feature didn't work any more. Well, I don't needed that feature. I only need a nas storage.

Well then, when the update from to 2.5.2 was available, I used the web-interface to update the software, which then failed. And it took me a lot time to a) figure out, what happened, and hours trying to restore the unused password in b3. And that failed!!!
All provided solution didn't worked. That's the cause of the following problems. It seems not possible to re-instate an unused password. It is only possible to have a clear password, or a password to set to something useful.

Now, month later, since 2.6 is available, I tried to manual upgrade the system, and it failed to upgrade bubba-album. I assume, that at that point, the installation has left some files in the system.

Because I knew, that I cleared the password, suggested by some posts in the past, and the installer wanted a password to upgrade, I reinstalled a known password.
I provided the password, and the installation failed again! Not, because it couldn't access the db.

Because I didn't used the bubba-album feature, (the contents of the mysql-db album could be removed), I tried to remove the package bubba-album forcibly and re-install it. A procedure, which should have worked.

Then the installation process wanted the password of the db. No problem!
Then he complained about a column already there. Because the newly installed album was created with the new needed column "created" in the image table.
And the installation didn't recognized this, because he assumed an upgrade of an old mysql-db.
Your suggestion to create the album db (because it was possible removed during the package remove, don't really know) didn't make it better, because it installed the new table structure, including the column created and the index last_activity_idx.

So I only wanted to honor your suggestion how to create the album database again and that you drove me into the right direction. I solved the problems with the column created, the index last_activity_idx and the password.
So my system isn't f.. up.
And I didn't say "... that the installer is kind of dumn this way" and this was not my intention.
And I only want a solution to my problem.

A last remark:
if you make changes to the system make sure not to conflict with (the behaviour of) core Bubba components
Well, excito invited the user to do so explicitly. Well maybe the user should know, what they do :-)
And opening mysql for other usage should be within the possibilities of a system. As an example, I bought mailsteward pro for my mac to archive mails on an external mail server using mysql. Therefore I had to open the mysql service to the local network. And that is a service, that should be no problem for the system. But now, I'm wiser.

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 02 Aug 2013, 18:47
by Gordon
I apologize, you were just that one too many with your statement that essentially said "I don't like your solution, so I will keep on doing what I'm doing and complain about it". Other reasons caused me to use harsher words than were called for by you.

But in fact you still don't see the error in your own actions. Yes Excito invites you to alter the system to your own needs, but that doesn't mean that you should expect them to make their updates to the system follow whatever you've done. The key thing here is that everything that's on the B3 and wasn't put on there by you, is there on purpose. It is either a key component or it is optional, where in the latter case the web interface allows you to toggle that service on or off. So the quick conclusion here is that MySQL is a key component and you decided to shield it for the OS developers - this is like adding a firewall rule denying access to the Microsoft update site and then complaining that you're not getting critical updates.
And I didn't say "... that the installer is kind of dumn this way"
Damn right you didn't... I did. Whatever smartness one would ever assign to a piece of software always comes down to what the programmer put into it. The installer doesn't go thinking spontaneously that it should go and ask elsbernd for a password, because it simply follows the programmer's rules whose mind never crossed the idea that someone would want to fiddle with it. And in terms of trust: would you enter a system password on a non-secure http line if you're not even willing to save a non-vital password in a file that can only be accessed by a superuser? Also: how safe do you actually think that encrypted passwords are if the system needs to be able to decrypt them in order to use them? e.g. Your (Linux driven) internet access point will most likely contain the password that your provider gave you to get connected; do you know if that's stored in plain text or encrypted? Does it actually even matter?

PS Opening up the MySQL database server for multi-user access sounds really bold to me. Never in my wildest dreams would I ever think of hosting any type of relational database on this sort of hardware to physical users. It might do the job perfectly though for ISAM type access.

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 03 Aug 2013, 03:06
by Ubi
And to add to that, if you have a user that is able to read a password from a textfil that is chmod600 root, that user can also copy your entire database or restart mysql without grant tables...

If the installer would just read the pwd from /root/.my.cnf this whole thread would not be necessary, and many others like it in this forum.

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 03 Aug 2013, 09:25
by elsbernd
The key thing here is that everything that's on the B3 and wasn't put on there by you, is there on purpose.
and
The installer doesn't go thinking spontaneously that it should go and ask elsbernd for a password, because it simply follows the programmer's rules whose mind never crossed the idea that someone would want to fiddle with it.
My native language isn't English, so sorry if I haven't made clear enough what I wanted to say:
I never complained about the software asking me for a password, because I have changed it to something. I'm fully aware, that the software would ask for it. And the software installer asked for it. And that doesn't bother me.

In fact nothing of this system annoys me. I'm aware of it's limits. I'm willing to play with it and I'm accept, that something could go wrong.

And something went wrong. My fault. No problem.
Something in the process of upgrading the system failed to upgrade bubba-album. And the failure was not (IMHO), that the update process asked for a password. I happily typed that one in, when the software asked for it.
The failed automatic update had removed at some time the album-db and I want to reinstate this database. (*)
My question was only, how to reinstate this database.
And I managed it with the hint posted by Gordon.

And as a usual habit of me, I describe in detail, what happened. In the case that something I wrote rings some bells.

Maybe, we should go on to the next problems, because I hesitate already to ask other questions.

(*)(again, My fault, because I changed the password from nothing to something else, and no one in the community could give a hint, how to put the mysql system in its initial state. This problem is still open.)

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 03 Aug 2013, 17:31
by Gordon
elsbernd wrote:(*)(again, My fault, because I changed the password from nothing to something else, and no one in the community could give a hint, how to put the mysql system in its initial state. This problem is still open.)
I don't think so. The challenge is that the provided update routine requires user root to be able to log into MySQL as user root without being asked for a password. The answers provided in that previous subject fulfilled that requirement, as most likely does the above tip about the .my.cnf file.

Yes you may be happy to provide a password when asked, but why did you decide to do the upgrade to the current software version from console instead of what everyone else would do, which is press the update button in the web interface? And I'll give you the answer right now: because you knew that pressing that button wouldn't work because of what you changed on the system. That may not spell f*cked up in your dictionary, but it does in mine. You crippled a key part of the Bubba management system.

And whatever happened to your bubba-album database and when that did happen is anyone's guess. Apparently though it was an issue back then and it definitely turned out to be an issue this time. And even while we may have fixed it for now, not knowing what happened in the first place may mean that it can happen again if you maintain that non standard behaviour on your system.

And I will most likely be prepared to help you next time it breaks again, but right now I feel annoyed that you're not willing to take precautions to prevent recurrence. However happy you may feel about entering passwords...

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 04 Aug 2013, 04:27
by Ubi
I think this thread has gone far enough en has lost interest for the general population.

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 05 Aug 2013, 03:51
by Binkem
I agree with Ubi,

If you want to keep dicussing this subject please make it a seperate topic.
I will remove all new off-topic posts.

Martijn

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 16 Aug 2013, 14:41
by ingo2
I did experience the same troubles while upgrading with

Code: Select all

apt-get dist-upgrade
It runs smoothly through until it comes to configure bubba-album. There it presents a ncurses screen asking (translation):

"Do you want to configure the data-base for bubba-album using dbconfig-common"?
-> Yes and I am asked to
"enter the administative password for the database user"

No matter which PW I enter, be it root's or admin's, it complains:

Code: Select all

creating database backup in /var/cache/dbconfig-common/backups/bubba-album_2.5.1.3.mysql.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
unable to connect to mysql server.
error encountered backing up the old database:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
The only way to get through the whole upgrade process is to select "No" when asked to "configure the data-base for bubba-album using dbconfig-common".

After that going to the upgrade via web-interface it reports:

Code: Select all

		Paketname 	Paketversion
		bubba			2.6
		bubba-album		2.6
		bubba-backend		2.6
		bubba-frontend		2.6
		bubba3-kernel		1:2.6.39.4-11
		filetransferdaemon	0.55
		logitechmediaserver	7.7.2.dfsg1-1
and there are no upgrades available. I don't know if bubba-album is working, because I have never used it so far.

I think there is definitely something broken with the upgrade process and the configuration of bubba-album package.

Best regards,
Ingo

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 16 Aug 2013, 15:05
by johannes
ingo2 wrote: No matter which PW I enter, be it root's or admin's, it complains:
Did you try with an empty password? The database password (if I don't remember wrong now) should be empty. The "update" button in the web UI would have known this. :D

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 16 Aug 2013, 15:34
by ingo2
now I tried:

Code: Select all

dpkg-reconfigure bubba-album
I get 2 choices offered:

Code: Select all

Da Sie bubba-album neu konfigurieren, möchten Sie vielleicht auch die     │ 
 │ Datenbank, die es verwendet, neu installieren.                            │ 
 │                                                                           │ 
 │ Falls Sie die Datenbank für bubba-album neu installieren wollen, sollten  │ 
 │ Sie diese Option wählen. Falls Sie dies nicht wünschen (falls Sie das     │ 
 │ Paket aus anderen Gründen rekonfigurieren), sollten Sie diese Option      │ 
 │ nicht wählen.                                                             │ 
 │                                                                           │ 
 │ Datenbank für bubba-album neu installieren?                               │ 
 │                                                                           │ 
 │                    <Ja>                        <Nein>     
Selecting "Yes" to install the data-base asks some questions (about how to connect, socket, ..) which I do not know how to answer.
Selecting "No" gives:

Code: Select all

dbconfig-common: writing config to /etc/dbconfig-common/bubba-album.conf
Replacing config file /etc/dbconfig-common/bubba-album.conf with new version
Replacing config file /etc/album/debian-db.php with new version
Replacing config file /etc/album/debian-db.perl with new version
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.0.98 for ServerName
.
DBI connect('database=bubbaalbum;host=localhost;port=','bubba-album',...) failed: Access denied for user 'bubba-album'@'localhost' (using password: YES) at /usr/share/bubba-album/flush_thumbs.pl line 13
next trial:

Code: Select all

apt-get install --reinstall bubba-album
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Statusinformationen werden eingelesen... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  libparted0debian1 libcurl3 libssh2-1
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 1 erneut installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen noch 0 B von 7.177 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
(Lese Datenbank ... 39930 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Ersetzen von bubba-album 2.6 (durch .../bubba-album_2.6_all.deb) ...
Ersatz für bubba-album wird entpackt ...
bubba-album (2.6) wird eingerichtet ...
dbconfig-common: writing config to /etc/dbconfig-common/bubba-album.conf
dbconfig-common: flushing administrative password
Replacing config file /etc/album/debian-db.php with new version
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.0.98 for ServerName
.
DBI connect('database=bubbaalbum;host=localhost;port=','bubba-album',...) failed: Access denied for user 'bubba-album'@'localhost' (using password: YES) at /usr/share/bubba-album/flush_thumbs.pl line 13
The same. Seems I do not have a databas installed???

Regards,
Ingo

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 17 Aug 2013, 12:04
by ingo2
I am really stuck. I now checked existin databases:

Code: Select all

# mysqlshow 
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| album              |
| horde              |
| mysql              |
| squeezecenter      |
+--------------------+
so that should already be fine.
I logged in to mysql as root (was not asked for password) an checked status:

Code: Select all

mysql> status
--------------
mysql  Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (arm) using readline 6.1

Connection id:		70
Current database:	
Current user:		root@localhost
SSL:			Not in use
Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server version:		5.1.49-3 (Debian)
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	latin1
Db     characterset:	latin1
Client characterset:	latin1
Conn.  characterset:	latin1
UNIX socket:		/var/run/mysqld/mysqld.sock
Uptime:			17 min 24 sec

Threads: 1  Questions: 205  Slow queries: 0  Opens: 449  Flush tables: 1  Open tables: 64  Queries per second avg: 0.196
--------------

mysql> 
In /etc/mysql/debian.cnf I find the debian-sys-maint password:

Code: Select all

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = SECRET!
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = SECRIT!
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr


Restarting mysql server works without any error messages:

Code: Select all

# /etc/init.d/mysql restartStopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
I tried the recommendation from Gordon:

Code: Select all

# mysql < /usr/share/dbconfig-common/data/bubba-album/install/mysql
ERROR 1046 (3D000) at line 4: No database selected
which ends with an error.

Trying to re-install bubba-album fails:

Code: Select all

....
dbconfig-common: writing config to /etc/dbconfig-common/bubba-album.conf
dbconfig-common: flushing administrative password
Replacing config file /etc/album/debian-db.php with new version
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.0.98 for ServerName
.
DBI connect('database=bubbaalbum;host=localhost;port=','bubba-album',...) failed: Access denied for user 'bubba-album'@'localhost' (using password: YES) at /usr/share/bubba-album/flush_thumbs.pl line 13

What else can I try/do?

Regards,
Ingo

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 17 Aug 2013, 13:23
by lelle
ingo2 wrote:I am really stuck. I now checked existin databases:

Code: Select all

# mysqlshow 
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| album              |
| horde              |
| mysql              |
| squeezecenter      |
+--------------------+
so that should already be fine.
I logged in to mysql as root (was not asked for password) an checked status:

Code: Select all

mysql> status
--------------
mysql  Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (arm) using readline 6.1

Connection id:		70
Current database:	
Current user:		root@localhost
SSL:			Not in use
Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server version:		5.1.49-3 (Debian)
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	latin1
Db     characterset:	latin1
Client characterset:	latin1
Conn.  characterset:	latin1
UNIX socket:		/var/run/mysqld/mysqld.sock
Uptime:			17 min 24 sec

Threads: 1  Questions: 205  Slow queries: 0  Opens: 449  Flush tables: 1  Open tables: 64  Queries per second avg: 0.196
--------------

mysql> 
In /etc/mysql/debian.cnf I find the debian-sys-maint password:

Code: Select all

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = SECRET!
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = SECRIT!
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr


Restarting mysql server works without any error messages:

Code: Select all

# /etc/init.d/mysql restartStopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
I tried the recommendation from Gordon:

Code: Select all

# mysql < /usr/share/dbconfig-common/data/bubba-album/install/mysql
[b]ERROR 1046 (3D000) at line 4: No database selected[/b]
which ends with an error.

Trying to re-install bubba-album fails:

Code: Select all

....
dbconfig-common: writing config to /etc/dbconfig-common/bubba-album.conf
dbconfig-common: flushing administrative password
Replacing config file /etc/album/debian-db.php with new version
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.0.98 for ServerName
.
DBI connect('database=bubbaalbum;host=localhost;port=','bubba-album',...) failed: Access denied for user 'bubba-album'@'localhost' (using password: YES) at /usr/share/bubba-album/flush_thumbs.pl line 13

What else can I try/do?

Regards,
Ingo
Database is missing is after the mysql command (ie, mysql db < /usr/share/dbconfig-common/data/bubba-album/install/mysql

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 17 Aug 2013, 14:28
by ingo2
There seems to be a name mismatch:

Error message was (and still is):

Code: Select all

apt-get install --reinstall bubba-album

......
DBI connect('database=bubbaalbum;host=localhost;port=','bubba-album',...) failed: Access denied for user 'bubba-album'@'localhost' (using password: YES) at /usr/share/bubba-album/flush_thumbs.pl line 13
Executing the command you recommended (with data-base)

Code: Select all

mysql bubbaalbum < /usr/share/dbconfig-common/data/bubba-album/install/mysql

ERROR 1049 (42000): Unknown database 'bubbaalbum'
The data bases available instead are:

Code: Select all

 mysqlshow 

+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| album              |
| horde              |
| mysql              |
| squeezecenter      |
+--------------------+
So I tried with another database name 'album' and:

Code: Select all

mysql album < /usr/share/dbconfig-common/data/bubba-album/install/mysql
runs fine without any (error)-messages.
But the problem persists:

Code: Select all

apt-get install --reinstall bubba-album

...
dbconfig-common: writing config to /etc/dbconfig-common/bubba-album.conf
dbconfig-common: flushing administrative password
Replacing config file /etc/album/debian-db.php with new version
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.0.98 for ServerName
.
DBI connect('database=bubbaalbum;host=localhost;port=','bubba-album',...) failed: Access denied for user 'bubba-album'@'localhost' (using password: YES) at /usr/share/bubba-album/flush_thumbs.pl line 13
I do not know of the bubba internals and what the database name should be. Maybe the database name was changed during upgrade to version 2.6 and I still have the "old" ones installed?

Ingo

Re: Release notes for Excito Bubba 2&3 software version 2.6

Posted: 17 Aug 2013, 15:03
by ingo2
I just checked the logs from said upgrade to 2.6. Here the essential fraction:
Translations to English from me marked with -> [ ....]

Code: Select all

dpkg: Abhängigkeitsprobleme verhindern Konfiguration von bubba-frontend:  -> [dependency problem prevents configuration ...]
 bubba-frontend hängt ab von bubba-album (>= 0.99.1); aber:
  Paket bubba-album ist noch nicht konfiguriert.                                   -> [package bubba-album is not yet configured]
dpkg: Fehler beim Bearbeiten von bubba-frontend (--configure):       -> [Error processing bubba-frontend (--configure)]
 Abhängigkeitsprobleme - verbleibt unkonfiguriert                               -> [Dependencvy problem, stays un-configured]
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von bubba:
 bubba hängt ab von bubba-frontend; aber:
  Paket bubba-frontend ist noch nicht konfiguriert.                                 -> [bubba-frontend is not configured]
 bubba hängt ab von bubba-album; aber:
  Paket bubba-album ist noch nicht konfiguriert.
dpkg: Fehler beim Bearbeiten von bubba (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von bubba-backend:
 bubba-backend hängt ab von bubba; aber:
  Paket bubba ist noch nicht konfiguriert.
dpkg: Fehler beim Bearbeiten von bubba-backend (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
As one can see, all bubba* packages have been upgraded, but all are un-configured!