Website error upon logon and stats not updating.

Issue #1018 closed
Jim Keating created an issue

I followed the instructions here: http://www.mailpiler.org/wiki/current:installation
And used the post-install manual instructions.
Piler an Sphinx are running OK. I am using a MySQL database all on a Centos 7 VM.
No stats or emails showing on the website. (Server stats do show.)
I know that email is being archived as I've done a tcpdump and our Exchange Piler queue is continually sending the messages to Piler.
I've spend all week going over all sorts of articles and troubleshooting and I'm stumped.
Could this be a problem with the build or something that I'm missing?

The other problem I have is when running the pilerexport program I get an error: error: cannot connect to mysql server
The piler.key is located here: /usr/local/etc/piler/piler.key

Comments (15)

  1. Jim Keating reporter

    I get the error shown in the linked file. If I hit the back arrow I get to the website and everything works fine from there. I had one of our programmers look over the problem for a couple of hours yesterday and he could not find the problem. I've tried a lot of different web configs for Apache. Thanks, Jim

  2. Jim Keating reporter

    As shown in the piler2.jpg I can get all around on the website but it doesn't show anything but the server stats. Thanks, Jim

  3. Janos SUTO repo owner

    It’s ok, don’t worry about the assignment. Anyway, finally someone who tries at least.

    The tcpdump output doesn’t show if piler has actually archived those messages. So checkout /var/log/maillog on piler host, and check for any errors. You should see lines with status=archived.

    The pilerexport issue also indicates some problem. It could be either the mysql password is not set properly in piler.conf, or the mysql socket should be fixed. Run pilerconf, and verify that both are correct.

  4. Jim Keating reporter

    Janos, thanks so much for your insights. I had to change the location path in the piler.conf for mysqld.sock from mysqlsocket=/var/run/mysqld/mysqld.sock to: mysqlsocket=/var/lib/mysql/mysql.sock.

    All the email for last week, which was about 27K email messages came in and the stats and email did get processed. Apparently all the email messages were in a queue somewhere on the VM waiting because they were not archived into the MySQL database yet. (I’m very happy that they were still there.) Also, I tried the pilerexport command and it works great now.

    The last item that is not working is the search page on the web interface. The searchd service is running fine with no errors that I can see. I haven’t found a seachd.log so I’m just guessing at why we’re not able to search from the webpage. Would you have a suggestion where I could find that information? Or, where would I add logging to the sphinx product? Oh wait, I see that all of the index files in /var/piler/sphinx/ are only 1K or 0K in size. This looks like a problem. If you could point me in the right direction I’d sure appreciate your help. Thanks again, Jim

  5. Janos SUTO repo owner

    When piler processes a message, it extracts its textual stuff, and puts it to sph_index table. If the sphinx index files are small (few kB only), then you might have several entries in sph_index table. If so, then run the delta indexer (see crontab -l -u piler) as use piler (and not root). This should process the sph_index table, empty its content, and write the dailydelta1 and delta1 files.

    Also make sure that mysql has enough resources allocated, see “What are the recommended mysql settings?“ in the FAQ: http://www.mailpiler.org/wiki/faq

  6. Jim Keating reporter

    Janos, Thanks that fixed the search. I had to edit the paths on the crontab job as they were not an exact match to the path on the Centos 7 VM. That about does it…except one small issue with the website. After successfully logging onto the website I get the error shown in the new attached .jpg file. The index.php is showing the following double path as shown…which should be http://piler.dc.pud

    <div id="logincontainer" class="container">
    <!-- <div id="logo-lg">NEW_SITE_URL</div> -->
    <!-- <div id="logo-lg"><http://piler.dc.pudpiler.dc.pud/</div>> -->
    <div id="logo-lg"><img src="http://piler.dc.pudpiler.dc.pud/view/theme/default/assets/images/archive-logo-lg.png" alt="Archive Logo Image" title="Login" /></div>

    I took out any reference to NEW_SITE_URL in both the config-site.php and the config.php which didn’t fix the problem. I can’t seem to find where the double path DNS entry is coming from. I’m attaching both config files. Any thoughts on this issue would be appreciated. Thanks much, JK

  7. Janos SUTO repo owner

    The SITE_URL parameter should have the trailing slash. I think it should fix the problem. Also you should not touch config.php as it contains the defaults only. When you upgrade you may overwrite it. So all site specific stuff should go to config-site.php.

  8. Jim Keating reporter

    Janos, thank again for your help. You may go ahead and close this case. The website is working great now. As long as I have a copy of the config-site.php in the web folder with the config.php it works correctly.

    (I do have a backup copy of the config-site.php in the /var/local/etc/piler folder as a backup.)

    Cheers! JK

  9. Log in to comment