hashtopolis / server

Hashtopolis - distributed password cracking with Hashcat
GNU General Public License v3.0
1.46k stars 222 forks source link

Database connection failed in Hashtopolis /install/index.php #950

Closed DekrimX closed 1 year ago

DekrimX commented 1 year ago

So I am trying to install Hashtopolis in centos 7 and I did everything correctly, but the database connection should be asked after I finish the installation process, but when I copy the git to my http directory and browse into serverIP/install I get the following error "Database Connection Failed"

I am so confused as what seems to be the problem. I am unable to run the Install file for hashtopolis. I have put in 4 hours of my time and my mind is broken at this point, any help will be appricated.

xbenyx commented 1 year ago

How did you install the app? Docker or manually?

DekrimX commented 1 year ago

Manually. Upto setting up apache php and mariaDB, everything is good. To setup hashtopolis in centos I used,

cd /opt git clone https://github.com/s3inlc/hashtopolis cp -R hashtopolis/src/. /opt/rh/httpd24/root/var/www/html/. chown -R apache: /opt/rh/httpd24/root/var/www/html/.

DekrimX commented 1 year ago

How did you install the app? Docker or manually?

Manually. Upto setting up apache php and mariaDB, everything is good. To setup hashtopolis in centos I used,

cd /opt git clone https://github.com/s3inlc/hashtopolis cp -R hashtopolis/src/. /opt/rh/httpd24/root/var/www/html/. chown -R apache: /opt/rh/httpd24/root/var/www/html/.

Now after the files are copied to the HTML folder, I am to visit the server IP/install to finish the installation but I am shown Database connection failed error.

xbenyx commented 1 year ago

Did you create and grant permissions in mysql for a hashtopolis user?

DekrimX commented 1 year ago

Did you create and grant permissions in mysql for a hashtopolis user?

Yes I created a database and a user and full pemissions in mysql for hashtopolis. Can you tell me where to add database server IP, username, database_name, and password in the files. Do I need to put those details before I go into the install directory

DekrimX commented 1 year ago

Let me explain what is the problem! I copied the files to the server root html folder. Then I visited the serverIP/install/ in a browser, a installation page should pop up (as seen on installation videos and guides), the issue I am facing is that no installation page is displayed. I have nowhere to write any database details etc, just a plain Database connection failed! blank white page is displayed instead of a installation page. I am so confused, normally if I type in wrong data for mysql, this error should happen, but I didn't put in any data at all, just fresh upload and directly went to SERVERIP/install and nothing but a blank page with Database connection failed! error.

DekrimX commented 1 year ago

Error Log if anything helps from it,

[Thu Jul 20 09:55:11.914312 2023] [suexec:notice] [pid 3065] AH01232: suEXEC mechanism enabled (wrapper: /opt/rh/httpd24/root/usr/sbin/suexec) [Thu Jul 20 09:55:16.978176 2023] [http2:warn] [pid 3065] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive. [Thu Jul 20 09:55:16.978203 2023] [http2:warn] [pid 3065] AH02951: mod_ssl does not seem to be enabled [Thu Jul 20 09:55:16.978965 2023] [lbmethod_heartbeat:notice] [pid 3065] AH02282: No slotmem from mod_heartmonitor [Thu Jul 20 09:55:16.982948 2023] [mpm_prefork:notice] [pid 3065] AH00163: Apache/2.4.34 (Red Hat) configured -- resuming normal operations [Thu Jul 20 09:55:16.983018 2023] [core:notice] [pid 3065] AH00094: Command line: '/opt/rh/httpd24/root/usr/sbin/httpd -D FOREGROUND' [Thu Jul 20 11:09:00.374615 2023] [mpm_prefork:notice] [pid 3065] AH00170: caught SIGWINCH, shutting down gracefully [Thu Jul 20 11:09:01.488578 2023] [suexec:notice] [pid 3407] AH01232: suEXEC mechanism enabled (wrapper: /opt/rh/httpd24/root/usr/sbin/suexec) [Thu Jul 20 11:09:01.548511 2023] [http2:warn] [pid 3407] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive. [Thu Jul 20 11:09:01.548565 2023] [http2:warn] [pid 3407] AH02951: mod_ssl does not seem to be enabled [Thu Jul 20 11:09:01.549245 2023] [lbmethod_heartbeat:notice] [pid 3407] AH02282: No slotmem from mod_heartmonitor [Thu Jul 20 11:09:01.553601 2023] [mpm_prefork:notice] [pid 3407] AH00163: Apache/2.4.34 (Red Hat) configured -- resuming normal operations [Thu Jul 20 11:09:01.553662 2023] [core:notice] [pid 3407] AH00094: Command line: '/opt/rh/httpd24/root/usr/sbin/httpd -D FOREGROUND' [Thu Jul 20 12:09:10.674486 2023] [mpm_prefork:notice] [pid 3407] AH00170: caught SIGWINCH, shutting down gracefully [Thu Jul 20 12:09:11.777939 2023] [suexec:notice] [pid 3857] AH01232: suEXEC mechanism enabled (wrapper: /opt/rh/httpd24/root/usr/sbin/suexec) [Thu Jul 20 12:09:12.661045 2023] [http2:warn] [pid 3857] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive. [Thu Jul 20 12:09:12.661078 2023] [http2:warn] [pid 3857] AH02951: mod_ssl does not seem to be enabled [Thu Jul 20 12:09:12.661777 2023] [lbmethod_heartbeat:notice] [pid 3857] AH02282: No slotmem from mod_heartmonitor [Thu Jul 20 12:09:12.665420 2023] [mpm_prefork:notice] [pid 3857] AH00163: Apache/2.4.34 (Red Hat) configured -- resuming normal operations [Thu Jul 20 12:09:12.665466 2023] [core:notice] [pid 3857] AH00094: Command line: '/opt/rh/httpd24/root/usr/sbin/httpd -D FOREGROUND' [Thu Jul 20 12:23:08.061778 2023] [mpm_prefork:notice] [pid 3857] AH00170: caught SIGWINCH, shutting down gracefully [Thu Jul 20 12:23:09.174270 2023] [suexec:notice] [pid 4305] AH01232: suEXEC mechanism enabled (wrapper: /opt/rh/httpd24/root/usr/sbin/suexec) [Thu Jul 20 12:23:19.240009 2023] [http2:warn] [pid 4305] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive. [Thu Jul 20 12:23:19.240064 2023] [http2:warn] [pid 4305] AH02951: mod_ssl does not seem to be enabled [Thu Jul 20 12:23:19.240914 2023] [lbmethod_heartbeat:notice] [pid 4305] AH02282: No slotmem from mod_heartmonitor [Thu Jul 20 12:23:19.245229 2023] [mpm_prefork:notice] [pid 4305] AH00163: Apache/2.4.34 (Red Hat) configured -- resuming normal operations [Thu Jul 20 12:23:19.245270 2023] [core:notice] [pid 4305] AH00094: Command line: '/opt/rh/httpd24/root/usr/sbin/httpd -D FOREGROUND'

DekrimX commented 1 year ago

I am getting this when going to SERVERIP/install

Untitled

Normally this image should be shown

46498452-63db8780-c815-11e8-8455-da2ec75fee1d

DekrimX commented 1 year ago

Did you create and grant permissions in mysql for a hashtopolis user?

please check the images i provided

zyronix commented 1 year ago

Please dont use any install video online anymore since version 0.14.0 but use the installation instruction on the wiki. https://github.com/hashtopolis/server/wiki/Installation

All other sources are out dated. If you use those, please use version 0.13.1.

From 0.14.0 the installation method has changed. That is, the method of installation is using docker.

xbenyx commented 1 year ago

Did you create and grant permissions in mysql for a hashtopolis user?

please check the images i provided

As @zyronix said, better use Docker as installation and that way should be smooth

DekrimX commented 1 year ago

Okay I am using the docker in ubuntu to setup hashtopolis, hope this works out now. In the docker .env file what do I write on db_host, should I keep it as default

DekrimX commented 1 year ago

I think I have setup it correctly but now I am facing issue while login, I cannot login to the panel,

ALEART! An unknown error occured, when I use the default Login Username and Password i.e. Username: admin Password : hashtopolis

I think the installation is finished Untitled

DekrimX commented 1 year ago

I used the login detailed found on .env file of docker and now I am getting this error. Everytime one problem fixes another arise.

Please help me out with logging in. Do I use the server root password or the username and password set on .env file .

.env file data is as given bellow

`MYSQL_ROOT_PASS=hashtopolis MYSQL_DATABASE=hashtopolis MYSQL_USER=hashtopolis MYSQL_PASSWORD=hashtopolis

HASHTOPOLIS_ADMIN_USER=admin HASHTOPOLIS_ADMIN_PASSWORD=hashtopolis HASHTOPOLIS_DB_HOST=db

HASHTOPOLIS_APIV2_ENABLE=0 `

Untitled

DekrimX commented 1 year ago

UPDATE : I am able to login to ServerIP:8080 using the username: admin and password: hashtopolis but I am unable to login to ServerIP:4200 using the same username and password. What seems to be the issue here

xbenyx commented 1 year ago

In the installation document is a section talking about .env file. You need to enable HASTOPOLIS_APIV2_ENABLE = 1 as localhost:4200 is using the server API

zyronix commented 1 year ago

The 4200 interface is the new interface, which is currently very early development stage. I would not recommand using it. So please use the old ui via 8080 for now.