davidfungf
(Davidfungf)
January 25, 2021, 3:04pm
1
When I enable “TCP Raw Output” of the data stream, it returned the below error. Any idea? Thanks.
Output disabled (triggered 4 minutes ago)
The output with the id 600edc46b9289c40f5d09775 in stream “pfsense” (id: 600bb0eeba83a338cf77b536) has been disabled for 30seconds because there were 6 failures. (Node: 940d99f8-5a7c-4f43-b60f-e61f4b032082 , Fault threshold: 5 )
davidfungf
(Davidfungf)
January 25, 2021, 4:42pm
2
I figure out the TCP communication was established. The issued was caused by my python code to receive the GELF output. Here is my python code.
import sys
if sys.version_info[0] < 3:
# python 2 import
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
else:
# python 3 import
from http.server import BaseHTTPRequestHandler, HTTPServer
class BaseServer(BaseHTTPRequestHandler):
def _set_headers(self):
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
def do_GET(self):
self._set_headers()
self.wfile.write("<html><body><p>hello, world!</p></body></html>"
.encode('utf-8'))
def do_HEAD(self):
self._set_headers()
def do_POST(self):
content_length = int(self.headers['Content-Length'])
post_data = self.rfile.read(content_length)
self._set_headers()
self.wfile.write("<html><body><p>POST!</p><p>%s</p></body></html>"
.encode('utf-8') % post_data)
def run(server_class=HTTPServer, handler_class=BaseServer, port=80):
server_address = ('', port)
httpd = server_class(server_address, handler_class)
print('HTTP server running on port %s'% port)
httpd.serve_forever()
if __name__ == "__main__":
from sys import argv
if len(argv) == 2:
run(port=int(argv[1]))
else:
run()
system
(system)
Closed
February 8, 2021, 4:43pm
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.