Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: denis.robel on May 21, 2021, 05:08:28 pm

Title: can't log in Webadmin
Post by: denis.robel on May 21, 2021, 05:08:28 pm
Hallo,

ich following problem:I can't login into the web admin gui.

<code>
Error inserting data: INSERT INTO audit_sessions ( `username`, `event`, `ip`, `timestamp`) VALUES ( ?, ?, ?, ?)
 
Values: $VAR1 = [
          'administrator',
          'fail',
          1574024078,
          '2021-5-21 17:4:38'
        ];

 at /usr/share/perl5/EBox/MyDBEngine.pm line 289
</code>

What can I do to fix the problem?
Title: Re: can't log in Webadmin
Post by: Daniel Joven on May 21, 2021, 05:48:51 pm
Hi Denis,

Can you please provide us more details?

* Which Zentyal version are you using?

* Is the service 'mysql' running correctly?
Code: [Select]
sudo systemctl status mysql

* Do you see any error in the following log files?

Best regards, Daniel Joven.
Title: Re: can't log in Webadmin
Post by: Luke on May 22, 2021, 11:46:05 am
I have same problem! Only in one of our servers, we have two.

Error inserting data: INSERT INTO audit_sessions ( `username`, `event`, `ip`, `timestamp`) VALUES ( ?, ?, ?, ?) Values: $VAR1 = [ 'tom', 'fail', 3232235888, '2021-5-22 11:44:28' ]; at /usr/share/perl5/EBox/MyDBEngine.pm line 289

Quote
Error inserting data: INSERT INTO audit_sessions ( `username`, `event`, `ip`, `timestamp`) VALUES ( ?, ?, ?, ?)
 
Values: $VAR1 = [
          'tom',
          'fail',
          3232235888,
          '2021-5-22 11:44:28'
        ];

 at /usr/share/perl5/EBox/MyDBEngine.pm line 289

in EBox::MyDBEngine::unbufferedInsert at /usr/share/perl5/EBox/MyDBEngine.pm line 289
  286:         EBox::debug ("Values: " . Dumper(\@vals) . "\n");
  287:         throw EBox::Exceptions::Internal("Error inserting data: $sql\n" .
  288:                                          $self->{dbh}->errstr .
  289:                                          " \n" .
  290:                                          "Values: " . Dumper(\@vals) .
  291:                                          "\n");
  292:     }


Mysql is running!
Title: Re: can't log in Webadmin
Post by: itbungler on May 22, 2021, 10:08:20 pm
Do you have restarted the host?
In general this looks like a DB/SQL Issue.
So reboot should fix this anyhow.
Otherwise or if a reboot is not possible I suggest to check mysql service.

my2cents
ITBungler
Title: Re: can't log in Webadmin
Post by: Luke on May 24, 2021, 09:27:15 am
I have made several reboots but the problem is still there! I checked the mysql service as suggested above.

Quote
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:>
     Active: active (running) since Fri 2021-05-21 17:52:42 CEST; 2 days ago
   Main PID: 930 (mysqld)
     Status: "Server is operational"
      Tasks: 41 (limit: 4653)
     Memory: 419.0M
     CGroup: /system.slice/mysql.service
             └─930 /usr/sbin/mysqld

May 21 17:52:19 domain systemd[1]: Starting MySQL Community Server...
May 21 17:52:42 domain systemd[1]: Started MySQL Community Server.
Title: Re: can't log in Webadmin
Post by: faceman604 on May 24, 2021, 09:31:38 am
Hi everybody,

i have exactly the same problem. In my case it helped to restart the module "webadmin" via command line:

Quote
sudo zs webadmin restart

After the restart you can login via WebGUI. Unfortunatly the error reoccurs after approximately a day. Hope somebody finds a real solution.

Thanks in advance!




Title: Re: can't log in Webadmin
Post by: itbungler on May 27, 2021, 09:44:56 am
Hi,

meanwhile I can reproduce the issue.
Workaround is to restart Service zentyal.webadmin-uwsgi
After that you can logon the gui again.

my2cents
ITBungler
Title: Re: can't log in Webadmin
Post by: Daniel Joven on May 28, 2021, 12:17:53 pm
Hi guys,

We are doing tests in different environments and we couldn't reproduce this issue yet. Could you please send me a private message and provide me the following information?

* Was the Zentyal server 7.0 upgraded from 6.2?
* Which 'domains' do you have enabled in the log module?
* Which version of the Zentyal modules are you using (dpkg -l | grep 'zentyal' )?
* Can you attach me the following log files? We would like to analyze those log files in order to see any trace that help us to identify the issue.
   * /var/log/zentyal/zentyal.log
   * /var/log/zentyal/error.log
   * /var/log/zentyal/uwsgi.log
   * /var/log/syslog
   * /var/log/mysql/error.log

     NOTE1: Ensure that the log files are from the day that you got the issue.
     NOTE2: Tell us the day where you got the issue.

Thank you for your feedback.

Best regards, Daniel Joven.
Title: Re: can't log in Webadmin
Post by: yochaigal on May 28, 2021, 04:59:03 pm
I can also confirm this issue. Next time it appears I'll upload some logs as well.

I get:
Error inserting data: INSERT INTO audit_sessions ( `username`, `timestamp`, `event`, `ip`) VALUES ( ?, ?, ?, ?) Values: $VAR1 = [ 'bfc', '2021-6-2 12:58:10', 'fail', 921502494 ]; at /usr/share/perl5/EBox/MyDBEngine.pm line 289

I then restart the webadmin service and everything comes back.
Title: Re: can't log in Webadmin
Post by: denis.robel on June 07, 2021, 02:41:25 pm
Hallo Daniel

* Was the Zentyal server 7.0 upgraded from 6.2?

yes


* Which 'domains' do you have enabled in the log module?

- Konfigurationsänderungen, Andministarionssitzung   
- E-Mail   
- Samba-Zugriff   
- DHCP   
- Firewall   
- SMTP-Filter   
- VPN   
- HTTP-Proxy   


* Which version of the Zentyal modules are you using (dpkg -l | grep 'zentyal' )?
 dpkg -l | grep 'zentyal'
ii  language-pack-zentyal-de               7.0                                                                all          Zentyal translations for language German
ii  zentyal                                7.0.0ubuntu1                                                       all          Zentyal - Core metapackage
ii  zentyal-antivirus                      7.0.1                                                              all          Zentyal - Antivirus
ii  zentyal-ca                             7.0.1                                                              all          Zentyal - Certification Authority
ii  zentyal-core                           7.0.4                                                              all          Zentyal - Core
ii  zentyal-dhcp                           7.0.2                                                              all          Zentyal - DHCP Server
ii  zentyal-dns                            7.0.2                                                              all          Zentyal - DNS Server
ii  zentyal-firewall                       7.0.0                                                              all          Zentyal - Firewall
ii  zentyal-groupware                      7.0.0ubuntu1                                                       all          Zentyal - Mail and Groupware
ii  zentyal-jabber                         7.0.0                                                              all          Zentyal - Jabber
ii  zentyal-mail                           7.0.1                                                              all          Zentyal - Mail
ii  zentyal-mailfilter                     7.0.0                                                              all          Zentyal - Mail Filter
ii  zentyal-network                        7.0.0                                                              all          Zentyal - Network Configuration
ii  zentyal-ntp                            7.0.0                                                              all          Zentyal - NTP Service
ii  zentyal-openvpn                        7.0.0                                                              all          Zentyal - VPN
rc  zentyal-radius                         6.0.1                                                              all          Zentyal - RADIUS
ii  zentyal-samba                          7.0.1                                                              all          Zentyal - Domain Controller and File Sharing
ii  zentyal-software                       7.0.0                                                              all          Zentyal - Software Management
ii  zentyal-sogo                           7.0.0                                                              all          Zentyal - Web Mail
ii  zentyal-squid                          7.0.2                                                              all          Zentyal - HTTP Proxy



* Can you attach me the following log files? We would like to analyze those log files in order to see any trace that help us to identify the issue.
   * /var/log/zentyal/zentyal.log
   * /var/log/zentyal/error.log
   * /var/log/zentyal/uwsgi.log
   * /var/log/syslog
   * /var/log/mysql/error.log
Title: Re: can't log in Webadmin
Post by: Daniel Joven on June 08, 2021, 01:27:40 pm
Hi denis.robel,

Thank you for the information, we are working in the solution.

Best regards, Daniel Joven.
Title: Re: can't log in Webadmin
Post by: oajlopez on July 28, 2021, 09:46:35 am
I have the same problem in two server
Title: Re: can't log in Webadmin
Post by: fjldurodie on July 28, 2021, 10:16:20 am
I also have the same issue for some time now.

This concerns a fresh install of Zentyal 7 (so no upgrade from 6)

I can confirm that restarting webadmin works (and is more convenient than rebooting).

I wanted to attach the technical info that can be found on the page as a pdf (85kB) but I couldn't (attachment too large ?)
F.
Title: Re: can't log in Webadmin
Post by: Luke on August 03, 2021, 10:26:21 am
We have this problem in one server of two. As other describe a quick solution is " sudo zs webadmin restart " but after a day or so its back to same problem.
Title: Re: can't log in Webadmin
Post by: rubicon on August 09, 2021, 08:28:59 am
A similar problem after upgrading from version 6.2 to version 7. sudo zs webadmin restart - but after a day or so its back to same problem.
/usr/share/perl5/EBox/MyDBEngine.pm line 289
Title: Re: can't log in Webadmin
Post by: Sycoriorz on September 13, 2021, 08:57:51 am
Dear,

i got this same issue.

Fresh installation but restored out of an Backup.
This backup was created from an old 5.1 Server which was updated till 7.0.
After finished update i create an Backup and has done an fresh install with restore

regards

Title: Re: can't log in Webadmin
Post by: grolon on September 22, 2021, 01:49:00 pm
Hi all,
I think i have the same problem

My test server is a zentyal 6.2 upgraded to 7.0

Error inserting data: INSERT INTO audit_sessions ( `timestamp`, `event`, `username`, `ip`) VALUES ( ?, ?, ?, ?) Values: $VAR1 = [ '2021-9-20 10:47:40', 'expired', 'administrador', 3232235777 ]; at /usr/share/perl5/EBox/MyDBEngine.pm line 289

I think this is related to logging msg to/from MySQL

I have disabled LOG in zentyal, for a couple of days, NO errors.

Today i have enabled them again, an got this error

DBD::mysql::st execute failed: The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior. at /usr/share/perl5/EBox/MyDBEngine.pm line 281

Any help will be welcomed
Title: Re: can't log in Webadmin
Post by: turalyon on September 27, 2021, 10:22:09 am
In my case, I have created a cronjob that restarts the webadmin module each 6 hours. This 'fix' the behaviour for me. Below my cronjob code:

Code: [Select]
## Workaround
## Added on: 15-09-2021
## Bug: https://github.com/zentyal/zentyal/issues/2055
0 */6 * * * /usr/bin/zs webadmin restart >/dev/null 2>&1

---
“This world is ours, and by the Holy Light we will keep it safe, now and forever".
Title: Re: can't log in Webadmin
Post by: grolon on September 30, 2021, 03:06:26 pm
Nice tip, thanks
Title: Re: can't log in Webadmin
Post by: fvarga on October 08, 2021, 06:24:49 pm
Unfortunately same thing here.
When I access from server, everything is ok.

But when I try from another PC which is on domain I always get this msg.

400 Bad Request
The plain HTTP request was sent to HTTPS port
nginx

command -> sudo zs webadmin restart doesn't help...

Anyone know what to do ?

Thank you in advance.
Title: Re: can't log in Webadmin
Post by: modsuper on October 16, 2021, 09:43:19 am
Thank you for the information, we are working in the solution.
Title: Re: can't log in Webadmin
Post by: fvarga on October 23, 2021, 01:28:41 pm
Hi,

any news ?
Title: Re: can't log in Webadmin
Post by: GIELUB on December 04, 2021, 11:04:07 am
Hi all,

I have the same problem on a newly installed V7.0 system.
The error does not occur on all systems.

Sometimes I ran the updates in the terminal.
I think the error occurred for the first time after an update with 'apt update' 'apt upgrade' ...

Is that a possible cause?
Title: Re: can't log in Webadmin
Post by: Laurent Dinclaux on January 22, 2022, 07:48:19 am
It sometimes happens to me too on some 7.0.4 boxes. Mysql is running, restarting webadmin as a workaround.
Title: Re: can't log in Webadmin
Post by: tamuin on February 06, 2022, 06:59:00 pm
Same issue here, just upgraded from 6.2

Error inserting data: INSERT INTO audit_sessions ( `username`, `timestamp`, `ip`, `event`) VALUES ( ?, ?, ?, ?) Values: $VAR1 = [ 'zadmin', '2022-2-6 12:40:41', 168430183, 'fail' ]; at /usr/share/perl5/EBox/MyDBEngine.pm line 289