KissPeter / APIFuzzer

Fuzz test your application using your OpenAPI or Swagger API definition without coding
GNU General Public License v3.0
417 stars 65 forks source link

Failed to start API Fuzzer #20

Closed wuzzapcom closed 4 years ago

wuzzapcom commented 5 years ago

Tried to run APIFuzzer in both host system(macos) and in docker container(python:3.7-alpine).

Steps to reproduce:

git clone https://github.com/KissPeter/APIFuzzer.git
pip3 install -r APIFuzzer/requirements.txt
python3 fuzzer.py -s test/test_swagger_definition.json -u http://localhost:5000/ -r /tmp/reports/

Here is my stdout:

[INFO    ][fuzzer_target.__init__] Logger initialized
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 45, in run
    target = FuzzerTarget(name='target', base_url=self.base_url, report_dir=self.report_dir)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 29, in __init__
    self.logger.info('Logger initialized')
Message: 'Logger initialized'
Arguments: ()
[INFO    ][base._load_session] No session loaded
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 345, in start
    if self._load_session():
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 587, in _load_session
    self.logger.info('No session loaded')
Message: 'No session loaded'
Arguments: ()
[INFO    ][base._start_message] 
                 --------------------------------------------------
                 Starting fuzzing session
                 Target: FuzzerTarget
                 UI: WebInterface listening on 127.0.0.1:26000
                 Log: ./kittylogs/kitty_20190918-103124.log

                 Total possible mutation count: 1113920
                 --------------------------------------------------
                                 Happy hacking
                 --------------------------------------------------

--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 378, in start
    self._start_message()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 475, in _start_message
    self.model.num_mutations(),
Message: '\n                 --------------------------------------------------\n                 Starting fuzzing session\n                 Target: %s\n                 UI: %s\n                 Log: %s\n\n                 Total possible mutation count: %d\n                 --------------------------------------------------\n                                 Happy hacking\n                 --------------------------------------------------\n            '
Arguments: ('FuzzerTarget', 'WebInterface listening on 127.0.0.1:26000', './kittylogs/kitty_20190918-103124.log', 1113920)
[INFO    ][base.start] Performing environment test
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 384, in start
    self.logger.info('Performing environment test')
Message: 'Performing environment test'
Arguments: ()
[INFO    ][base._test_info] Current test: -1
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 66, in _run_sequence
    self._test_info()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 498, in _test_info
    self.logger.info('Current test: %s' % self.model.current_index())
Message: 'Current test: -1'
Arguments: ()
[INFO    ][server_fuzzer._transmit] Transmit place: params
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 53, in _transmit
    self.logger.info('Transmit place: {}'.format(place))
Message: 'Transmit place: params'
Arguments: ()
[INFO    ][server_fuzzer._transmit] Transmit place: headers
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 53, in _transmit
    self.logger.info('Transmit place: {}'.format(place))
Message: 'Transmit place: headers'
Arguments: ()
[INFO    ][server_fuzzer._transmit] Transmit place: data
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 53, in _transmit
    self.logger.info('Transmit place: {}'.format(place))
Message: 'Transmit place: data'
Arguments: ()
[INFO    ][server_fuzzer._transmit] Transmit place: path_variables
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 53, in _transmit
    self.logger.info('Transmit place: {}'.format(place))
Message: 'Transmit place: path_variables'
Arguments: ()
[INFO    ][fuzzer_target.transmit] URL part: 127.0.0.1:9770/api/task_manager/v2
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 65, in transmit
    self.logger.info('URL part: {}'.format(url_part))
Message: 'URL part: 127.0.0.1:9770/api/task_manager/v2'
Arguments: ()
[INFO    ][fuzzer_target.transmit] URL part: b'/queues'
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 65, in transmit
    self.logger.info('URL part: {}'.format(url_part))
Message: "URL part: b'/queues'"
Arguments: ()
[ERROR   ][server_fuzzer._transmit] Error in transmit: a bytes-like object is required, not 'str'
--- Logging error ---
Traceback (most recent call last):
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 66, in transmit
    _req_url.append(url_part.strip('/'))
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 62, in _transmit
    self.logger.error('Error in transmit: %s', e)
Message: 'Error in transmit: %s'
Arguments: (TypeError("a bytes-like object is required, not 'str'"),)
[INFO    ][server_fuzzer._test_environment] Environment test failed
--- Logging error ---
Traceback (most recent call last):
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 105, in _test_environment
    if self._run_sequence(sequence):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 66, in transmit
    _req_url.append(url_part.strip('/'))
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 385, in start
    self._test_environment()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 108, in _test_environment
    self.logger.info('Environment test failed')
Message: 'Environment test failed'
Arguments: ()
[INFO    ][server._start] should keep running? True
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 39, in _start
    self.logger.info('should keep running? %s' % self._keep_running())
Message: 'should keep running? True'
Arguments: ()
[INFO    ][base._test_info] Current test: 0
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 66, in _run_sequence
    self._test_info()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 498, in _test_info
    self.logger.info('Current test: %s' % self.model.current_index())
Message: 'Current test: 0'
Arguments: ()
[INFO    ][server_fuzzer._transmit] Transmit place: params
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 53, in _transmit
    self.logger.info('Transmit place: {}'.format(place))
Message: 'Transmit place: params'
Arguments: ()
[INFO    ][server_fuzzer._transmit] Transmit place: headers
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 53, in _transmit
    self.logger.info('Transmit place: {}'.format(place))
Message: 'Transmit place: headers'
Arguments: ()
[INFO    ][server_fuzzer._transmit] Transmit place: data
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 53, in _transmit
    self.logger.info('Transmit place: {}'.format(place))
Message: 'Transmit place: data'
Arguments: ()
[INFO    ][server_fuzzer._transmit] Transmit place: path_variables
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 53, in _transmit
    self.logger.info('Transmit place: {}'.format(place))
Message: 'Transmit place: path_variables'
Arguments: ()
[INFO    ][fuzzer_target.transmit] URL part: 127.0.0.1:9770/api/task_manager/v2
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 65, in transmit
    self.logger.info('URL part: {}'.format(url_part))
Message: 'URL part: 127.0.0.1:9770/api/task_manager/v2'
Arguments: ()
[INFO    ][fuzzer_target.transmit] URL part: b'/queues'
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 65, in transmit
    self.logger.info('URL part: {}'.format(url_part))
Message: "URL part: b'/queues'"
Arguments: ()
[ERROR   ][server_fuzzer._transmit] Error in transmit: a bytes-like object is required, not 'str'
--- Logging error ---
Traceback (most recent call last):
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 66, in transmit
    _req_url.append(url_part.strip('/'))
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 62, in _transmit
    self.logger.error('Error in transmit: %s', e)
Message: 'Error in transmit: %s'
Arguments: (TypeError("a bytes-like object is required, not 'str'"),)
[ERROR   ][server._start] Error occurred while fuzzing: TypeError("a bytes-like object is required, not 'str'")
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 66, in transmit
    _req_url.append(url_part.strip('/'))
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 45, in _start
    self.logger.error('Error occurred while fuzzing: %s', repr(e))
Message: 'Error occurred while fuzzing: %s'
Arguments: ('TypeError("a bytes-like object is required, not \'str\'")',)
[ERROR   ][server._start] Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 66, in transmit
    _req_url.append(url_part.strip('/'))
TypeError: a bytes-like object is required, not 'str'

--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 66, in transmit
    _req_url.append(url_part.strip('/'))
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 46, in _start
    self.logger.error(traceback.format_exc())
Message: 'Traceback (most recent call last):\n  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start\n    self._run_sequence(sequence)\n  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence\n    resp = self._transmit(node)\n  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit\n    return self.target.transmit(**payload)\n  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 66, in transmit\n    _req_url.append(url_part.strip(\'/\'))\nTypeError: a bytes-like object is required, not \'str\'\n'
Arguments: ()
[INFO    ][base._end_message] 
                         --------------------------------------------------
                         Finished fuzzing session
                         Target: FuzzerTarget

                         Tested 1 mutation
                         Failure count: 0
                         --------------------------------------------------

--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 48, in _start
    self._end_message()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 39, in _end_message
    super(OpenApiServerFuzzer, self)._end_message()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 493, in _end_message
    self.session_info.failure_count
Message: '\n                         --------------------------------------------------\n                         Finished fuzzing session\n                         Target: %s\n\n                         Tested %d mutation%s\n                         Failure count: %d\n                         --------------------------------------------------\n            '
Arguments: ('FuzzerTarget', 1, '', 0)
[INFO    ][server_fuzzer._end_message] Stop fuzzing session_info: {'start_time': 1568791885.3502212, 'start_index': 0, 'end_index': 1113919, 'current_index': 1, 'failure_count': 0, 'kitty_version': '0.7.4', 'data_model_hash': 3273593218446261471, 'test_list_str': '0-1113919'}
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 934, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 855, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 937, in emit
    self._connect_unixsocket(self.address)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py", line 866, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "fuzzer.py", line 117, in <module>
    prog.run()
  File "fuzzer.py", line 54, in run
    fuzzer.start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/base.py", line 391, in start
    self._start()
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 48, in _start
    self._end_message()
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 41, in _end_message
    self.logger.info('Stop fuzzing session_info: {}'.format(self.session_info.as_dict()))
Message: "Stop fuzzing session_info: {'start_time': 1568791885.3502212, 'start_index': 0, 'end_index': 1113919, 'current_index': 1, 'failure_count': 0, 'kitty_version': '0.7.4', 'data_model_hash': 3273593218446261471, 'test_list_str': '0-1113919'}"
Arguments: ()

Log from ./kittylogs:

[2019-09-18 10:33:07,480] [INFO] [fuzzer_target.__init__] -> Logger initialized
[2019-09-18 10:33:08,066] [INFO] [base._load_session] -> No session loaded
[2019-09-18 10:33:08,110] [INFO] [base._start_message] -> 
                 --------------------------------------------------
                 Starting fuzzing session
                 Target: FuzzerTarget
                 UI: WebInterface listening on 127.0.0.1:26000
                 Log: ./kittylogs/kitty_20190918-103307.log

                 Total possible mutation count: 1113920
                 --------------------------------------------------
                                 Happy hacking
                 --------------------------------------------------

[2019-09-18 10:33:08,111] [INFO] [base.start] -> Performing environment test
[2019-09-18 10:33:08,112] [INFO] [base._test_info] -> Current test: -1
[2019-09-18 10:33:08,113] [INFO] [server_fuzzer._transmit] -> Transmit place: params
[2019-09-18 10:33:08,114] [INFO] [server_fuzzer._transmit] -> Transmit place: headers
[2019-09-18 10:33:08,115] [INFO] [server_fuzzer._transmit] -> Transmit place: data
[2019-09-18 10:33:08,115] [INFO] [server_fuzzer._transmit] -> Transmit place: path_variables
[2019-09-18 10:33:08,116] [INFO] [fuzzer_target.transmit] -> URL part: 127.0.0.1:9770/api/task_manager/v2
[2019-09-18 10:33:08,116] [INFO] [fuzzer_target.transmit] -> URL part: b'/queues'
[2019-09-18 10:33:08,118] [ERROR] [server_fuzzer._transmit] -> Error in transmit: a bytes-like object is required, not 'str'
[2019-09-18 10:33:08,119] [INFO] [server_fuzzer._test_environment] -> Environment test failed
[2019-09-18 10:33:08,119] [INFO] [server._start] -> should keep running? True
[2019-09-18 10:33:08,123] [INFO] [base._test_info] -> Current test: 0
[2019-09-18 10:33:08,123] [INFO] [server_fuzzer._transmit] -> Transmit place: params
[2019-09-18 10:33:08,124] [INFO] [server_fuzzer._transmit] -> Transmit place: headers
[2019-09-18 10:33:08,124] [INFO] [server_fuzzer._transmit] -> Transmit place: data
[2019-09-18 10:33:08,125] [INFO] [server_fuzzer._transmit] -> Transmit place: path_variables
[2019-09-18 10:33:08,125] [INFO] [fuzzer_target.transmit] -> URL part: 127.0.0.1:9770/api/task_manager/v2
[2019-09-18 10:33:08,125] [INFO] [fuzzer_target.transmit] -> URL part: b'/queues'
[2019-09-18 10:33:08,127] [ERROR] [server_fuzzer._transmit] -> Error in transmit: a bytes-like object is required, not 'str'
[2019-09-18 10:33:08,127] [ERROR] [server._start] -> Error occurred while fuzzing: TypeError("a bytes-like object is required, not 'str'")
[2019-09-18 10:33:08,128] [ERROR] [server._start] -> Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 43, in _start
    self._run_sequence(sequence)
  File "/usr/local/lib/python3.7/site-packages/kitty/fuzzers/server.py", line 74, in _run_sequence
    resp = self._transmit(node)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/server_fuzzer.py", line 60, in _transmit
    return self.target.transmit(**payload)
  File "/Users/vlapatin/src/acronis/APIFuzzer/apifuzzer/fuzzer_target.py", line 66, in transmit
    _req_url.append(url_part.strip('/'))
TypeError: a bytes-like object is required, not 'str'

[2019-09-18 10:33:08,128] [INFO] [base._end_message] -> 
                         --------------------------------------------------
                         Finished fuzzing session
                         Target: FuzzerTarget

                         Tested 1 mutation
                         Failure count: 0
                         --------------------------------------------------

[2019-09-18 10:33:08,129] [INFO] [server_fuzzer._end_message] -> Stop fuzzing session_info: {'start_time': 1568791988.110522, 'start_index': 0, 'end_index': 1113919, 'current_index': 1, 'failure_count': 0, 'kitty_version': '0.7.4', 'data_model_hash': -194456617570993828, 'test_list_str': '0-1113919'}
KissPeter commented 5 years ago

Hi, Thanks for the report, I'm checking it. Come back to you shortly

lobax commented 4 years ago

I've got the same issue when running it in a docker container. The issue is that it is trying to log to use syslog to log to /dev/log, which doesn't exist in a docker container nor in OSX.

The following workaround works for me. Apply these changes to set_logger in apifuzzer/utils.py:

def set_logger(level='warning'):
    handler = logging.StreamHandler()
    if os.path.exists('/dev/null/'):
        handler = SysLogHandler(address='/dev/log', facility=SysLogHandler.LOG_LOCAL2)

Add import os in the top as well, and the logger will log to std out. The best approach is probably to have a file logger to fall back to though.

KissPeter commented 4 years ago

@wuzzapcom Please check if the fix by @lobax has resolved it. Thanks

wuzzapcom commented 4 years ago

@KissPeter the issue has been fixed @lobax thank you for patch, great job!