The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > BSD
.
google unix.com



BSD BSD, sometimes called Berkeley Unix, is a Unix operating system developed by the Computer Systems Research Group of the UC Berkeley.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
TR squeeze oddity bdmeyersc UNIX for Dummies Questions & Answers 3 05-03-2008 10:41 PM
AIX SAN configuration problems/oddity praxis22 AIX 1 06-27-2007 04:47 PM
VSFTP oddity Spetnik UNIX for Dummies Questions & Answers 7 04-28-2004 02:58 PM
Su Password Oddity jacobsa UNIX for Dummies Questions & Answers 4 05-30-2002 07:50 AM
Textual oddity Jubba UNIX for Dummies Questions & Answers 3 03-25-2002 12:55 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-02-2008
mrfr0g mrfr0g is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 8
Cron Oddity

Our webserver is running FreeBSD, for the last few days we have been having an issue with our cronjobs/mysql server.

Specifically we have jobs that execute php scripts to do various things to the website. When running these php scripts manually, via external browser, or lynx on the server, they run as expected, no issues. When running via cron, they experience connectivity issues to the mysql server. Users get denied to tables, or the connection doesn't get created. As you can imagine this has caused all kinds of havoc.

The question is, has anyone experienced this type of error before?

Why is it only on Cron that this happens?

Any way to fix this?

Any help you can give is most appreciated.
  #2 (permalink)  
Old 09-03-2008
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,322
You can help yourself searching in the forum's base on how to troubleshoot cron jobs that aren't working, but here are my two cents : redirect the output of the command in a file and see what happens. Also, I've fixed such issues in FreeBSD 5.4 by restarting the cron service.
  #3 (permalink)  
Old 09-03-2008
mrfr0g mrfr0g is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 8
Tried to restart Cron, that didn't seem to solve the problem. I did try a search through the forum before posting, but didn't find anything specific to my issue. This is the error message I receive when trying to connect to mysql,

Could Not connect to Database on host:
localhost
Can't connect to local MySQL server through socket '/tmp/mysql.sock'

The server is running, and I am able to connect to it via mysql command line, the website, and phpmyadmin. It only fails when cron tries to access it
  #4 (permalink)  
Old 09-03-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
check /etc/my.cnf for following:

Code:
[mysqld]
.
.
.
bind-address = 127.0.0.1
port=3306
  #5 (permalink)  
Old 09-03-2008
mrfr0g mrfr0g is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 8
It is missing, both,

bind-address = 127.0.0.1
port=3306

Should they be added in?
  #6 (permalink)  
Old 09-03-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
This make mysql listen on this port at this address.

Depending on how your script connects this may be needed.
  #7 (permalink)  
Old 09-03-2008
mrfr0g mrfr0g is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 8
Thank you for the suggestion. Unfortunately that didn't solve the issue.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0