Closed davidginn524 closed 5 years ago
Hello, it's really weird since it's connecting indeed. Did you try hosting mode? (http://doc.syspass.org/en/installing/hostingmode.html)
Regards
so with that, I tried root that has full access to the mariadb mysql and it errors out saying I don't have rights. However If I try the syspass user it will perform the loading screen as if it doing something for a few seconds. then give me "Internal Server Errorerror" telling me the user is able to access the sql
Hmm, is there any messages in syspass.log file? (Within config directory)
Caller 5: SP\Core\Plugin\PluginUtil\getEnabledPlugins 2018-10-23 18:05:58 - SQL : SELECT plugin_name FROM plugins WHERE BIN(plugin_enabled) = 1 2018-10-23 18:05:58 - Action: getResultsArray -- Description: Error while querying No es posible conectar con la BD (0) -- Details: SQL : SELECT plugin_name FROM plugins WHERE BIN(plugin_enabled) = 1 2018-10-23 18:09:33 - Exception: No es posible conectar con la BD - Compruebe los datos de conexión 2018-10-23 18:09:33 - #0 SP\Storage\DB->prepareQueryData() called at [/var/www/html/sysPass/inc/SP/Storage/DB.class.php:1$
2018-10-23 18:09:33 - Error while querying No es posible conectar con la BD (0) Caller 1: SP\Storage\DB\logDBException Caller 2: SP\Storage\DB\getResults Caller 3: SP\Storage\DB\getResultsArray Caller 4: SP\Mgmt\Plugins\Plugin\getEnabled Caller 5: SP\Core\Plugin\PluginUtil\getEnabledPlugins 2018-10-23 18:09:33 - SQL : SELECT plugin_name FROM plugins WHERE BIN(plugin_enabled) = 1 2018-10-23 18:09:33 - Action: getResultsArray -- Description: Error while querying No es posible conectar con la BD (0) -- Details: SQL : SELECT plugin_name FROM plugins WHERE BIN(plugin_enabled) = 1 2018-10-24 18:54:59 - Rollback 2018-10-24 18:55:05 - Rollback 2018-10-24 18:55:47 - Rollback 2018-10-24 19:00:02 - Rollback 2018-10-24 19:00:46 - Rollback 2018-10-24 19:01:00 - Rollback 2018-10-24 19:01:06 - Rollback 2018-10-24 19:03:46 - Rollback 2018-10-24 20:30:25 - Rollback 2018-10-24 20:59:37 - Exception: No es posible conectar con la BD - Compruebe los datos de conexión 2018-10-24 20:59:37 - #0 SP\Storage\DB->prepareQueryData() called at [/var/www/html/sysPass/inc/SP/Storage/DB.class.php:1$
2018-10-24 20:59:37 - Error while querying No es posible conectar con la BD (0) Caller 1: SP\Storage\DB\logDBException Caller 2: SP\Storage\DB\getResults Caller 3: SP\Storage\DB\getResultsArray Caller 4: SP\Mgmt\Plugins\Plugin\getEnabled Caller 5: SP\Core\Plugin\PluginUtil\getEnabledPlugins 2018-10-24 20:59:37 - SQL : SELECT plugin_name FROM plugins WHERE BIN(plugin_enabled) = 1 2018-10-24 20:59:37 - Action: getResultsArray -- Description: Error while querying No es posible conectar con la BD (0) -- Details: SQL : SELECT plugin_name FROM plugins WHERE BIN(plugin_enabled) = 1 2018-10-24 21:00:18 - Rollback 2018-10-24 21:00:31 - Rollback 2018-10-24 21:00:52 - Rollback 2018-10-24 21:01:05 - Rollback 2018-10-24 21:01:09 - Rollback 2018-10-24 21:25:57 - Action: Configuration -- Description: Update Configuration -- Details: 2018-10-24 21:25:58 - Action: Configuration -- Description: Update Configuration -- Details: Parameter : version Value : 211618061901 2018-10-24 21:26:36 - Action: Configuration -- Description: Update Configuration -- Details: 2018-10-24 21:26:37 - Action: Configuration -- Description: Update Configuration -- Details: Parameter : version Value : 211618061901
It seems a database connection error. Are you connecting to the Unix socket or TCP instead?
Honestly not sure, that is something I did not check. How would I check that? or configure that
It can be got from my.cnf file or mariadb.cnf
Alternatively, issuing netstat -tln | grep 3306
should display if the database port is listening.
Unix socket is used by default in most installations, so you can tell sysPass to use it instead by setting the path to it.
The socket path should be unix:/path/to/it
for the command you gave me tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
for both my.cnf and mariadb.cnf located /etc/mysql/ they include
!includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mariadb.conf.d/ and within those folders have other cnfs all which don't have anything that I see about the ports or unix
I did find a socket finally in /etc/mysql/mariadb.conf.d/50-server.cnf
socket = /var/run/mysqld/mysqld.sock
user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking
What did you want me to do with the sock? disable it with #?
nevermind. I have input "unix:/var/run/mysqld/mysqld.sock" for the database location and it still errors out "Internal Server Errorerror" I check the config log and it shows corresponding
2018-10-24 22:32:19 - Action: Configuration -- Description: Update Configuration -- Details: 2018-10-24 22:32:20 - Action: Configuration -- Description: Update Configuration -- Details: Parameter : version Value : 211618061901
Also thank you very much for your time on debugging this as I am at a loss. I might try this on ubuntu even though you don't have it listed for install.
Is that error showed up on the installation page or did it on login instead?
Also thank you very much for your time on debugging this as I am at a loss. I might try this on ubuntu even though you don't have it listed for install.
Your're welcome. Although Ubuntu is not listed, it should work because it 's a Debian based one.
Please, could you try out connecting through the mysql client?
I will take screenshots when i get home from work. The error that is in "" happen in a red popup box upon clicking submit
I can connect to that database using that user through the commandline of debian. I am able to drop the database and readd it. Will screenshot the permissions
Will also try centos since you have it listed
I am going to work on getting you those screenshots tonight however. In the meanwhile I might have discovered a bug. i setup a fresh install of debian 9.5 to install it and I get a server 500 error.
I took a look at the apache2 error.log and here are the details. i don't want to overwhelm you with stuff but i can create a seperate bug report if you'd like
[Thu Oct 25 14:49:09.488462 2018] [:error] [pid 792] [client 192.168.20.3:59548] PHP Fatal error: Uncaught Error: Call to undefined function mb_strlen() in /var/www/html/sysPass/inc/BaseFunctions.php:67\nStack trace:\n#0 /var/www/html/sysPass/inc/themes/material-blue/inc/Icons.class.php(46): __('A\\xC3\\xB1adir')\n#1 /var/www/html/sysPass/inc/SP/Core/UI/ThemeIconsBase.class.php(127): Theme\\Icons->setIcons()\n#2 /var/www/html/sysPass/inc/SP/Core/UI/Theme.class.php(129): SP\\Core\\UI\\ThemeIconsBase->__construct()\n#3 /var/www/html/sysPass/inc/SP/Core/UI/Theme.class.php(73): SP\\Core\\UI\\Theme->initIcons()\n#4 /var/www/html/sysPass/inc/SP/Core/DiFactory.class.php(128): SP\\Core\\UI\\Theme->__construct()\n#5 /var/www/html/sysPass/inc/SP/Core/Init.class.php(156): SP\\Core\\DiFactory::getTheme()\n#6 /var/www/html/sysPass/inc/Base.php(68): SP\\Core\\Init::start()\n#7 /var/www/html/sysPass/index.php(31): require('/var/www/html/s...')\n#8 {main}\n thrown in /var/www/html/sysPass/inc/BaseFunctions.php on line 67
No worries...
This error is related to a missing PHP module: mbstring (used for multi-byte character strings)
The one above happens when I have created a database "test" assigned a user with ALL permissions granted for the entire system. the one above is what happens when i entered "test1" into the database field which test1 does not exist. This tells me that the user syspass is using is able to connect and query to the database because it knows it doesn't exist. if it couldn't connect then it wouldn't know. below is my config but I have also tried 127.0.0.1 and localhost.
Hmm, the first one is most likely a PHP error during the request. Are you setting the first field as the sysPass user and not the database one?. The installer will create a database user by prefixing the filled in with 'sp_'.
Is there any log that you know of that I can investigate the "internal server errorerror"? maybe that would give us something? that makes sense that you would have something creating a db :)
All i have in the config log of syspass is
2018-10-25 21:39:36 - Action: Configuration -- Description: Update Configuration -- Details: 2018-10-25 21:39:37 - Action: Configuration -- Description: Update Configuration -- Details: Parameter : version Value : 211618061901
The web server log should point to a PHP error.
I am still continuing to debug. i shall get back to you. Thanks again for your time
Does this have to be put int /var/www/html? Reason I ask is I installed LAMP to try and work around the current issues I am having which installs PHPmyadmin, mariadb, apache etc. However the location for that install is /data/www/default/ and when i put it in there. The config doesn't like it. Is the config hard coded for that path?
Hello,
However the location for that install is /data/www/default/ and when i put it in there. The config doesn't like it. Is the config hard coded for that path?
No, it isn't hard coded, you can use any location for the root directory.
Regards
Thanks for closing sorry have lack of time. clearly not the problem of your program but thanks for helping anyway. Will eventually get it installed
No worries, just cleaning up some old issues.
Thanks for the feedback!
sysPass Version 2.1
Describe the question I have had many problems installing this. My first problem was related to this https://github.com/nuxsmin/sysPass/issues/256 It fixed the 500 error by enabling the php plugging I then had the install in a different language even though my locales was en_GB I reset my locales to en_US and that fixed it here https://github.com/nuxsmin/sysPass/issues/609
Now I am on the configuration screen and it won't connect to the database. I have tried the root user. I have added a password to the root user. I have tried granting all priveleges to another user "syspass" SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' SQLSTATE[HY000] [1698] Access denied for user 'syspass'@'localhost'
I know its connecting because if I change it from Localhost or 127.0.0.1 it says it cant connect. I also know if I create a database called "test" then enter that as the database on the configuration page it says "Please, enter a new database or delete the existing one". Which tells me it has the username and password correct/permissions because it can check to see if a database is even there.
I have restricted anonymous users and performed the mysql_secure_installation
Platform (please complete the following information): Running on ESXI 6.7
Additional context I have looked at the config logs. A lot of it is in a different language so I can't read it
I am honestly out of ideas.