another 'cannot connect to mysql' issue

Issue #513 resolved
Rob created an issue

Hi Jsuto,

Encountering a setup issue the “cannot connect to mysql server” error when starting Piler in our evaluation instance.

No issues encountered during installation of build 884 and all services are up. I have re-reviewed setup steps and referred to other similar issues but the fix still eludes me.

It is closely similar to bitbucket issue# 239 but as noted below, piler.config appears setup correctly.

Please let me know where / what else I can check regarding this issue and thanks.

Environment: Running Centos 5 2.6.18-402.el5 /usr/local/sbin/piler -V piler 1.1.0, build 884, Janos SUTO sj@acts.hu Build Date: Thu Feb 26 09:47:48 PST 2015 ldd version: ldd (GNU libc) 2.5 gcc version: gcc version 4.1.2 20080704 (Red Hat 4.1.2-55) Configure command: ./configure --enable-memcached --localstatedir=/var --with- atabase=mysql

Maillog showing Piler shutdown & then started with error @ 20:31:06 Feb 26 20:28:24 piler piler[5079]: sending signal to child (pid: 5089) Feb 26 20:28:24 piler piler[5079]: piler has been terminated Feb 26 20:31:06 piler piler[5121]: cannot connect to mysql server Feb 26 20:31:06 piler piler[5121]: piler 1.1.0, build 884 starting Feb 26 20:31:06 piler piler[5124]: forked a child (pid: 5124)

My mysql related setups in the /usr/local/etc/piler.conf [root@piler etc]# grep mysql piler.conf mysql_connect_timeout=2 mysqldb=piler mysqluser=piler mysqlpwd=piler mysqlhost=127.0.0.1 mysqlport=3306 mysqlsocket=/var/run/mysqld/mysqld.sock

My mysql startup confirming default port and no errors 150227 09:22:35 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 150227 09:22:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 150227 9:22:39 [Note] Plugin 'FEDERATED' is disabled. 150227 9:22:39 InnoDB: Initializing buffer pool, size = 16.0M 150227 9:22:39 InnoDB: Completed initialization of buffer pool 150227 9:22:39 InnoDB: Started; log sequence number 0 4374733 150227 9:22:39 [Warning] 'user' entry 'root@localhost.localdomain' ignored in --skip-name-resolve mode. 150227 9:22:39 [Note] Event Scheduler: Loaded 0 events 150227 9:22:39 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.1.72-ius' socket: '/var/lib/mysql/mysql.sock' port: 3306 Distributed by The IUS Community Project

Comments (7)

  1. Janos SUTO repo owner

    Specify only mysqlsocket, and comment out both mysqlhost and mysqlport. Also make sure to fix a selinux stuff, execute "setsebool -P httpd_can_network_connect on"

  2. Rob reporter

    Thanks Jsuto for the quick reply.

    I removed the two mysql lines form piler.conf and set selinux to permissive level for testing -before fully committing. I don't recall reading I had to enable selinux in the installation but after setting selinux, i'm able to run the setseboot as you specified and it returns without error.

    I'm still getting the same 'cannot connect to mysql error' after rebooting. Do you agree that I should move away from centos 5 / mysql 5.1 to newer versions or different platform? I thought those would be very stable with minimal issues per docs.

    thanks

  3. Janos SUTO repo owner

    Check if you can connect to mysql with the specified mysql parameters. If they are correct, then piler should be able to start. Anyway extremeshok is right that centos 5 is way too old, I recommend centos 7 (or at least 6 if you don't want to systemd stuff).

  4. eXtremeSHOK

    Until centos 7.3 is released centos 7 is not considered stable.

    Also be advised that allot of repos have issues.

    Centos 6 will need custom compiled with newer libraries, otherwise you will run into 99% cpu load issues.

  5. Janos SUTO repo owner

    I assume the issue is fixed. If not, then raise the issue on the mailing list, since this issue is not a bug at all.

  6. Log in to comment