我正在使用strom分析一些日志,但是当一个螺栓将一个日志发送到另一个螺栓时,代码将停止,并且storm正在运行,日志内容如下:
{'request-content-type': 'application/x-www-form-urlencoded', 'src': '127.0.0.1:60978', 'response-body': '{"status":200,"message":"OK","data":{"winNoticeAttach":"\xe7\x82\xb9\xe5\x87\xbb\xe6\x9f\xa5\xe7\x9c\x8b\xe6\xb4\xbb\xe5\x8a\xa8\xe8\xaf\xa6\xe6\x83\x85\xe3\x80\x82","value":"http:\\/\\/h5.ffan.com\\/zzq\\/h5\\/s.html?imgcode=T1ypLTB5YT1RCvBVdK&title=%E5%81%9C%E8%BD%A6%E8%A7%82%E5%BD%B1%EF%BC%8C%E6%9C%80%E9%AB%98%E5%85%A8%E5%85%8D%EF%BC%8C%E5%97%A8%E5%97%A8%E5%97%A8%EF%BC%81","type":"99","detailId":"7644","lable":"\xe5\x81\x9c\xe8\xbd\xa6\xe8\xa7\x82\xe5\xbd\xb1\xef\xbc\x8c\xe6\x9c\x80\xe9\xab\x98\xe5\x85\xa8\xe5\x85\x8d\xef\xbc\x8c\xe5\x97\xa8\xe5\x97\xa8\xe5\x97\xa8\xef\xbc\x81"}}', 'request-url': '/shake/v2/lottery/luck?puid=BF31A0E5914044D8B7885BDF8D278677&FFUDID=15000000076773092&ddId=ef81733907ae23b4c63vvbxhp48406ac&uid=15000000076773092&wdId=3c57787ee317fa3d6f842116213e85ad&pLoginToken=d2efe8e5e4540ad611aa84a46b330148&__uni_source=1.1', 'dst': '10.209.240.68:10982', 'request-body': 'FFClientType=1&FFClientVersion=42100000&FFUDID=15000000076773092&__uni_source=1.1&app_code=02ac65ddc46dc38fe482781d2a44a3a0901cb5fbf814c607b7&app_time=14682269272312&cityId=150400&ddId=ef81733907ae23b4c63vvbxhp48406ac&devInfo=%257B%2522locationProvince%2522%253A%2522%2522%252C%2522locationY%2522%253A%2522%2522%252C%2522IP%2522%253A%2522192.168.1.1%2522%252C%2522locationCity%2522%253A%2522%2522%252C%2522network_desc%2522%253A%2522WIFI%2522%252C%2522locationDistrict%2522%253A%2522%2522%252C%2522device_id%2522%253A%2522ef81733907ae23b4c63vvbxhp48406ac%2522%252C%2522sourceFrom%2522%253A%2522APP%2522%252C%2522wifi%2522%253A%2522CMCC%2522%252C%2522size%2522%253A%2522320%252A568%2522%252C%2522Os_type%2522%253A%2522IOS%2522%252C%2522device_desc%2522%253A%2522iPhone8%252C2%2522%252C%2522mac%2522%253A%2522ef81733907ae23b4c63vvbxhp48406ac%2522%252C%2522locationX%2522%253A%2522%2522%252C%2522locationAddress%2522%253A%2522%2522%252C%2522network%2522%253A%2522WIFI%2522%252C%2522GPS%2522%253A%2522%2522%252C%2522os_version%2522%253A%2522iPhone%2520OS%25209.3%2522%252C%2522screenSize%2522%253A%2522320%252A568%2522%252C%2522gmtTime%2522%253A%2522Sat%252C%25204%2520Jun%25202016%252014%253A27%253A05%2520GMT%2522%257D&pLoginToken=d2efe8e5e4540ad611aa84a46b330148&puid=BF31A0E5914044D8B7885BDF8D278677&uid=15000000076773092&version=1&wdId=3c57787ee317fa3d6f842116213e85ad', 'request-hc': 88, 'request-host': 'api.ffan.com', 'response-content-type': 'application/json; charset=UTF-8', 'request-method': 'POST', 'request-cookie': 'SESSIONID=1f6ba1041587a7135cfa1a6d42e2d5ef; psid=58ff1f469875dab75f9a080eb81e5033; puid=BF31A0E5914044D8B7885BDF8D278677; up=bup; sid=d2efe8e5e4540ad611aa84a46b330148; uid=15000000076773092; uniqkey2=RZhczLgfkoQJoTrJFEDKGZ/zXILl/QZZjYcK8eb8DAWp0Y9bkRmQEjIw/JbBUyzzmK7d4I8KAlNbEgeS83MSxmnhWAdTxpyBCBwOflYxLXb1XDZ3cd1h2iPX2lJcUjdiR81xlD1iGqOZS9xI6wHsYTj0ctfnWmX/pXPl9Ls9zIv4HWeFf4thJ9qirL2TgKMcgNLw', 'response-code': 200, 'request-x-forwarded-for': '1217.0.0.1', 'time': '2016-07-11 16:48:49', 'request-referer': 'https://api.ffan.com/shake/v2/lottery/luck?puid=BF31A0E5914044D8B7885BDF8D278677&FFUDID=15000000076773092&ddId=ef81733907ae23b4c63vvbxhp48406ac&uid=15000000076773092&wdId=3c57787ee317fa3d6f842116213e85ad&pLoginToken=d2efe8e5e4540ad611aa84a46b330148&__uni_source=1.1 ', 'response-content-length': '377', 'request-user-agent': 'com.dianshang.wanhui/4.2.1 (iPhone; iOS 9.3; Scale/2.00)', 'id': 'b18d2e7f-5017-4fc7-af32-f16c8d6fdcc3'}
似乎螺栓不能向另一个发出这个信息,我被绊住了,不知道如何找出这是错误的原因。。
为了清楚地描述我的问题,我将给出我的代码是如何运行的:
(1) 有一个c程序来捕获指定接口上的网络数据包,例如eth0,然后将数据包放入一个json数据中,正如我前面提到的,然后将它放入一个redis队列中。
(2) 我用pyleus编写了一个spout,这个spout将从redis队列获取数据,并使用json.loads()将数据转换为python dict并将数据发送到bolta。
(3) bolta收到dict并尝试解码,因为dict中的响应是base64编码,在解码响应体之后,它将向boltb发出dict。
现在我的问题是,当bolta解码响应体时,它不能将响应体发送给boltb,但是如果bolta不解码响应体,它将工作得很好。我想如果有什么特定的字符风暴不能工作。。。
我尽我所能解决不了这个。。
希望我能把我的问题说清楚。。
暂无答案!
目前还没有任何答案,快来回答吧!