Bug 1005765 - [abrt] fedmsg-0.6.8-4.fc19: core.py:84:__init__:KeyError: 'relay_inbound'
[abrt] fedmsg-0.6.8-4.fc19: core.py:84:__init__:KeyError: 'relay_inbound'
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: fedmsg (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ralph Bean
Fedora Extras Quality Assurance
abrt_hash:1416cba0aca45ad3850e92a9551...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-09 07:07 EDT by rune
Modified: 2013-09-10 08:40 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-10 08:40:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (2.45 KB, text/plain)
2013-09-09 07:07 EDT, rune
no flags Details
File: environ (4.05 KB, text/plain)
2013-09-09 07:07 EDT, rune
no flags Details

  None (edit)
Description rune 2013-09-09 07:07:24 EDT
Description of problem:
Error occurred by running the command: fedmsg-logger --message="This is a message."

Traceback (most recent call last):
  File "/usr/bin/fedmsg-logger", line 9, in <module>
    load_entry_point('fedmsg==0.6.8', 'console_scripts', 'fedmsg-logger')()
  File "/usr/lib/python2.7/site-packages/fedmsg/commands/logger.py", line 115, in logger
    return command.execute()
  File "/usr/lib/python2.7/site-packages/fedmsg/commands/__init__.py", line 96, in execute
    return self.run()
  File "/usr/lib/python2.7/site-packages/fedmsg/commands/logger.py", line 103, in run
    fedmsg.init(**self.config)
  File "/usr/lib/python2.7/site-packages/fedmsg/__init__.py", line 59, in init
    __local.__context = fedmsg.core.FedMsgContext(**config)
  File "/usr/lib/python2.7/site-packages/fedmsg/core.py", line 84, in __init__
    config['endpoints'][name] = config[name]
KeyError: 'relay_inbound'

Version-Release number of selected component:
fedmsg-0.6.8-4.fc19

Additional info:
reporter:       libreport-2.1.6
cmdline:        /usr/bin/python /usr/bin/fedmsg-logger '--message=This is a message.'
executable:     /usr/bin/fedmsg-logger
kernel:         3.10.9-200.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            500

Truncated backtrace:
core.py:84:__init__:KeyError: 'relay_inbound'

Traceback (most recent call last):
  File "/usr/bin/fedmsg-logger", line 9, in <module>
    load_entry_point('fedmsg==0.6.8', 'console_scripts', 'fedmsg-logger')()
  File "/usr/lib/python2.7/site-packages/fedmsg/commands/logger.py", line 115, in logger
    return command.execute()
  File "/usr/lib/python2.7/site-packages/fedmsg/commands/__init__.py", line 96, in execute
    return self.run()
  File "/usr/lib/python2.7/site-packages/fedmsg/commands/logger.py", line 103, in run
    fedmsg.init(**self.config)
  File "/usr/lib/python2.7/site-packages/fedmsg/__init__.py", line 59, in init
    __local.__context = fedmsg.core.FedMsgContext(**config)
  File "/usr/lib/python2.7/site-packages/fedmsg/core.py", line 84, in __init__
    config['endpoints'][name] = config[name]
KeyError: 'relay_inbound'

Local variables in innermost frame:
self: <fedmsg.core.FedMsgContext object at 0x1ee5450>
config: {'zmq_strict': False, 'topic': 'log', 'zmq_enabled': True, 'io_threads': 1, 'crl_location': 'https://fedoraproject.org/fedmsg/crl.pem', 'print_config': False, 'zmq_linger': 1000, 'routing_policy': {'org.fedoraproject.prod.announce.announcement': ['announce-lockbox.phx2.fedoraproject.org']}, 'ssldir': '/etc/pki/fedmsg', 'zmq_tcp_keepalive_cnt': 3, 'environment': 'dev', 'cert_prefix': 'shell', 'zmq_tcp_keepalive_intvl': 5, 'topic_prefix': 'org.fedoraproject', 'zmq_tcp_keepalive': 1, 'ca_cert_cache_expiry': 0, 'timeout': 2, 'ca_cert_cache': '/var/run/fedmsg/ca.crt', 'sign_messages': False, 'zmq_tcp_keepalive_idle': 60, 'config_filename': None, 'active': True, 'topic_prefix_re': 'org\\.fedoraproject\\.(dev|stg|prod)', 'ca_cert_location': 'https://fedoraproject.org/fedmsg/ca.crt', 'modname': 'logger', 'high_water_mark': 0, 'logging': {'loggers': {'fedmsg': {'handlers': ['console'], 'propagate': False, 'level': 'INFO'}, 'moksha': {'handlers': ['console'], 'propagate': False, 'level': 'INFO'}}, 'version': 1, 'handlers': {'console': {'formatter': 'bare', 'class': 'logging.StreamHandler', 'stream': 'ext://sys.stdout', 'level': 'INFO'}}, 'formatters': {'bare': {'format': '%(message)s'}}}, 'name': 'relay_inbound', 'json_input': False, 'validate_signatures': False, 'certnames': {}, 'logger_message': 'This is a message.', 'post_init_sleep': 0.2, 'routing_nitpicky': False, 'endpoints': {'fedora-infrastructure': ['tcp://hub.fedoraproject.org:9940']}, 'crl_cache_expiry': 10, 'crl_cache': '/var/run/fedmsg/crl.pem'}
name: 'relay_inbound'
method: 'connect'
Comment 1 rune 2013-09-09 07:07:28 EDT
Created attachment 795578 [details]
File: backtrace
Comment 2 rune 2013-09-09 07:07:32 EDT
Created attachment 795579 [details]
File: environ
Comment 3 Ralph Bean 2013-09-09 09:47:56 EDT
Hi!  Arguably, this is the correct behavior.  fedmsg is not yet configured to have a place to send messages to.

If you want to try it out, can you "yum install fedmsg-relay" and tell me if that works?
Comment 4 rune 2013-09-10 01:43:13 EDT
It no longer does a traceback after I installed fedmsg-relay.  I don't see anything else happening either, but I guess that's a configuration issue.
Comment 5 Ralph Bean 2013-09-10 07:53:18 EDT
Cool.  Try this: open 3 terminals.

In the first, run "fedmsg-relay" with no options.  This runs the relay daemon in the foreground.

In the second, run "fedmsg-tail --really-pretty".  This will connect to and listen to the relay daemon as well as any other endpoints defined in /etc/fedmsg.d/

In the third, run "echo hai there | fedmsg-logger".  This will take your message and send it to the fedmsg-relay which will in turn send it to fedmsg-tail.  It should print out in terminal #2.
Comment 6 rune 2013-09-10 08:20:44 EDT
That does work, including desktop notifications, thanks Ralph.  I guess fedmsg-relay wasn't installed and enabled because the OS wasn't a clean install, but an upgrade.

Note You need to log in before you can comment on or make changes to this bug.