Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Install Vanilla on an AWS VPC nstance connected to an AWS RDS MySQL database instance

I have unzip'd all the vanilla-core-2-0.18-8.zip file into /var/www/html on CentOS 6.3.
The database itself is on an RDS instance, I can connect to it manually using mysql, and operate on it.
When connecting browser, chrome, to host, the Version 2.0.18.8 Installer web page come up fine.
Entered following into text fields:
Database Host: AWS internal name for RDS host
Database Name: Name of Database I connect through using mysql
Database User: Database username I use through mysql
Database Password: Database password I use through mysql
After selecting Continue, this message comes out immediately:
The connection parameters you specified failed to open a connection to the database. The database reported the following error:
SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'odh-dev-dbfor-01.cb45tfna366n.us-west-2.rds.amazonaws.com' (13)

I then tried using localhost;unix_socket=/tmp/mysql5.sock for Database Host, and got a similar error.
The connection parameters you specified failed to open a connection to the database. The database reported the following error:
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql5.sock' (2)

I'm pretty sure the Security Groups are set up correctly since I can do it with mysql.

It is worth mentioning MySQL is not running on the VPC instance since it is not a database server, it is only a client. Tried starting it up to see if that would help, and it did not change the symptom.

So, what am I missing here. I've been scratching my head for a while now trying to figure this one out.

Thank you.

«1

Comments

  • This sounds like a problem specific to your host, AWS.

    When you say you can connect to it manually, is that through your VPC? Be sure to specify a port if needed.

    I would file a support ticket through Amazon, or look through their community support forums.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I connect manually through VPC. Tried changing Database Host to "odh-dev-dbfor-01.cb45tfna366n.us-west-2.rds.amazonaws.com:3306". Same symptom. Tried changing Database Host to "odh-dev-dbfor-01.cb45tfna366n.us-west-2.rds.amazonaws.com 3306". Same symptom.

    There is an entry in config-defaults.php for SmtpPort. I do not see one for MySQL Port. I also do not see a MySQL.php file in the vanilla tree structure.

    How would you recommend setting the port? Something like "$Configuration['Garden']['Email']['MySQLPort'] = '3306';"?

  • $Configuration['Database']['Port'] = 3306;
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Tried to set the Port Number. It did not help. I've seen a lot of discussion on the net about Failure to connect using Vanilla 2 compared to Vanilla 1.

    I am thinking about trying Vanilla 1 to see if that works.

    Here is a little more information for those interested in debugging this one. I have MySQL connectivity between the VPC instance and the RDS MySQL Server. It connects and operates on the database fine. I think the AWS side of this is working the way it should..

    Installing Vanilla version 2.0.18-8 the installation is just plopping the zip file into /var/www/html.

    There are some directory structures that need to be opened up "chmod -R 0777 /var/www/html/{cache,conf,uploads}".

    The first connection enters the Vanilla Setup mode, as it should. You enter the RDS hostname, MySQL Database Name, User Name, and Password, then select continue. It immediately issues the following error: "The connection parameters you specified failed to open a connection to the database. The database reported the following error:
    SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'".

    Using the same hostname, database username, and database password connects fine through MySQL.

    Has anyone else installed the Vanilla Forum 2.0.18-8 PHP package, and ran into a similar problem?

    Thank you.

  • Tried to set the Port Number. It did not help. I've seen a lot of discussion on the net about Failure to connect using Vanilla 2 compared to Vanilla 1.

    Rather than go to Vanilla 1 - it might be worth experimenting with the beta version 2.1b1 - just to see if you get the same error. If you don't get error then you might be able to decipher where to go next in fixing 2.0.18.8

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Tried 2.1b1 with same error: "The connection parameters you specified failed to open a connection to the database. The database reported the following error:
    SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'odh-dev-dbfor-01.cb45tfna366n.us-west-2.rds.amazonaws.com' (13)". MySQL connects OK to database on same instance.

    Has anyone else tried using Vanilla in the AWS environment?

  • peregrineperegrine MVP
    edited May 2013

    Perhaps something in your web server or os configuration -

    block remote connections from PHP scripts executed by web server.

    write a simple php script of your own not using vanilla and see if you can connect.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • chuckerchucker New
    edited May 2013

    Interesting. I created a small PHP script and got same error.
    <?php // Create connection $con=mysqli_connect("odh-dev-dbfor-01.cb45tfna366n.us-west-2.rds.amazonaws.com","ODHDEVDBFORDBA","xxxxxxxx","ODHDVFOR"); // Check connection if (mysqli_connect_errno($con)) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } // Close connection mysqli_close($con); ?>

    Thanks for reminding me to look elsewhere.

  • x00x00 MVP
    edited May 2013

    it is worth asking on their support forums. Ask them how to set up for PDO connection.

    You have to be able to connect to remote server in the first place.

    grep is your friend.

  • peregrineperegrine MVP
    edited May 2013

    @chucker
    Does SELinux permissons pertain to anything in your setup?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited May 2013

    @chucker - maybe this will solve it.

    error code (13) at the end of error message means “permission denied”,

    try from root

    setsebool -P httpd_can_network_connect=1

    http://www.crypt.gen.nz/selinux/disable_selinux.html

    http://wiki.centos.org/TipsAndTricks/SelinuxBooleans

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I installed extra packages, php-gd php-pear php-pecl-memcache php-xml and mod_ssl. Attached PHP script is more OO oriented. It connects successfully to the database when running it manually from a general user account. It also connects to the database from the browser and prints out the same properties of the object. Running Vanilla from the browser from the browser, it fails the same way with error 13.

  • peregrineperegrine MVP
    edited May 2013

    it fails the same way with error 13.

    permissions...

    you need to find out if the parameters sent and received are the same - same user, same password, same host, same port, etc. manual vs. vanilla

    did you try any of the above cent0s changes.

    maybe some support personnel on the other end can tell you what they see in the sqlerr logs or maybe yours give some info.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I completely disabled SELinux and it got a little farther. conf/config.php became greater than 0 in size before it failed with the following error: "Fatal error: Call to undefined method stdClass::Table() in /var/www/html/applications/dashboard/settings/structure.php on line 22"

  • peregrineperegrine MVP
    edited May 2013

    Can't you make it locally. clone and copy and then import the database over to whatever or wherever it needs to go.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Vanilla will be regularly updating the database. In the Amazon Remote Database Server arena, I would like to get it setup to the design. Line 22 in structure.php indicates it is creating a new Role table in the database. That should be an easy task. Could there be libraries that are still missing? Is there a list of all the packages that have to be installed for CentOS using Vanilla 2-0.18-8?

  • peregrineperegrine MVP
    edited May 2013

    Vanilla will be regularly updating the database.

    true. but....

    Your difficulty is in installation. My thought is creating vanilla in a different OS just to get the install done. (you might pull out less of your hair and get it done more quickly by downloading ubuntu onto a local machine and install), then clone and push to new place.
    Maybe creating installation remotely fails from timing or whatever.

    More debugging of things in different environments has probably been on running systems then the install process per se.

    Best I can offer.

    Good luck.

    let us know how and if you get it solved.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Whew, I spent about 3 days pulling hair out trying to get Vanilla to work on CentOS, then spent a few hours bringing up an Ubuntu AWS instance, installing Apache2, MySQL, PHP5, Java, and Vanilla. Vanilla came up fine and created many tables in the remote database. Thanks for the good tips Peregrine!!

  • awesome. glad you good it working.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.