pyrus/Pyrus — Issue #89: Failed to list/discover a local hostname
Author: c9s
Created: 2012-01-24 20:01:03+00:00
State: open

Hi,

I have my own hostname defined in /etc/hosts, called pear_local, and is mapping to 127.0.0.1

But I can't discover this channel through PEAR neither Pyrus:

$ pyrus.phar channel-discover pear_local

Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at /Users/c9s/local
Discovery of channel pear_local successful

And failed when listing channels:

$ sudo pyrus.phar list-channels

Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at /Users/c9s/local
Unable to add all custom roles/tasks/commands: exception 'PEAR2\Pyrus\Channel\Exception' with message 'Primary server "pear_local" is not a valid channel server' in phar:///Users/c9s/bin/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ChannelFile/v1.php:301
Stack trace:
#0 phar:///Users/c9s/bin/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ChannelFile/v1.php(269): PEAR2\Pyrus\ChannelFile\v1->setName('pear_local')
#1 phar:///Users/c9s/bin/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ChannelRegistry/Sqlite3.php(312): PEAR2\Pyrus\ChannelFile\v1->__set('name', 'pear_local')
#2 phar:///Users/c9s/bin/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ChannelRegistry/Sqlite3.php(265): PEAR2\Pyrus\ChannelRegistry\Sqlite3->getChannelObject('pear_local')
#3 phar:///Users/c9s/bin/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ChannelRegistry/Base.php(240): PEAR2\Pyrus\ChannelRegistry\Sqlite3->get('pear_local')
#4 phar:///Users/c9s/bin/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/PluginRegistry.php(71): PEAR2\Pyrus\ChannelRegistry\Base->current()
#5 phar:///Users/c9s/bin/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.php(260): PEAR2\Pyrus\PluginRegistry->scan()
#6 /Users/c9s/bin/pyrus.phar(51): PEAR2\Pyrus\ScriptFrontend\Commands->run(Array)
#7 {main}
Listing channels [/Users/c9s/local]:
PEAR2\Pyrus\Channel\Exception: Primary server "pear_local" is not a valid channel server