Opened 12 years ago
Closed 7 years ago
#969 closed enhancement (wontfix)
Ushahidi port to PostgreSQL
Reported by: | hamish | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Unplanned |
Component: | OSGeoLive | Keywords: | chroot, mysql, ushahidi |
Cc: | eyedol |
Description
Hi,
just looking through the 6.0 beta6 build logs. this looked broken:
install_mysql.sh .. MySQL admin name is <debian-sys-maint>. (see /etc/mysql/debian.cnf) ERROR 1045 (28000) at line 3: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) ... ushahidi: tar: A lone zero block at 17095 ERROR 1044 (42000) at line 2: Access denied for user 'user'@'localhost' to database 'ushahidi'
?
thanks, Hamish
Change History (43)
comment:1 by , 12 years ago
Type: | task → defect |
---|
follow-up: 4 comment:2 by , 12 years ago
comment:3 by , 12 years ago
comment:4 by , 12 years ago
Replying to hamish:
Hi,
a couple errors in the updated script for 6.0 beta7:
mv: cannot stat `Ushahidi_Web': No such file or directory cp: cannot stat `ushahidi/': No such file or directory?
I added a quick fix to the installer to fix the broken mv command for renaming Ushahidi_Web folder to ushahidi
there was another small script error on line 74 which I've now fixed.
thanks, Hamish
comment:5 by , 12 years ago
Replying to hamish:
Hi,
just looking through the 6.0 beta6 build logs. this looked broken:
install_mysql.sh .. MySQL admin name is <debian-sys-maint>. (see /etc/mysql/debian.cnf) ERROR 1045 (28000) at line 3: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) ... ushahidi: tar: A lone zero block at 17095 ERROR 1044 (42000) at line 2: Access denied for user 'user'@'localhost' to database 'ushahidi'
This mysql issue seems more of a mysql admin credential problem. The administrator user/user doesn't exist on the mysql server and those are the credentials ushahidi's install script uses. If I could know what credentials were created for an admin user upon installing mysql-server, I can update the install script to use those.
?
thanks, Hamish
follow-up: 7 comment:6 by , 12 years ago
The admin credentials in install_mysql.sh file looks good to so if that is ran before the install_ushahidi.sh script, then it should work if the install_mysql file runs successfully.
Could someone test if this issue still exist? Otherwise, I'll go ahead and close this issue.
Thanks, Henry!
comment:7 by , 12 years ago
Replying to eyedol:
The admin credentials in install_mysql.sh file looks good to so if that is ran before the install_ushahidi.sh script, then it should work if the install_mysql file runs successfully.
there is an error in install_mysql.sh:
.. MySQL admin name is <debian-sys-maint>. (see /etc/mysql/debian.cnf) ERROR 1045 (28000) at line 3: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
(6.0 beta6 build log)
Hamish
follow-up: 9 comment:8 by , 12 years ago
Priority: | normal → critical |
---|
Ushahidi still broken in beta9 (live-session)
follow-up: 10 comment:9 by , 12 years ago
follow-up: 11 comment:10 by , 12 years ago
Replying to eyedol:
Replying to kalxas:
Ushahidi still broken in beta9 (live-session)
Any log messages to look at?
sure: http://aiolos.survey.ntua.gr/gisvm/6.0/osgeo-live-mini-6.0beta9-log.tar.gz
comment:11 by , 12 years ago
Replying to kalxas:
Replying to eyedol:
Replying to kalxas:
Ushahidi still broken in beta9 (live-session)
Any log messages to look at?
sure: http://aiolos.survey.ntua.gr/gisvm/6.0/osgeo-live-mini-6.0beta9-log.tar.gz
Thanks.
I checked the log file but it looks like the beta9 is running the old ushahidi install script. I updated the script with a fix to
mv: cannot stat `Ushahidi_Web': No such file or directory cp: cannot stat `ushahidi/': No such file or directory
The log message is still complaining about that issue. My guess is, the new install script didn't ran.
follow-up: 14 comment:13 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
confirmed to be working on build8877 thanks.
comment:14 by , 12 years ago
comment:15 by , 12 years ago
install_mysql.sh and install_ushaidi.sh logs still contain errors:
Setting up mysql-server (5.5.24-0ubuntu0.12.04.1) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place .. MySQL admin name is <debian-sys-maint>. (see /etc/mysql/debian.cnf) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
(ushahidi one is the same)
maybe that is harmless, just because mysql isn't running at the time?
Hamish
comment:16 by , 12 years ago
Yes. For some reasons, the mysql service isn't running and the script is trying to make a connection to the service.
install_mysql.sh script seems to be failing somewhere upon installation.
In the mysql install script, there is no command to start the mysql service after the install. That could be the issue. Because it tries to connect to the service to create an account. Although, 'apt-get install' tries to start the service upon successful installation. Not sure why it fails.
I have gone ahead and added a command to start the service manually before it attempts to create an account.
comment:17 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:18 by , 12 years ago
After clicking "Let's get started" there's an error at the top:
- The imap extension could not be loaded
and you can proceed no further.
sudo /etc/init.d/mysql restart
shows no errors at the terminal.
follow-up: 20 comment:19 by , 12 years ago
Fixed -- Added imap and gd to the list of dependencies to be installed
comment:20 by , 12 years ago
Replying to eyedol:
Fixed -- Added imap and gd to the list of dependencies to be installed
thanks, now it gets past the imap complaint.
but on the next screen (db login) we're back to the mysql problem:
Listed below is a summary of the errors we encountered:
- Connection error: Access denied for user 'user'@'localhost' (using password: YES)
- Database connection error: [same as above]
from the command line in the r8980 build,
user@osgeolive:~$ mysql mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | test | +--------------------+ 2 rows in set (0.00 sec)
no db named ushahidi existing?
user@osgeolive:~$ mysql -h localhost -u user -p Enter password: ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: YES)
:-(
Hamish
comment:21 by , 12 years ago
funny, does /etc/mysql/debian.cnf get removed? it's not there in the iso, but seems to have worked to extract the admin name below:
MySQL admin name is <debian-sys-maint>. (see /etc/mysql/debian.cnf)
I only see /etc/mysql/my.conf. ?
anyway, this works:
user@osgeolive:~$ mysql -u root -p Enter password:
with the user's paswd. then
CREATE DATABASE ushahidi; GRANT ALL PRIVILEGES ON ushahidi.* TO ‘user’@’localhost’ IDENTIFIED BY ‘user’;
as described in the ushahidi quickstart.
hopefully fixed by r9009, but I've put some debugging stuff into the build log in case it isn't.
Hamish
follow-up: 23 comment:22 by , 12 years ago
beta10
user@osgeolive:~$ mysql -u root -p Enter password: user ... mysql> show databases; ... mysql ... test ..
is this the expected list ?
comment:23 by , 12 years ago
Replying to darkblueb:
beta10
It was fixed soon after beta10; wait for the next build.
thanks, Hamish
comment:25 by , 12 years ago
it didn't work in the r9057 build.
install_mysql.sh:
note it restarted mysql since pgrep thought it was already running (maybe the install_mysql.sh script itself?)
Restarting mysql.. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
but it connects fine at run time on the ISO..?
Hamish
comment:26 by , 12 years ago
As Alex and Hamish pointed out, this is a mysql problem to run inside chroot, so the problem appears during build time only:
http://stackoverflow.com/questions/5056710/running-mysql-in-chroot http://ubuntuforums.org/showthread.php?t=1625863 https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/430224 http://www.symantec.com/connect/articles/securing-mysql-step-step http://www.webhostingskills.com/articles/mysql_in_a_chrooted_environment
comment:27 by , 12 years ago
I've committed a script in app-conf/ushahidi/rc.go_mysql to run at boot time, to set the credentials and create the ushahidi db if needed. It would be better to get the diversions working in the chroot environment, but I fear we are too close to release to test that properly. Another idea promoted by kalxas would be to install mysql-server on the chroot's host (it's an identical platform on his build platform), but interactions and change targets are unknown without testing, which we don't really have time for.
the /etc/rc2.d/S99rc.go_mysql startup script work around has been tested in test build r9066 and seems to work well for me. I've got concerns about the db setup being vulnerable to a race condition with mysql startup up just a few seconds before, but hopefully I built enough of a delay into it so that is rare, if at all.
- summary: ushahidi is working on the iso now with an ugly work-around, problem was trying to run mysql in a chroot.
Hamish
comment:28 by , 12 years ago
Milestone: | OSGeoLive6.0RC1 → OSGeoLive6.5 |
---|---|
Priority: | critical → normal |
This was fixed and confirmed in build [9066]
Moving it to 6.5 for a better solution
comment:29 by , 12 years ago
Milestone: | OSGeoLive6.5 |
---|
MySQL wasn't fixed, it was poorly worked around using a cheap and temporary hack (mea culpa). We don't know yet how it will react on the VM or USB install. With luck it will allow Ushahidi work, but we may not be out of the woods yet.
We should continue to work on this issue in the weeks post-release, so if a 6.0.1 bug fix release is needed (for some other reason) the mysql-chroot build fix will be ready to go in for that.
best, Hamish
comment:30 by , 12 years ago
Priority: | normal → major |
---|
comment:31 by , 12 years ago
Keywords: | chroot added |
---|---|
Milestone: | → OSGeoLive6.5 |
This problem is not yet fixed and we are towards 6.5 beta. So far this hack seems to work fine, no complaints about Ushahidi and this is tested to work under a VM installation. Thoughts?
comment:32 by , 12 years ago
Summary: | mySQL and Ushahidi: db permission problems → mySQL and Ushahidi: db permission problems during chroot |
---|
comment:33 by , 12 years ago
Milestone: | OSGeoLive6.5 → OSGeoLive7.0 |
---|
comment:34 by , 12 years ago
I guess there will be a Ushahidi version upgrade for 7.0. The question is if Postgresql is now supported...
comment:36 by , 11 years ago
Milestone: | OSGeoLive7.9 → OSGeoLive8.0 |
---|
follow-up: 38 comment:37 by , 11 years ago
Hi eyedol,
any update on back-end postgresql support for newer Ushahidi?
It's the last hold-out before we can drop mysql from the disc and free up a bunch of space + effort.
thanks, Hamish
comment:38 by , 10 years ago
Cc: | added |
---|
Replying to hamish:
Hi eyedol,
any update on back-end postgresql support for newer Ushahidi? It's the last hold-out before we can drop mysql from the disc and free up a bunch of space + effort.
Postgres is still preferred, but just to note here some talk on the ML/IRC about mariaDB being an easy swap out as mysql security patches become less distro-friendly.
Hamish
comment:39 by , 10 years ago
Keywords: | 6.0 removed |
---|---|
Milestone: | OSGeoLive8.0 → OSGeoLive8.5 |
comment:40 by , 10 years ago
Milestone: | OSGeoLive8.5 → OSGeoLive9.0 |
---|
This is still not happening in 8.5
comment:41 by , 9 years ago
Milestone: | OSGeoLive9.0 → OSGeoLive9.5 |
---|
Ticket retargeted after milestone closed
comment:42 by , 9 years ago
Milestone: | OSGeoLive9.5 → Unplanned |
---|---|
Priority: | major → normal |
Summary: | mySQL and Ushahidi: db permission problems during chroot → Ushahidi port to PostgreSQL |
Type: | defect → enhancement |
comment:43 by , 7 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
install_ushahidi.sh is retired for Live11
Hi,
a couple errors in the updated script for 6.0 beta7:
?
there was another small script error on line 74 which I've now fixed.
thanks, Hamish