SOLVED - Can't login with HTML5 console

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

Locked
Flanger
Posts: 4
Joined: Sat Oct 21, 2017 2:10 pm

SOLVED - Can't login with HTML5 console

Post by Flanger » Sun Oct 22, 2017 12:24 pm

Hello everybody.

As the title describes I can not log in when selecting HTML5 console. When I try to log in, web front end gives no error as if I didn't click on login button at all. API log shows this error:

Code: Select all

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'password_date' in 'field list' in /opt/unetlab/html/includes/api_authentication.php:108
Stack trace:
#0 /opt/unetlab/html/includes/api_authentication.php(108): PDOStatement->execute()
#1 /opt/unetlab/html/api.php(121): apiLogin(Object(PDO), Object(PDO), Array, 'f2b71ccc-b0f8-4...')
#2 [internal function]: {closure}()
#3 /opt/unetlab/html/includes/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#4 /opt/unetlab/html/includes/Slim/Slim.php(1357): Slim\Route->dispatch()
#5 /opt/unetlab/html/includes/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#6 /opt/unetlab/html/includes/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#7 /opt/unetlab/html/includes/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#8 /opt/unetlab/html/includes/Slim/Slim.php(1302): Slim\Middleware\PrettyExceptions->call()
#9 /opt/unetlab/html/api.php(1339): Slim\Slim->run()
#10 {main}
Here is the referred portion of the code from api_authentication.php file:

Code: Select all

106 $query = "replace into guacamole_user(user_id,username, password_hash, password_date ) values  ( ".($pod+1000)." , '".$username."', UNHEX(SHA2('unl',256) ), '".date("Y-m-d H:i:s")."');";
107 $statement = $html5_db -> prepare($query);
108 $statement -> execute();
Browser: Chrome 62.0.3202.62 (Tried with IE, same error)
EVE-NG version: 2.0.3-84
Last edited by Flanger on Mon Oct 23, 2017 12:54 am, edited 1 time in total.

Uldis (UD)
Posts: 5081
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Can't login with HTML5 console

Post by Uldis (UD) » Sun Oct 22, 2017 9:14 pm


Flanger
Posts: 4
Joined: Sat Oct 21, 2017 2:10 pm

Re: Can't login with HTML5 console

Post by Flanger » Mon Oct 23, 2017 12:53 am

Just in case anybody else encounters the same problem, looks like Guacamole SQL database got either corrupted or didn't update properly. This fixes it:

Code: Select all

#cat /opt/unetlab/schema/guacamole-update.sql | mysql -u root --password=eve-ng guacdb
Thank you for this tip Uldis and redfish.

jjc1984
Posts: 10
Joined: Sun Nov 26, 2017 4:48 am

Re: SOLVED - Can't login with HTML5 console

Post by jjc1984 » Tue Jun 12, 2018 11:11 pm

i have the same issue, when selecting html5 and clic on login didn't do anything. Native console works fine.

I execute cat /opt/unetlab/schema/guacamole-update.sql | mysql -u root --password=eve-ng guacdb

but i doesn't work, do i have to put my own password instead of eve-ng ?

jjc1984
Posts: 10
Joined: Sun Nov 26, 2017 4:48 am

Re: SOLVED - Can't login with HTML5 console

Post by jjc1984 » Wed Jun 13, 2018 3:23 am

when I access to the eve-ng remote server , the web shows up fine but I get the errors on the 1st screenshot. When selecting html5 and then click on sign in I get the errors on the 2nd screenshot
You do not have the required permissions to view the files attached to this post.

jjc1984
Posts: 10
Joined: Sun Nov 26, 2017 4:48 am

Re: SOLVED - Can't login with HTML5 console

Post by jjc1984 » Wed Jun 13, 2018 1:58 pm

I solved this issue doing the following :

apt install --reinstall eve-ng ; apt install --reinstall eve-ng-guacamole

Locked