Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: Unable to connect to database Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Tyler Warringto
Newbie
Newbie
Avatar

Joined: 06 March 2014
Location: United States
Online Status: Offline
Posts: 7
Posted: 06 March 2014 at 9:55am | IP Logged Quote Tyler Warringto

I'm sure it's something small and stupid that I've missed due to my lack of Linux experience, but I can't figure this out.

I'm going through the install and I'm on the third page which does the database connection. I enter the database information (it is a remote database, not locally stored) and when I click test it tells me "Failed to Connect" I can't find any logs that give me any information that could help me find the answer. I tested the database connection from the webmail server through the mysql commands and it works perfectly.

I found an old mostly illiterate post about something similar which mentioned odbc connectors. I downloaded new ones, as well as the old version recommended in that post and neither made a difference. The firewall is open for database connections which turned out to be the fix for that guys problem. I'd already opened my firewall though, and as I said I'm able to connect to the database through the command line.

Any hints on where to check next? Am I supposed to use any special syntax on the web install page, or should they all be the same as using mysql commands?

mysql -u username -p -h DatabaseServerFQDN
When you hit enter after that command it asks for password. I enter password and it logs me in then I'm able to list and connect to the correct database. On your webpage it should be the same info correct?
SQL Login: username
SQL Password: password
Database Name:dbname
Host: DatabaseServerFQDN
Back to Top View Tyler Warringto's Profile Search for other posts by Tyler Warringto
 
Tyler Warringto
Newbie
Newbie
Avatar

Joined: 06 March 2014
Location: United States
Online Status: Offline
Posts: 7
Posted: 06 March 2014 at 9:59am | IP Logged Quote Tyler Warringto

I also found this page which appears to be defunct information. The file referenced does not exist, nor can I find anything similar in other files.
http://www.afterlogic.com/wiki/WebMail_ASP.NET:_logging_as_the_main_troubleshooting_measure
Back to Top View Tyler Warringto's Profile Search for other posts by Tyler Warringto
 
Tyler Warringto
Newbie
Newbie
Avatar

Joined: 06 March 2014
Location: United States
Online Status: Offline
Posts: 7
Posted: 06 March 2014 at 10:02am | IP Logged Quote Tyler Warringto

Actually I just figured it out...It's SELinux. I set it to permissive and the database connection worked. Which gives me another problem. I need SELinux enabled on this server. What commands do I need to run for it to permit this traffic? I'm like a child dark maze when it comes to SELinux modifications.
Back to Top View Tyler Warringto's Profile Search for other posts by Tyler Warringto
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 06 March 2014 at 10:32pm | IP Logged Quote Igor

Quote:
What commands do I need to run for it to permit this traffic? I'm like a child dark maze when it comes to SELinux modifications.


I'm not a SELinux expert myself, but a quick check with Google provided a couple of hints which look useful to me:

http://serverfault.com/questions/240015/how-do-i-allow-mysql-connections-through-selinux

http://docs.fedoraproject.org/en-US/Fedora/13/html/Managing_Confined_Services/sect-Managing_Confined_Services-MySQL-Configuration_Examples.html

Quote:
I also found this page which appears to be defunct information. The file referenced does not exist, nor can I find anything similar in other files.
http://www.afterlogic.com/wiki/WebMail_ASP.NET:_logging_as_the_main_troubleshooting_measure


This page will only be relevant for ASP.NET version of WebMail Pro, which can only run on Windows. For PHP version, that would be this page.
Back to Top View Igor's Profile Search for other posts by Igor
 
Tyler Warringto
Newbie
Newbie
Avatar

Joined: 06 March 2014
Location: United States
Online Status: Offline
Posts: 7
Posted: 07 March 2014 at 7:52am | IP Logged Quote Tyler Warringto

Thanks!
Now I've encountered a new problem. I fat fingered the smtp port. Instead of typing 465, I did 456. I've fixed that, but every time I try to send a message I get this error in the debug logs.

[PHP] Error: fsockopen(): unable to connect to smtp.gmail.com:456 (Connection timed out)

I've run a search on every file for 456 to see if that setting was stuck somewhere, but the only place it comes up that isn't part of a different string is in the logs. Running searches for 465 and smtp.gmail.com show me that both are tied together as OutgoingMailPort.

In the admin panel I updated the database tables thinking maybe it was reading 456 in there somewhere, but that didn't help either.
Back to Top View Tyler Warringto's Profile Search for other posts by Tyler Warringto
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 07 March 2014 at 8:33am | IP Logged Quote Igor

In case of WebMail Lite, incoming/outgoing email parameters get saved to the account itself, and changing default settings won't update those. Since WebMail Lite doesn't support managing user accounts from AdminPanel, you can change those data from within the account itself, or directly in the database (awm_accounts database table, mail_out_port field).

Hope this helps!

--
Regards,
Igor, AfterLogic SUpport
Back to Top View Igor's Profile Search for other posts by Igor
 
Tyler Warringto
Newbie
Newbie
Avatar

Joined: 06 March 2014
Location: United States
Online Status: Offline
Posts: 7
Posted: 07 March 2014 at 8:44am | IP Logged Quote Tyler Warringto

That fixed it thanks.

BTW the selinux database connection setting worked, now I'm trying to find the setting for when it tries to connect to IMAP and probably SMTP after that. Once I made that selinux change the error changed from a db connection error to [PHP] Error: fsockopen(): unable to connect to ssl://imap.gmail.com:993 (Permission denied)

I hate selinux lol.
Back to Top View Tyler Warringto's Profile Search for other posts by Tyler Warringto
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide