#622 getting weird traceback when running in a fresh git repository
Closed: Fixed Opened by ttomecek.

module-build-service-1.3.25-2.fc27.noarch

logs:

2017-08-02 16:02:55,347 - PoolThread-twisted.internet.reactor-0 - module_build_service - INFO - Found build=<ModuleBuild asd, id=1, stream=master, version=20170802140210, state 'wait', batch 0, state_reason None> from message
2017-08-02 16:02:55,350 - PoolThread-twisted.internet.reactor-0 - module_build_service - INFO - <ModuleBuild asd, id=1, stream=master, version=20170802140210, state 'failed', batch 0, state_reason 'Application was not able to create a URL adapter for request independent URL generation. You might be able to fix this by setting the SERVER_NAME config variable.'>, state 1->4
2017-08-02 16:02:55,351 - PoolThread-twisted.internet.reactor-0 - module_build_service - ERROR - Failed while handling MBSModule('2', 1, 1)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/module_build_service/scheduler/consumer.py", line 141, in consume
    self.process_message(session, msg)
  File "/usr/lib/python2.7/site-packages/module_build_service/scheduler/consumer.py", line 224, in process_message
    state_reason=str(e))
  File "/usr/lib/python2.7/site-packages/module_build_service/models.py", line 251, in transition
    msg=self.json(),  # Note the state is "init" here...
  File "/usr/lib/python2.7/site-packages/module_build_service/models.py", line 302, in json
    'state_url': get_url_for('module_build', id=self.id),
  File "/usr/lib/python2.7/site-packages/module_build_service/__init__.py", line 112, in get_url_for
    return url_for(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/flask/helpers.py", line 298, in url_for
    raise RuntimeError('Application was not able to create a URL '
RuntimeError: Application was not able to create a URL adapter for request independent URL generation. You might be able to fix this by setting the SERVER_NAME config variable.

more info:

$ cat asd.yaml
data:
  api:
    rpms: [nodejs, npm]
  components:
    rpms:
      http-parser: {rationale: Build and runtime dependency.}
      nodejs: {buildorder: 10, rationale: Runtime dependency.}
  dependencies:
    buildrequires: {base-runtime: f26, shared-userspace: f26}
    requires: {base-runtime: f26, shared-userspace: f26}
  description: ''
  license:
    module: [MIT]
  summary: ''
document: modulemd
version: 1
$ git log
commit 64fabb3e591e1d2e0672e15d6a9119a17f32934b (HEAD -> master)
Author: Tomas Tomecek <ttomecek@redhat.com>
Date:   Wed Aug 2 16:01:57 2017 +0200
    init
$ git remote -v | wc -l
0

Tried to add a dist-git-like remote but that didn't help.

@ttomecek, which command were you trying to run when you hit this?

just mbs-build local

@fivaldi, can you try to reproduce this?

You can workaround that by putting SERVER_NAME="localhost" in mbs config in /etc. Not sure why is this happening though.

Ah, I see I have this patch in epel7 and forgot to commit it:

http://jkaluza.fedorapeople.org/mbs-empty-server-name.patch

This should fix that.

Metadata Update from @fivaldi:
- Issue assigned to fivaldi

I verified that the patch fixes this issue. It is now a part of PR#644. Thanks, @jkaluza :thumbsup:

Metadata Update from @fivaldi:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/mbs/issues/622

Please continue any further discussion there.

Metadata