phuselab / DANTE

DANTE (Dimensional ANnotation Tool for Emotions) is an emotional annotation tool to annotate any kind of video in terms of valence and arousal continuous dimensions.
http://phuselab.di.unimi.it
MIT License
9 stars 1 forks source link

Unable to change default password, sync videos, and add annotators #3

Closed himalimehta closed 3 years ago

himalimehta commented 3 years ago

Once I use admin:admin to log in, as suggested by the Installation instructions, I saw that I had the option to sync videos. After creating a new "video" folder in the "www" subfolder - the "video" folder includes two subfolders ("alpha", and "beta"). I placed 3 videos in the "alpha" subfolder and 3 videos in the "beta" subfolder to test it out. However, when I press the "Sync now" button, it doesn't return anything.

Similarly, after filling out the information to add a new annotator, there is no pulldown option for the "Group" which the annotator belongs to. For a trial, I had provided my name and my email to test it out, but there was no update on the page after clicking the "Add" button, so no annotator was added.

In addition to that, I changed the default password after logging in using the default admin:admin, but when I went to login again by using my new password, I got an error which says "Username or password is incorrect."

Due to this, I am not able to actually make use of the annotation tool despite finally being able to log in. How can these issues be fixed?

vcuculo commented 3 years ago

@himalimehta are you using DANTE updated to the last commit 1c6c05df6c2eed3110fa34ed21cff38fb8f9505b ? Did you install it in a clean environment, without prior installations ? Did you follow the Installation instructions ? Thanks!

himalimehta commented 3 years ago

Thank you for the reply. I followed the installation instructions and re-installed DANTE into a clean environment so that there are no prior installations. I was able to change my password after logging in with default admin:admin credentials, so now I am able to use my new password to log in.

I'm still not able to sync my videos (the paths are C:\wamp64\www\video\alpha and C:\wamp64\www\video\beta). For reference, I had to move each individual file from the DANTE folder inside the www file, to the www itself. I did this because if I kept the files inside the C:\wamp64\www\DANTE then the localhost was not able to connect to the login page. It only shows the login page if each individual file is moved to the www folder.

I am also still unable to add an annotator and unable to select the group for each annotator that I want to add. Do you have any suggestions for this?

vcuculo commented 3 years ago

@himalimehta

For reference, I had to move each individual file from the DANTE folder inside the www file, to the www itself. I did this because if I kept the files inside the C:\wamp64\www\DANTE then the localhost was not able to connect to the login page.

This could be due to a misconfiguration of your Apache (WAMP) installation, see this for reference. Anyway, if it currently works in the root folder I suggest you to keep it.

I'm still not able to sync my videos

Could you be more specific? What happens when you press the Sync now button? Did you refresh the page right after? Please attach the WAMP error.log file. You should be able to find it under C:\wamp64\logs\.

himalimehta commented 3 years ago

@vcuculo Thank you for linking me to the apache website - upon reading I realized that my httpd-vhosts.conf file and my Windows hosts file do not look entirely similar to the screenshot provided on that website. I have provided what's in these files for me, for better understanding:

httpd-vhosts.conf:

`# Virtual Hosts # <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot "${INSTALL_DIR}/www" <Directory "${INSTALL_DIR}/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local

# <VirtualHost *:80> ServerName dante DocumentRoot "c:/wamp64/www/dante-master" <Directory "c:/wamp64/www/dante-master"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local `

The website includes ServerAdmin, ServerAlias, ErrorLog, and CustomLog in this file, whereas my uncommented text does not include these four things. Additionally, could the "dante-master" seen in the DocumentRoot and Directory in my file cause potential issues? I ask this because as I mentioned previously, I have moved all files from my dante folder to the www file, so there is no dante-master folder in the www folder at all. All individual files are located inside the www folder.

Windows hosts file:

`# 127.0.0.1 localhost ::1 localhost

127.0.0.1 dante ::1 dante `

In hosts.conf I am missing two more lines, according to the screenshot provided for the Windows hosts file on the website you provided. Could this be the potential reason for any issues?

Could you be more specific? What happens when you press the Sync now button? Did you refresh the page right after?

After refreshing the page once I have clicked the "Sync now" button, there is no change on the page. Also, once I log in, the title of the page says "DANTE - Administration", followed by 3 sections: Sync database, Add new annotator, and Change admin password. Is this intended to be the homepage? I am not seeing any logos on this page, so I just wanted to make sure I'm not missing anything.

Please attach the WAMP error.log file. You should be able to find it under C:\wamp64\logs\.

There is no error.log file in my C:\wamp64\logs\ I have only the following .log files in my logs folder:

apache_error.log mariadb.log mysql.log php_error.log wamptrace.log

himalimehta commented 3 years ago

Just to follow up on my previous reply - I have found an error.log file in C:\Apache24\logs so I'm attaching it below, if that helps. This is due to the fact that I already had Apache installed prior to installing wamp64 on my system.

error.log

I'm also including the content in C:\Apache24\conf\extra\httpd-vhosts below:

`# Virtual Hosts # <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot "${INSTALL_DIR}/www" <Directory "${INSTALL_DIR}/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local

# <VirtualHost *:80> ServerName dante DocumentRoot "c:/wamp64/www/dante-master" <Directory "c:/wamp64/www/dante-master"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local `

Should I delete the original apache installation from my system since wamp64 already includes apache?

vcuculo commented 3 years ago

@himalimehta I reply inline

After refreshing the page once I have clicked the "Sync now" button, there is no change on the page. Also, once I log in, the title of the page says "DANTE - Administration", followed by 3 sections: Sync database, Add new annotator, and Change admin password. Is this intended to be the homepage? I am not seeing any logos on this page, so I just wanted to make sure I'm not missing anything.

That is the Administration page. The annotator homepage is different, and you will see one once you will be able to create it.

There is no error.log file in my C:\wamp64\logs\ I have only the following .log files in my logs folder:

The needed file is php_error.log. As you can see in line 499 it says:

[21-Jan-2021 17:09:00 UTC] PHP Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\wamp64\www\model.php on line 7

This means that the db_pass provided in the config.php file is not correct. Please check that you set a password for root user in your mysql server, and that the password is correct.

Should I delete the original apache installation from my system since wamp64 already includes apache?

If you still need the old Apache installation, you can keep it, otherwise remove it.

himalimehta commented 3 years ago

@vcuculo the password I have put for db_pass in config.php is the same password for the root user in my mysql server. Additionally, when I changed my password after logging into DANTE for the first time, I changed it to the same exact password provided in the config.php file and mysql server. I have double-checked and confirmed that the password for all three are the same. So I am unsure of why it is showing that line in php_error.log, and how it is related to syncing the videos and adding the annotators.

I am attaching the files again since they were updated again today:

apache_error.log mysql.log php_error.log

Also, do I need to change/add anything in my httpd-vhosts.conf and Windows hosts file? This is in reference to https://john-dugan.com/wamp-vhost-setup/ and I have attached screenshots of both my files below:

httpd-vhosts hosts

vcuculo commented 3 years ago

The php_error.log keeps saying that is not able to login to your mysql server. Is certainly a configuration problem. If you do the following from command line mysql -u root -h localhost -p are you able to login with that password? Also check that you don't have other instances of mysql server running.

About the vhost, if you are not using it, and the folder dante-master does not exists you don't need it. Comment or delete the related parts in the two files, and reboot the server.

P.S. Avoid uploading access.log file since it contains sensible data

himalimehta commented 3 years ago

@vcuculo yes, I am able to login to the mysql server with that same password:

mysql server_login

While downloading the wamp64 server, I had installed three different versions of PHP, as seen in the screenshot below. Could this be the issue? Additionally, I also have a php8 folder from separate installation in my C:\ drive.

phpinstallations

php8

I still am not able to see a pull-down option for "Group" under "Add new annotator":

addAnnotator

Also, where would you suggest the videos/alpha and videos/beta directories be created? Since all individual files from dante are located in C:\wamp64\www I have also placed a folder called videos in C:\wamp\www which contains the subfolders alpha and beta, each containing three videos for trial. Should I be doing something different in order for the videos to sync?

Updated files:

apache_error.log mysql.log php_error.log

vcuculo commented 3 years ago

From the log files it seems like you broke the configuration, and the screenshot confirms it (template not loaded).

[27-Jan-2021 14:33:56 UTC] The file C:/WINDOWS/system32/drivers/etc/hosts does not exists

and

; There may be a syntax error in httpd.conf.

I strongly suggest you to restart from a clean installation of your WAMP environment.

Also, where would you suggest the videos/alpha and videos/beta directories be created? Since all individual files from dante are located in C:\wamp64\www I have also placed a folder called videos in C:\wamp\www which contains the subfolders alpha and beta, each containing three videos for trial. Should I be doing something different in order for the videos to sync?

This is correct.

himalimehta commented 3 years ago

@vcuculo I commented out the dante localhost part from the hosts folder, and it wouldn't let me save to the original path, so I saved it in documents, deleted the original hosts file, and then moved the new hosts file from documents to where it originally belonged. So the hosts file is back to its original destination and doesn't include anything about dante.

I strongly suggest you to restart from a clean installation of your WAMP environment.

I don't think I understand this properly - should I re-install my WAMP server or the DANTE-master from github?

vcuculo commented 3 years ago

Yes, I was referring to your WAMP server, in order to regenerate the configuration files etc. Since the problems reside on your server configuration, solve them first, then I can follow you through DANTE installation.

himalimehta commented 3 years ago

@vcuculo hi, I have done what you have suggested. I uninstalled and then reinstalled WAMP server into a clean environment. I also uninstalled MySQL from my laptop and reinstalled into a clean environment, and created a new password for root user. I also did the same with the DANTE installation (deleted and installed into a clean environment in the www folder). The issue I now face is that after using admin:admin to log in, I see the following on the page:

login1 login2

If the MySQL80 on my system is running in Local Services, then the mysql service doesn't run on the wamp server, and vice-versa. Without clicking "Stop" for MySQL80 on Local Services, I am not able to start the mysql service on wamp, so therefore I am unable to view the login page. This is because they both are running on port 3306.

Edit**: As a solution, I stopped MySQL80 in Local Services, and then changed the port number from 3306 to 3308, since mysql in wamp server also uses port 3306. While this allows both MySQL80 and mysql service on wamp to run simultaneously, I am still not able to the options to sync videos, add annotators, or change my password.

I have confirmed that the password I put for db_pass in config.php works when I open cmd and type the following: mysql -u root -h localhost -p but still getting the 'root'@'localhost' error. Edit**: This is not working anymore. I am getting the same "Access denied for user 'root'@'localhost' (using password: YES)" when I try to run mysql through cmd. Not sure why this is still an issue, because the password has not been changed after the new MySQL80 installation at all.

Please see the error log files in wamp attached below for reference: apache_error.log mariadb.log mysql.log php_error.log

himalimehta commented 3 years ago

@vcuculo I was able to use mysql in cmd by using just mysql -u root -h localhost without providing a password, and it worked. I then got rid of my password in config.php and left it blank. After saving the updated config.php file, and going to http://localhost/login.php again, I was finally able to get it to work! I can now see the Admin page is much different visually which I could not see earlier. I was able to sync my videos and also add myself as annotator, as well as select which group the annotator belongs to (alpha or beta).

adminpage1 adminpage2

I will now close this issue, but I am opening up a new issue regarding the videos, since I'm not able to see or start the video after clicking the video title. Thank you for your help thus far. I appreciate it.