Solved Zabbix upgrade done wrong

Hi,

I upgraded /net-mgmt/zabbix32-server and /net-mgmt/zabbix32-frontend to /net-mgmt/zabbix34-server and /net-mgmt/zabbix34-frontend and when I login to the dashboard, I get the a screen full of error (see attached)
Code:
strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CWebUser::setSessionCookie() → strtotime() in include/classes/user/CWebUser.php:151]
date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardView->doAction() → calculateTime() → date() in include/func.inc.php:2600]
date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardView->doAction() → calculateTime() → date() in include/func.inc.php:2601]
mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardView->doAction() → calculateTime() → zbxDateToTime() → mktime() in include/func.inc.php:312]
date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardView->doAction() → calculateTime() → date() in include/func.inc.php:2635]
date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardView->doAction() → calculateTime() → date() in include/func.inc.php:2636]
date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → local_generateHeader() → CView->getOutput() → include() → date() in app/views/layout.htmlpage.header.php:46]
In my /usr/local/etc/php.ini file I have already set
Code:
date.timezone = Europe/London
Could anyone advise please?
 

Attachments

  • zabbix34.PNG
    zabbix34.PNG
    268.3 KB · Views: 506
It shouldn't be in /etc/, it's /usr/local/etc/php.ini.

I recently upgraded a client's Zabbix from 2.2 to 3.4. The conversion took a bit of time (there's 5 years worth of history data in the database) but other than that it all was exceedingly easy. I was expecting at least some hiccups but it all worked flawlessly.
 
Is it in the "Date" section?

Code:
[Date]
; Defines the default timezone used by the date functions
date.timezone = Europe/Amsterdam

And did you restart Apache after making that change? Any errors in /var/log/httpd-error.log?
 
Now that am login, I have no data on any on my dashboard.
When I try to view the charts, I get
Code:
file_get_contents(http://localhost:9200/uint/values/_search): failed to open stream: Connection refused [charts.php:120 → CView->render() → include() → CScreenChart->get() → get_min_itemclock_by_graphid() → CHistoryManager->getMinClock() → CHistoryManager->getMinClockFromElasticsearch() → CElasticsearchHelper::query() → CElasticsearchHelper::request() → file_get_contents() in include/classes/helpers/CElasticsearchHelper.php:57]
Elasticsearch error: failed to parse JSON.
Does anyone has any idea what this mean?
 
Remove these from zabbix.conf.php if you're not using ElasticSearch as a backend:
Code:
// Elasticsearch url (can be string if same url is used for all types).
$HISTORY['url']   = [
                'uint' => 'http://localhost:9200',
                'text' => 'http://localhost:9200'
];
// Value types stored in Elasticsearch.
$HISTORY['types'] = ['uint', 'text'];

Make sure you copy your database settings correctly too.
 
Back
Top