Unable to log in to Expediton after upgrading

Reply
L3 Networker

Unable to log in to Expediton after upgrading

Hello,

 

After upgrading expedition, I'm no longer able to login to the tool using the GUI.

Via CLI I still can log in.

I had changed the admin password, and I'm sure I'm using the correct password, since I've been using this login prior to the upgrade of Expedition.

In the past I could reset the admin password via the PHP script in /home/userSpace/utils

But if I try to run this, I'm gettting another error:

 

sudo php /home/userSpace/utils/restoreAdmin.php

[sudo] password for expedition:

PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/userSpace/utils/restoreAdmin.php on line 81

Connection failed: No such file or directoryexpedition@Expedition

 

74 $servername = "localhost";

75 $username = "root";

76 $password = "paloalto";

77

78 $colors = new Colors();

79

80 // Create connection

81 $conn = new mysqli($servername, $username, $password);

82

83 // Check connection

84 if ($conn->connect_error) {

85     die("Connection failed: " . $conn->connect_error);

86 }

87 echo $colors->getColoredString("\n".chr(0xE2).chr(0x9C).chr( 0x93)."\tConnected successfully to the database\n", "green");

88

89 $checkAdminExists = "SELECT id FROM pandbRBAC.users WHERE email='admin' and id=1;";

90 $result=$conn->query($checkAdminExists);

 

 

I'm out of options in how to solve this, without re-installing the tool again.

 

Anyone has a clue?

 

Regards,

Gerrit

L2 Linker

Re: Unable to log in to Expediton after upgrading

I am having a similar issue. I was unable to authenticate on our existing Expedition VM so i spun up a new one with the new process (Install Ubuntu the Expedition installer via wget) and same issue. No credentials work via GUI. I can access the console just fine. Ran apt-get update/upgrade no change.

L2 Linker

Re: Unable to log in to Expediton after upgrading

I ran the following:

tail -g /var/log/apache2/error.log.

 

[:error] [pid2111] [client 10.10.1.60:10857] PHP Fatal error: Database connection failed; Connection refused in /var/www/html/libs/database.php on line 24, referer: https://10.10.1.10/

 

Permissions issue on database maybe?

L4 Transporter

Re: Unable to log in to Expediton after upgrading

To me, this sounds an issue related to upgrading expedition instead of updating.

The upgrade has updated all packages,including the MariaDB package, and broke dependencies that are required for the tool to work.

For this reason, there may be missing package functions that allow Expedition to interact with the database.

Does it make sense?

L3 Networker

Re: Unable to log in to Expediton after upgrading

Hi,

 

I did as in:

https://live.paloaltonetworks.com/t5/Expedition-Discussions/Incorrect-User-or-Password-from-GUI/m-p/...

 

Try deleting the file

sudo rm -f /var/lib/mysql/tc.log

and afterwards, try starting mariadb again.

sudo service mysql start

 

Later, if MariaDB started correctly, just check if you can log into the GUI with your normal credentials. If it still fails, then try restorning the admin password with the CLI script

 

php /home/userSpace/utils/restore/restoreAdmin.php

Then I could log on again:

root@Expedition:/home/expedition# sudo php /home/userSpace/utils/restoreAdmin.php

 

✓ Connected successfully to the database

✓ Admin user found

✓ Admin password restored to:    'paloalto'

 

 

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!