Page MenuHomePhabricator

COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'binary' error
Closed, ResolvedPublic

Description

i dont know why i'm getting this error when i run ./bin/storage upgrade :

EXCEPTION: (AphrontQueryException) #1253: COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'binary' at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:308]
arcanist(head=master, ref.master=d8182cf55d50), phabricator(head=master, ref.master=18340d9ceffe), phutil(head=master, ref.master=b6200342f224)
  #0 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:275]
  #1 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:181]
  #2 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
  #3 queryfx(AphrontMySQLiDatabaseConnection, string, string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:219]
  #4 PhabricatorStorageManagementAPI::applyPatchSQL(string) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:109]
  #5 PhabricatorStorageManagementUpgradeWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:396]
  #6 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:292]
  #7 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:171]

Event Timeline

ankitladhania1993 raised the priority of this task from to Needs Triage.
ankitladhania1993 triaged this task as High priority.
ankitladhania1993 updated the task description. (Show Details)

Can you run bin/storage adjust with the --trace flag and show me the output before it fails?

>>> [1] <connect>  
<<< [1] <connect> 1,173 us
>>> [2] <query> SELECT 1
<<< [2] <query> 187 us
>>> [3] <connect> 
<<< [3] <connect> 311 us
>>> [4] <query> SELECT 1
<<< [4] <query> 150 us
>>> [5] <connect> phabricator_meta_data
<<< [5] <connect> 756 us
Usage Exception: You have not initialized the database yet. You must initialize the database before you can adjust schemata. Run `storage upgrade` to initialize the database.

this is before i run storage upgrade

Ah, okay. Can you run storage upgrade with --trace instead?

D11928 is a possible fix for this issue but it sounds like you may actually be experiencing a different issue than I believed.

>>> [41] <query> CREATE TABLE `differential_customfieldstringindex` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `objectPHID` varbinary(64) NOT NULL,
  `indexKey` binary(12) NOT NULL,
  `indexValue` longtext CHARACTER SET `binary` COLLATE `utf8_general_ci` NOT NULL,
  PRIMARY KEY (`id`),
  KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`(64)),
  KEY `key_find` (`indexKey`,`indexValue`(64))
) ENGINE=InnoDB DEFAULT CHARSET=`binary` COLLATE=`binary`
<<< [41] <query> 180 us
[2015-03-02 15:52:01] EXCEPTION: (AphrontQueryException) #1253: COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'binary' at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:308]
arcanist(head=master, ref.master=d8182cf55d50), phabricator(head=master, ref.master=18340d9ceffe), phutil(head=master, ref.master=b6200342f224)
  #0 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:275]
  #1 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:181]
  #2 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
  #3 queryfx(AphrontMySQLiDatabaseConnection, string, string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:219]
  #4 PhabricatorStorageManagementAPI::applyPatchSQL(string) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:109]
  #5 PhabricatorStorageManagementUpgradeWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:396]
  #6 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:292]
  #7 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:171]

what should i do?

This is a problem with Phabricator, not your install. You need to wait for D11929 to land, update Phabricator with git pull, then try again.

@epriestley can you tell me when can i expect it to be resolved?

This task will update when the change lands. It needs to be reviewed first. It will probably happen within a few hours, but it's very early (8AM) on the west coast right now.

Let us know if that resolves the issue for you. Thanks for the report!

Yes. It resolved the issue.

Can phabricator be on raw ip address rather than a domain.

Yes, although we recommend using a domain.

is there any documentation regarding that for Apache. I'm familiar with Nginx not Apache so please bare with me