Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start master after added service with treq-20.9.0 #11

Open
edwin-wang opened this issue Nov 9, 2020 · 3 comments · May be fixed by #15
Open

Cannot start master after added service with treq-20.9.0 #11

edwin-wang opened this issue Nov 9, 2020 · 3 comments · May be fixed by #15
Assignees
Labels
bug Something isn't working

Comments

@edwin-wang
Copy link

master.cfg

ssp = reporters.SlackStatusPush(
    endpoint="https://hooks.slack.com/services/*******************************")
c['services'].append(ssp)

twistd.log

2020-11-09 22:30:38+0800 [-] Loading buildbot.tac...
2020-11-09 22:30:39+0800 [-] Loaded.
2020-11-09 22:30:39+0800 [-] twistd 20.3.0 (/usr/bin/python3.6 3.6.8) starting up.
2020-11-09 22:30:39+0800 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2020-11-09 22:30:39+0800 [-] Starting BuildMaster -- buildbot.version: 2.8.4
2020-11-09 22:30:39+0800 [-] Loading configuration from '/home/buildbot/master/master.cfg'
2020-11-09 22:30:39+0800 [-] Setting up database with URL 'sqlite:/state.sqlite'
2020-11-09 22:30:39+0800 [-] setting database journal mode to 'wal'
2020-11-09 22:30:39+0800 [-] adding 2 new services, removing 0
2020-11-09 22:30:39+0800 [-] while starting BuildMaster
        Traceback (most recent call last):
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
            result = g.send(result)
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 145, in getService
            yield instance.setServiceParent(parent)
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
            return _cancellableInlineCallbacks(gen)
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
            _inlineCallbacks(None, g, status)
        --- <exception caught here> ---
          File "/usr/local/lib/python3.6/site-packages/buildbot/master.py", line 302, in startService
            yield self.reconfigServiceWithBuildbotConfig(self.config)
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 49, in reconfigServiceWithBuildbotConfig
            yield svc.reconfigServiceWithBuildbotConfig(new_config)
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 498, in reconfigServiceWithBuildbotConfig
            yield defer.maybeDeferred(child.setServiceParent, self)
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 62, in setServiceParent
            yield self.parent.addService(self)
          File "/usr/local/lib/python3.6/site-packages/buildbot/reporters/http.py", line 50, in startService
            yield super().startService()
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 232, in startService
            yield self.configureService()
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 221, in reconfigServiceWithSibling
            **kwargs)
          File "/usr/local/lib/python3.6/site-packages/buildbot_slack/reporter.py", line 85, in reconfigService
            verify=self.verify,
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 145, in getService
            yield instance.setServiceParent(parent)
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
            result = g.send(result)
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 62, in setServiceParent
            yield self.parent.addService(self)
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/service.py", line 117, in addService
            return service.startService()
          File "/usr/local/lib/python3.6/site-packages/buildbot/util/httpclientservice.py", line 130, in startService
            classname=self.__class__.__name__))
        builtins.ImportError: HTTPClientService requires either txrequest or treq install. Users should call HTTPClientService.checkAvailable() during checkConfig() to properly alert the user.

2020-11-09 22:30:39+0800 [-] BuildMaster startup failed
2020-11-09 22:30:39+0800 [-] Initiating clean shutdown
2020-11-09 22:30:39+0800 [-] No running jobs, starting shutdown immediately
2020-11-09 22:30:39+0800 [-] Main loop terminated.
2020-11-09 22:30:39+0800 [-] Server Shut Down.
2020-11-09 22:30:39+0800 [-] Unhandled error in Deferred:
2020-11-09 22:30:39+0800 [-] Unhandled Error
        Traceback (most recent call last):
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 460, in callback
            self._startRunCallbacks(result)
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
            self._runCallbacks()
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 1475, in gotResult
            _inlineCallbacks(r, g, status)
        --- <exception caught here> ---
          File "/usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
            result = g.send(result)
          File "/usr/local/lib/python3.6/site-packages/buildbot/master.py", line 344, in stopService
            yield super().stopService()
        twisted.internet.defer.FirstError: FirstError[#0, [Failure instance: Traceback: <class 'twisted.internet.defer.FirstError'>: FirstError[#0, [Failure instance: Traceback: <class 'AttributeError'>: 'SlackStatusPush' object has no attribute '_buildCompleteConsumer'
        /usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py:1613:unwindGenerator
        /usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py:1529:_cancellableInlineCallbacks
        /usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py:1418:_inlineCallbacks
        /usr/local/lib/python3.6/site-packages/buildbot/util/service.py:99:stopService
        --- <exception caught here> ---
        /usr/local/lib64/python3.6/site-packages/twisted/internet/defer.py:151:maybeDeferred
        /usr/local/lib/python3.6/site-packages/buildbot/reporters/http.py:62:stopService
        ]]
        --- <exception caught here> ---
        /usr/local/lib/python3.6/site-packages/buildbot/util/service.py:102:stopService
        ]]
@rockwelln
Copy link
Owner

Hello @edwin-wang, I don't know how you installed this plugin but the setup.py specify the dependency to treq: treq (>=18.6)
You can of course install it in your environment with pip install treq>=18.6

@edwin-wang
Copy link
Author

Hi @rockwelln, I installed buildbot-slack with 'pip3 install buildbot-slack'. treq-20.9.0 has been installed with pip. Let me know you need more info. Thanks a lot!

# pip3 show treq
Name: treq
Version: 20.9.0
Summary: High-level Twisted HTTP Client API
Home-page: https://github.com/twisted/treq
Author: David Reid
Author-email: [email protected]
License: MIT/X
Location: /usr/local/lib/python3.6/site-packages
Requires: attrs, Twisted, requests, hyperlink, incremental, six
Required-by: buildbot-slack

@edwin-wang
Copy link
Author

edwin-wang commented Nov 10, 2020

After I removed treq-20.9.0 and installed treq==18.6.0, this issue disappeared. This issue might be introduced with upgrade of treq.

@edwin-wang edwin-wang changed the title Cannot start master after added service Cannot start master after added service with treq-20.9.0 Nov 10, 2020
@rockwelln rockwelln self-assigned this May 3, 2021
@rockwelln rockwelln linked a pull request May 3, 2021 that will close this issue
@rockwelln rockwelln added the bug Something isn't working label May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants