XF 1.4 Error upgrading 1.4.5 from CLI

giorgino

Well-known member
Upgrading one of our board I reported this weird error...

Code:
An exception occurred: Memcache::get(): php_network_getaddresses: getaddrinfo failed: Name or service not known in Zend/Cache/Backend/Memcached.php on line 180
#0 [internal function]: XenForo_Application::handlePhpError(2, 'Memcache::get()...', '/home/condpro/p...', 180, Array)
#1 Zend/Cache/Backend/Memcached.php(180): Memcache->get('cpro_xfdata_opt...')
#2 Zend/Cache/Core.php(303): Zend_Cache_Backend_Memcached->load('cpro_xfdata_opt...', false)
#3 XenForo/Model/DataRegistry.php(28): Zend_Cache_Core->load('data_options')
#4 XenForo/Application.php(772): XenForo_Model_DataRegistry->get('options')
#5 [internal function]: XenForo_Application->loadOptions()
#6 XenForo/Application.php(970): call_user_func_array(Array, Array)
#7 XenForo/Application.php(1001): XenForo_Application->lazyLoad('options', NULL)
#8 XenForo/Model/User.php(961): XenForo_Application::get('options')
#9 XenForo/Visitor.php(427): XenForo_Model_User->getVisitingGuestUser()
#10 XenForo/Visitor.php(83): XenForo_Visitor::setup(0)
#11 XenForo/Visitor.php(111): XenForo_Visitor::getInstance()
#12 XenForo/Install/Model/Upgrade.php(14): XenForo_Visitor::getUserId()
#13 XenForo/Install/run-upgrade.php(155): XenForo_Install_Model_Upgrade->insertUpgradeLog(1040570)
#14 {main}

It seem related to Memcache, but the cache configuration it's the same for all our boards.

Can someone make me in the right direction?
This is my conf

Code:
<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = '*************';
$config['db']['password'] = '**************';
$config['db']['dbname'] = '*************';


#$config['superAdmins'] = '1';
### SuperAdmins Configuration
$config['superAdmins'] = '*****';

### Debug Mode
// $config['debug'] = true;
// ini_set('display_errors', true);

### Debug Mode per singolo IP
// if($_SERVER['REMOTE_ADDR'] == '127.0.0.1'){$config['debug'] = true;}

### Scollega i listener degli addon (credo si usi per far si che gli addon
### non carichino nulla in caso di problemi di accesso nell'ACP
// $config['enableListeners'] = false;

### Attivazione Sistema e-mail
// $config['enableMail'] = false;

### Configurazione Cache (Abilitare dopo la migrazione levando i // )
# Frontend
//$config['cache']['enabled'] = true;
//$config['cache']['frontend'] = 'Core';
//$config['cache']['frontendOptions']['cache_id_prefix'] = 'prop_xf_';

# Backend (Abilitare dopo la migrazione levando i // )
//$config['cache']['cacheSessions'] = true;
# $config['cache']['backend'] = 'Apc';

### MaxCDN Configuration (Abilitare dopo la migrazione levando i // )
//$config['externalDataUrl'] = 'http://cdn.condominiopro.it/data';
//$config['javaScriptUrl'] = 'http://cdn.condominiopro.it/js';

# modificare ACP -> Aspetto -> Proprieta di stile -> Generali -> percorso alle immagini
# http://cdn.propit.it/styles/condominiopro
# era styles/propit

//$config['enableListeners'] = false;

### Configurazione Cache
## frontend
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
    'caching'                  => true,
    'automatic_serialization'  => true,
    'lifetime'                  => 1800,
    'cache_id_prefix'          => 'cpro_xf'
);
#backend
#Memcached
$config['cache']['backend']='Memcached';
$config['cache']['backendOptions']=array(
      'compression'=>false,
      'servers' => array(
              array(
                  'host'=>'localhost',
                  'port'=>11211,
              )
        )
);
$config['cache']['cacheSessions'] = true;
 
That appears to ultimately be a DNS issue. It's coming from within PHP. I'm not sure why "localhost" is failing but it's possible that the CLI PHP is loading different things to PHP as configured with your web server. You could try using 127.0.0.1 as your host for memcached which might make a difference.
 
Back
Top Bottom