Skip to content

Python3 Syslog TypeError #112

@mrcyberguy

Description

@mrcyberguy

sudo python3 restart_server.py

a bytes-like object is required, not 'str'
[*] 2022-01-03 13:55:39: Restarting Artillery Server...
Traceback (most recent call last):
File "restart_server.py", line 20, in
write_log("Restarting the Artillery Server process...",1)
File "/var/artillery/src/core.py", line 955, in write_log
syslog(alert, alerttype)
File "/var/artillery/src/core.py", line 911, in syslog
syslog_send(syslogmsg, host=remote_syslog, port=remote_port)
File "/var/artillery/src/core.py", line 901, in syslog_send
sock.sendto(data, (host, port))
TypeError: a bytes-like object is required, not 'str'

occurs after specifying a remote host for syslog and attempting to run restart_server.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions