Ticket #4538 (closed defect: worksforme)
Access denied for user 'zentyal'@'localhost' (using password: YES)
| Reported by: | jekakmail@… | Owned by: | jamor@… |
|---|---|---|---|
| Milestone: | 3.0.X | Component: | base |
| Severity: | major | Keywords: | mysql zentyal-firewall install |
| Cc: | kevin@… |
Description (last modified by jamor@…) (diff)
Error
DBI connect('zentyal','zentyal',...) failed: Access denied for user 'zentyal'@'localhost' (using password: YES)
Trace
DBI connect('zentyal','zentyal',...) failed: Access denied for user 'zentyal'@'localhost' (using password: YES) at /usr/share/perl5/EBox/MyDBEngine.pm line 117.
Attachments
Change History
Changed 11 months ago by anonymous
-
attachment
zentyal.log
added
comment:1 Changed 11 months ago by jamor@…
- Description modified (diff)
- Summary changed from Bug report from Zentyal Server to Access denied for user 'zentyal'@'localhost' (using password: YES)
comment:2 Changed 11 months ago by jamor@…
- Status changed from new to closed
- Resolution set to worksforme
Hello Jekakmail,
this should be fixed in the last beta version. Since your version cannot be upgraded to it, I suggest you to download the new installer and try it.
Regards,
Javier
comment:3 Changed 7 months ago by imkebe@…
- Status changed from closed to reopened
- Resolution worksforme deleted
Same problem Ubuntu Precise. Clear installation. Proper Mysql DB config (user, pass, priviliges, schema, host), proper zentyal-mysql.passwd
comment:5 Changed 7 months ago by jamor@…
- Status changed from reopened to accepted
Hello Imkebe,
what happens if you try to access manually to the msyql server?. You could try it with this command:
sudo mysql --user zentyal --password=`cat /var/lib/zentyal/conf/zentyal-mysql.passwd` zentyal
comment:6 Changed 7 months ago by jamor@…
- Status changed from accepted to closed
- Resolution set to worksforme
Sorry, I need the requested feedback.
Please, reopen if you can provide it.
comment:7 Changed 5 months ago by kjbinstl
- Cc kevin@… added
- Keywords mysql zentyal-firewall install added
- Status changed from closed to reopened
- Resolution worksforme deleted
- Severity changed from normal to major
I have the same issue and can provide the requested feedback. I am trying to install zentyal fresh on a previously blank server, Zentyal core version 3.0.8, Ubuntu server 12.04, kernel version 3.2.0-29-generic #46-Ubuntu.
The error apparently occurs when the installer gets to this step:
dpkg --configure zentyal-firewall
Then of course numerous other packages that depend on the firewall package don't get installed / configured either.
I tried accessing the mysql server with the command listed,
sudo mysql --user zentyal --password=`cat /var/lib/zentyal/conf/zentyal-mysql.passwd` zentyal
but there is no such file /var/lib/zentyal/conf/zentyal-mysql.passwd
Furthermore, in case it matters, I didn't create a system user zentyal on purpose--maybe the installation does? But if it assumes that is the first user created, that's a problem, maybe?
The directory /var/lib/zentyal/conf/ contains two password files:
ebox.passwd redis.passwd
and supplying either of those to mysql fails too. I tried making a blank (0-length) file zentyal-mysql.passwd but that doesn't work either:
sudo mysql --user zentyal --password=`cat /var/lib/zentyal/conf/zentyal-mysql.passwd` zentyal ERROR 1045 (28000): Access denied for user 'zentyal'@'localhost' (using password: NO)
I then read about mysql (yes, I'm totally new to anything related to servers, though I've installed desktop linux versions about 10 times) and I tried making a password file that contained the mysql hash of the system administrator password and feeding that to the command above. Nope, that didn't work either.
Help?? and thank you in advance.
comment:8 Changed 5 months ago by jag
- Status changed from reopened to closed
- Resolution set to duplicate
Seems that something went bad in your installation process.
To fix it, try the workaround given in #4909
comment:9 Changed 5 months ago by Kjbinstl
- Status changed from closed to reopened
- Resolution duplicate deleted
I had already tried the step listed in #4909, without success, perhaps because that bug was for postgres not mysql. I believe this is a different issue; please see the information in the previous post.
comment:10 Changed 5 months ago by jag
The script has been changed for mysql, also it creates the password file.
We can try the create-db script in 'display commands' mode. This way we will see when it fails.
To do so:
sudo bash -x /usr/share/zentyal/create-db
Could you paste the output?
comment:11 Changed 5 months ago by Kevin J. Black <kevin@…>
Here is the command and all output:
sudo bash -x /usr/share/zentyal/create-db + db_name=zentyal + db_user=zentyal + '[' -d /var/lib/mysql/zentyal ']'
It does not create the password file:
ls -l /var/lib/zentyal/conf/zentyal-mysql.passwd ls: cannot access /var/lib/zentyal/conf/zentyal-mysql.passwd: No such file or directory
So the same error happens:
sudo dpkg --configure zentyal-firewall Setting up zentyal-firewall (3.0.1) ... root command /bin/cat /var/lib/zentyal/conf/zentyal-mysql.passwd failed. Error output: /bin/cat: /var/lib/zentyal/conf/zentyal-mysql.passwd: No such file or directory Command output: . Exit value: 1dpkg: error processing zentyal-firewall (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: zentyal-firewall
OH YEAH! finally figured this out. The create-db script didn't really run because the zentyal directory already existed (near the bottom of the script). I stepped through it anyway and it went OK up to this point:
perl -MEBox -MEBox::Util::SQL -e'EBox::init(); EBox::Util::SQL::createCoreTables(); 1'; root command mysql --defaults-file=/etc/mysql/debian.cnf zentyal < /usr/share/zentyal/sql/backup_slices.sql failed. Error output: ERROR 1061 (42000) at line 10: Duplicate key name 'backup_slices_i' Command output: . Exit value: 1
and the next command gave:
mysqladmin -u root password "$PASSWD" mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)'
I then went to this article: http://ubuntuforums.org/showthread.php?t=1726983
and followed the link to this one: https://help.ubuntu.com/community/MysqlPasswordReset
and followed the instructions there. After granting root privileges to the zentyal database, NOW finally the command ran:
dpkg --configure zentyal-firewall Setting up zentyal-firewall (3.0.1) ... * Restarting Zentyal module: firewall [ OK ] Processing triggers for zentyal-core ... * Restarting Zentyal module: apache [ OK ] * Restarting Zentyal module: logs [ OK ] * Restarting Zentyal module: events [ OK ]
SUCCESS!! and now ...
sudo dpkg --configure -a Setting up zentyal-trafficshaping (3.0) ... * Restarting Zentyal module: trafficshaping [ OK ] Setting up zentyal-dns (3.0.3) ... * Restarting Zentyal module: dns [ OK ] Setting up zentyal-webserver (3.0.1) ... Setting up zentyal-bwmonitor (3.0.1) ... Setting up zentyal-dhcp (3.0.2) ... * Restarting Zentyal module: dhcp [ OK ] Setting up zentyal-openvpn (3.0.2) ... * Restarting Zentyal module: openvpn [ OK ] Setting up zentyal-l7-protocols (3.0) ... Setting up zentyal-ipsec (3.0.1) ... Not valid autoload method serviceForAnyConnectionId for EBox::Services::Model::ServiceTable classdpkg: error processing zentyal-ipsec (--configure): subprocess installed post-installation script returned error exit status 25 Setting up zentyal-ltsp (3.0.1) ... Setting up zentyal-antivirus (3.0) ... Setting up zentyal-virt (3.0) ... Setting up zentyal-ntp (3.0) ... * Restarting Zentyal module: ntp [ OK ] Setting up zentyal-users (3.0.6) ... * Restarting Zentyal module: users [ OK ] Setting up zentyal-remoteservices (3.0.10) ... Setting up zentyal-ftp (3.0.1) ... Setting up zentyal-usercorner (3.0.2) ... Setting up zentyal-squid (3.0.2) ... * Restarting Zentyal module: squid [ OK ] Setting up zentyal-captiveportal (3.0) ... Setting up zentyal-infrastructure (3.0) ... Setting up zentyal-samba (3.0.9) ... * Restarting Zentyal module: samba [ OK ] Setting up zentyal-gateway (3.0) ... Setting up zentyal-printers (3.0.1) ... * Restarting Zentyal module: printers [ OK ] Setting up zentyal-office (3.0) ... Processing triggers for zentyal-core ... * Restarting Zentyal module: apache [ OK ] * Restarting Zentyal module: logs [ OK ] * Restarting Zentyal module: events [ OK ] Errors were encountered while processing: zentyal-ipsec
even more SUCCESS!! OK, a different but much smaller problem, and basically my original issue was finally fixed! Thanks for the help, and maybe this verbose additional information will help a future user with the same error.
comment:12 Changed 5 months ago by jag
- Status changed from reopened to closed
- Resolution set to worksforme
Not valid autoload method serviceForAnyConnectionId for EBox::Services::Model::ServiceTable classdpkg: error processing zentyal-ipsec (--configure): subprocess installed post-installation script returned error exit status 25
Try to update you zentyal-services package to 3.0.1 . This version has the method.
Regards,
Javier
comment:13 Changed 5 months ago by Kevin J. Black <kevin@…>
Thank you! Unfortunately, version 3.0.1 of zentyal-services is what was installed already:
dpkg --status zentyal-ipsec Package: zentyal-ipsec Status: install ok half-configured Priority: optional Section: web Installed-Size: 124 Maintainer: José Antonio Calvo <jacalvo@zentyal.org> Architecture: all Version: 3.0.1 Depends: zentyal-core (>= 3.0), zentyal-core (<< 3.0.100), openswan, zentyal-firewall, lsof Conffiles: /etc/zentyal/ipsec.conf 9a99b21ca702594c39dc810fae3f3a4c Description: Zentyal - IPsec Zentyal is a Linux small business server that can act as a Gateway, Unified Threat Manager, Office Server, Infrastructure Manager, Unified Communications Server or a combination of them. One single, easy-to-use platform to manage all your network services. . This module adds a IPsec (OpenSwan) server to Zentyal.
comment:14 Changed 5 months ago by jag
That is the zentyal-ipsec package, check the zentyal-services package
comment:15 Changed 5 months ago by Kevin J. Black <kevin@…>
Oops, my bad. Thank you for your patience. But that package is also at 3.0.1 as shown below. I can move this ipsec problem to a new ticket if you prefer, since it may not be .
sudo dpkg --status zentyal-services Package: zentyal-services Status: install ok installed Priority: optional Section: web Installed-Size: 100 Maintainer: Zentyal Packaging Maintainers <pkg-team@zentyal.com> Architecture: all Version: 3.0.1 Replaces: ebox-services (<< 2.0.100) Depends: zentyal-core (>= 3.0.8), zentyal-core (<< 3.0.100) Breaks: ebox-services (<< 2.0.100) Description: Zentyal - Network Services ...
zentyal.log