SadeghKrmi / 5G-Trace-Analyzer

5G Sequence Analyzer
GNU General Public License v3.0
27 stars 8 forks source link

Unable to run the analyzer (unforunatelly) - exception is raised #3

Open brutany opened 2 years ago

brutany commented 2 years ago

HI

I am so excited to have something like this awesomeanalyzer (wireshark sucks!!!) BUT unfortunately I am not able to run it. IT throws exception Can you please please please try to help?

Thank you very much p.s my OS verion: [Linux]osboxes 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

networkanalyzer.txt

SadeghKrmi commented 2 years ago

Hey @brutany, Can you share more information? At which level are you receiving this error? did you change some configurations?

brutany commented 2 years ago

. Hi Sadegh

y name is Tatyana Bruk (brutany) and I am telecom integrator engineer since WIPEL/WIMAX times FIrst let me express that I am thrilled to find something like your project I hate wireshark and was looking for something like your project SO KUDOS for an amazing JOB!!!!

I have successfully installed the application from your github Unfortunately when I am choosing to parse a file , there is PYTHON exception raised . (log below) I tried different files and also verified with the file that attached to your project.

I would really relay appreciate if you can take a look and maybe able to solve this issue Can t wait to use this analyzer

I would also wanted to say that I can contribute to your project , we can discuss how. THANK YOU !

env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# sudo ../.env/bin/python3 manage.py runserver 0.0.0.0:8080 Watching for file changes with StatReloader Performing system checks...

System check identified no issues (0 silenced). May 24, 2022 - 19:05:44 Django version 3.1.4, using settings 'fiveGseqAnalyzer.settings' Starting development server at http://0.0.0.0:8080/ Quit the server with CONTROL-C. [24/May/2022 19:05:48] "GET /analyzer/ HTTP/1.1" 200 120376 [24/May/2022 19:05:48] "GET /static/stickyNote/dist/jquery-ui.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/stickyNote/dist/jquery.postitall.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/snackbar/toast.min.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/jQueryConfirm/jquery-confirm.min.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/docApp/move-to-top.js HTTP/1.1" 200 348 [24/May/2022 19:05:48] "GET /static/sidebar/sidebar.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/jsonformatter/source/jsonFormatter.min.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/jquery.dataTables.min.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/dataTables.buttons.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/dataTables.responsive.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/dataTables.altEditor.free.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/dataTables.select.js HTTP/1.1" 304 0 [24/May/2022 19:05:49] "POST /analyzer/ajax/ngapUpdater HTTP/1.1" 200 994 [24/May/2022 19:05:50] "POST /analyzer/ajax/pfcpUpdater HTTP/1.1" 200 1048 processing file: test_TestRegistration-20220524190559.pcap ------------- PFCP: packet Number 253, MessageType: 5, MessageName: Association Setup Request ------------- Is there any filter on parameters? False Is it requred? True ie_type is: 60 and ie_name is: Node ID ie_type is: 96 and ie_name is: Recovery Time Stamp ie_type is: 89 and ie_name is: CP Function Features Traceback (most recent call last): File "main.py", line 145, in seq_diagram = fiveG.create_puml_seq_diagram(packets, protocols, traceName) File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 174, in create_puml_seq_diagram seqevents = self.packets_to_seqevents(packets, protocols, traceName) File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 167, in packets_to_seqevents for seqevent in self.packet_to_seqevents(packet, traceName): File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 151, in packet_to_seqevents self.get_message_lines(packet, traceName), File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 138, in get_message_lines message_lines = pfcp.pfcpAnalyzer(packet, traceName) File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pfcp.py", line 349, in pfcpAnalyzer msg_type = pkt.pfcp.msg_type File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/packet/layer.py", line 34, in getattr val = self.get_field(item) File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/packet/layer.py", line 254, in get_field self._convert_showname_field_names_to_field_names() File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/packet/layer.py", line 275, in _convert_showname_field_names_to_field_names for field_name in self._all_fields: RuntimeError: dictionary keys changed during iteration Exception ignored in: <generator object Capture._packets_from_tshark_sync at 0x7ff0b43c3200> Traceback (most recent call last): File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/capture/capture.py", line 249, in _packets_from_tshark_sync

self.eventloop.run_until_complete(self._cleanup_subprocess(tshark_process)) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/capture/capture.py", line 412, in _cleanup_subprocess return await asyncio.wait_for(process.wait(), 1) File "/usr/lib/python3.8/asyncio/tasks.py", line 490, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError: Bad Request: /analyzer/ajax/AnalyzeTrace [24/May/2022 19:06:03] "POST /analyzer/ajax/AnalyzeTrace HTTP/1.1" 400 0

On Tue, May 24, 2022 at 4:47 AM Sadegh Karimi @.***> wrote:

Hey @brutany https://github.com/brutany, Can you share more information? At which level are you receiving this error? did you change some configurations?

— Reply to this email directly, view it on GitHub https://github.com/SadeghKrmi/5G-Trace-Analyzer/issues/3#issuecomment-1135586604, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARDH6ZXC33EANYLXI2C2FKTVLSJRTANCNFSM5WW423FQ . You are receiving this because you were mentioned.Message ID: @.***>

brutany commented 2 years ago

HI Again

I have installed a second instance of the analyzer and unfortunately still facing exception . attached . I tried different pcap files including the default file attached in github.

Please help ! I am ready to contribute for this project

Thank you Tatyana Bruk

On Wed, May 25, 2022 at 12:01 PM Tanya Bruk @.***> wrote:

. Hi Sadegh

y name is Tatyana Bruk (brutany) and I am telecom integrator engineer since WIPEL/WIMAX times FIrst let me express that I am thrilled to find something like your project I hate wireshark and was looking for something like your project SO KUDOS for an amazing JOB!!!!

I have successfully installed the application from your github Unfortunately when I am choosing to parse a file , there is PYTHON exception raised . (log below) I tried different files and also verified with the file that attached to your project.

I would really relay appreciate if you can take a look and maybe able to solve this issue Can t wait to use this analyzer

I would also wanted to say that I can contribute to your project , we can discuss how. THANK YOU !

env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# (.env) @.:/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer# sudo ../.env/bin/python3 manage.py runserver 0.0.0.0:8080 Watching for file changes with StatReloader Performing system checks...

System check identified no issues (0 silenced). May 24, 2022 - 19:05:44 Django version 3.1.4, using settings 'fiveGseqAnalyzer.settings' Starting development server at http://0.0.0.0:8080/ Quit the server with CONTROL-C. [24/May/2022 19:05:48] "GET /analyzer/ HTTP/1.1" 200 120376 [24/May/2022 19:05:48] "GET /static/stickyNote/dist/jquery-ui.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/stickyNote/dist/jquery.postitall.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/snackbar/toast.min.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/jQueryConfirm/jquery-confirm.min.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/docApp/move-to-top.js HTTP/1.1" 200 348 [24/May/2022 19:05:48] "GET /static/sidebar/sidebar.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/jsonformatter/source/jsonFormatter.min.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/jquery.dataTables.min.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/dataTables.buttons.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/dataTables.responsive.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/dataTables.altEditor.free.js HTTP/1.1" 304 0 [24/May/2022 19:05:48] "GET /static/datatables/js/dataTables.select.js HTTP/1.1" 304 0 [24/May/2022 19:05:49] "POST /analyzer/ajax/ngapUpdater HTTP/1.1" 200 994 [24/May/2022 19:05:50] "POST /analyzer/ajax/pfcpUpdater HTTP/1.1" 200 1048 processing file: test_TestRegistration-20220524190559.pcap ------------- PFCP: packet Number 253, MessageType: 5, MessageName: Association Setup Request ------------- Is there any filter on parameters? False Is it requred? True ie_type is: 60 and ie_name is: Node ID ie_type is: 96 and ie_name is: Recovery Time Stamp ie_type is: 89 and ie_name is: CP Function Features Traceback (most recent call last): File "main.py", line 145, in seq_diagram = fiveG.create_puml_seq_diagram(packets, protocols, traceName) File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 174, in create_puml_seq_diagram seqevents = self.packets_to_seqevents(packets, protocols, traceName) File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 167, in packets_to_seqevents for seqevent in self.packet_to_seqevents(packet, traceName): File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 151, in packet_to_seqevents self.get_message_lines(packet, traceName), File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 138, in get_message_lines message_lines = pfcp.pfcpAnalyzer(packet, traceName) File "/home/osboxes/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pfcp.py", line 349, in pfcpAnalyzer msg_type = pkt.pfcp.msg_type File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/packet/layer.py", line 34, in getattr val = self.get_field(item) File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/packet/layer.py", line 254, in get_field self._convert_showname_field_names_to_field_names() File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/packet/layer.py", line 275, in _convert_showname_field_names_to_field_names for field_name in self._all_fields: RuntimeError: dictionary keys changed during iteration Exception ignored in: <generator object Capture._packets_from_tshark_sync at 0x7ff0b43c3200> Traceback (most recent call last): File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/capture/capture.py", line 249, in _packets_from_tshark_sync

self.eventloop.run_until_complete(self._cleanup_subprocess(tshark_process)) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/home/osboxes/5G-Trace-Analyzer/.env/lib/python3.8/site-packages/pyshark/capture/capture.py", line 412, in _cleanup_subprocess return await asyncio.wait_for(process.wait(), 1) File "/usr/lib/python3.8/asyncio/tasks.py", line 490, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError: Bad Request: /analyzer/ajax/AnalyzeTrace [24/May/2022 19:06:03] "POST /analyzer/ajax/AnalyzeTrace HTTP/1.1" 400 0

On Tue, May 24, 2022 at 4:47 AM Sadegh Karimi @.***> wrote:

Hey @brutany https://github.com/brutany, Can you share more information? At which level are you receiving this error? did you change some configurations?

— Reply to this email directly, view it on GitHub https://github.com/SadeghKrmi/5G-Trace-Analyzer/issues/3#issuecomment-1135586604, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARDH6ZXC33EANYLXI2C2FKTVLSJRTANCNFSM5WW423FQ . You are receiving this because you were mentioned.Message ID: @.***>

SadeghKrmi commented 2 years ago

@brutany Are you running the program with root user privilege?

brutany commented 2 years ago

Yes

On Thu, May 26, 2022 at 11:19 Sadegh Karimi @.***> wrote:

@brutany https://github.com/brutany Are you running the program with root user privilege?

— Reply to this email directly, view it on GitHub https://github.com/SadeghKrmi/5G-Trace-Analyzer/issues/3#issuecomment-1138691961, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARDH6ZUPFMWDAPR5UF45UGTVL6JALANCNFSM5WW423FQ . You are receiving this because you were mentioned.Message ID: @.***>

brutany commented 2 years ago

I can provide remote access Thanks a lot for trying to help

On Thu, May 26, 2022 at 11:19 Sadegh Karimi @.***> wrote:

@brutany https://github.com/brutany Are you running the program with root user privilege?

— Reply to this email directly, view it on GitHub https://github.com/SadeghKrmi/5G-Trace-Analyzer/issues/3#issuecomment-1138691961, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARDH6ZUPFMWDAPR5UF45UGTVL6JALANCNFSM5WW423FQ . You are receiving this because you were mentioned.Message ID: @.***>

SadeghKrmi commented 2 years ago

Please contact me at sadegh.krmi@gmail.com

usermx01 commented 1 year ago

I see a similar problem in my tests. Im using python3.9 since 3.8 wont let me get to the actual website when running. I see with my configuration the trace is being analyzed based on the console logs, but the sample trace fails while reading the payload at some point with the error: [30/Aug/2023 22:40:13] "GET /analyzer/ HTTP/1.1" 302 0 [30/Aug/2023 22:40:13] "GET /login/?redirect_to=/analyzer/ HTTP/1.1" 200 2914 [30/Aug/2023 22:40:13] "GET /static/reginstration/signin.css HTTP/1.1" 200 767 [30/Aug/2023 22:40:13] "GET /static/reginstration/signinlogo.png HTTP/1.1" 200 144077 [30/Aug/2023 22:40:13] "GET /static/reginstration/favicon.png HTTP/1.1" 200 2076 [30/Aug/2023 22:40:19] "POST /login/ HTTP/1.1" 302 0 [30/Aug/2023 22:40:19] "GET / HTTP/1.1" 200 3962 [30/Aug/2023 22:40:20] "GET /static/bootstrap/css/bootstrap.min.css HTTP/1.1" 200 160392 [30/Aug/2023 22:40:20] "GET /static/stickyNote/dist/jquery.postitall.css HTTP/1.1" 200 113212 [30/Aug/2023 22:40:20] "GET /static/stickyNote/dist/jquery-ui.css HTTP/1.1" 200 37326 [30/Aug/2023 22:40:20] "GET /static/fontawesome/css/all.css HTTP/1.1" 200 73625 [30/Aug/2023 22:40:20] "GET /static/jQueryConfirm/jquery-confirm.min.css HTTP/1.1" 200 22538 [30/Aug/2023 22:40:20] "GET /static/snackbar/toast.min.css HTTP/1.1" 200 912 [30/Aug/2023 22:40:20] "GET /static/snackbar/toast.min.js HTTP/1.1" 200 5693 [30/Aug/2023 22:40:20] "GET /static/jQueryConfirm/jquery-confirm.min.js HTTP/1.1" 200 27896 [30/Aug/2023 22:40:20] "GET /static/stickyNote/dist/jquery.postitall.js HTTP/1.1" 200 185791 [30/Aug/2023 22:40:20] "GET /static/stickyNote/dist/jquery-ui.js HTTP/1.1" 200 520714 [30/Aug/2023 22:40:20] "GET /static/images/trace_figure.png HTTP/1.1" 200 307545 [30/Aug/2023 22:40:21] "GET /analyzer/ HTTP/1.1" 200 120376 [30/Aug/2023 22:40:22] "GET /static/sidebar/sidebar.css HTTP/1.1" 200 2151 [30/Aug/2023 22:40:22] "GET /static/datatables/css/select.dataTables.css HTTP/1.1" 200 4370 [30/Aug/2023 22:40:22] "GET /static/datatables/css/jquery.dataTables.min.css HTTP/1.1" 200 14110 [30/Aug/2023 22:40:22] "GET /static/jsonformatter/source/jsonFormatter.min.css HTTP/1.1" 200 1678 [30/Aug/2023 22:40:22] "GET /static/docApp/move-to-top.css HTTP/1.1" 200 748 [30/Aug/2023 22:40:22] "GET /static/datatables/css/buttons.dataTables.css HTTP/1.1" 200 11879 [30/Aug/2023 22:40:22] "GET /static/docApp/move-to-top.js HTTP/1.1" 200 348 [30/Aug/2023 22:40:22] "GET /static/datatables/js/dataTables.altEditor.free.js HTTP/1.1" 200 51834 [30/Aug/2023 22:40:22] "GET /static/datatables/js/dataTables.buttons.js HTTP/1.1" 200 51437 [30/Aug/2023 22:40:22] "GET /static/datatables/js/dataTables.responsive.js HTTP/1.1" 200 40542 [30/Aug/2023 22:40:22] "GET /static/sidebar/sidebar.js HTTP/1.1" 200 348 [30/Aug/2023 22:40:22] "GET /static/datatables/js/jquery.dataTables.min.js HTTP/1.1" 200 86550 [30/Aug/2023 22:40:22] "GET /static/jsonformatter/source/jsonFormatter.min.js HTTP/1.1" 200 3298 [30/Aug/2023 22:40:22] "GET /static/datatables/js/dataTables.select.js HTTP/1.1" 200 32597 [30/Aug/2023 22:40:22] "GET /static/fontawesome/webfonts/fa-solid-900.woff2 HTTP/1.1" 200 80300 [30/Aug/2023 22:40:22] "POST /analyzer/ajax/ngapUpdater HTTP/1.1" 200 994 [30/Aug/2023 22:40:22] "POST /analyzer/ajax/pfcpUpdater HTTP/1.1" 200 1048 processing file: test_TestRegistration-20230830224028.pcap ------------- PFCP: packet Number 253, MessageType: 5, MessageName: Association Setup Request ------------- Is there any filter on parameters? False Is it requred? True ie_type is: 60 and ie_name is: Node ID ie_type is: 96 and ie_name is: Recovery Time Stamp ie_type is: 89 and ie_name is: CP Function Features ------------- PFCP: packet Number 255, MessageType: 6, MessageName: Association Setup Response ------------- Is there any filter on parameters? False Is it requred? True ie_type is: 60 and ie_name is: Node ID ie_type is: 19 and ie_name is: Cause ie_type is: 96 and ie_name is: Recovery Time Stamp ie_type is: 116 and ie_name is: User Plane IP Resource Information ------------- Http2: packet Number 420, MessageType: header ------------- ------------- Http2: packet Number 421, MessageType: payload ------------- Traceback (most recent call last): File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/main.py", line 145, in <module> seq_diagram = fiveG.create_puml_seq_diagram(packets, protocols, traceName) File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 174, in create_puml_seq_diagram seqevents = self.packets_to_seqevents(packets, protocols, traceName) File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 167, in packets_to_seqevents for seqevent in self.packet_to_seqevents(packet, traceName): File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 151, in packet_to_seqevents self.get_message_lines(packet, traceName), File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/pcap.py", line 136, in get_message_lines message_lines = http2.http2Anlayzer(packet, traceName) File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/http2.py", line 221, in http2Anlayzer dataInSeq = jsonOrganizer(jsonData, streamId, streamType) File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/http2.py", line 34, in jsonOrganizer http2_payload = list(JsonWrapperData(jsonData)) File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/http2.py", line 61, in JsonWrapperData for x in JsonWrapperData(members): File "/5G-Trace-Analyzer/fiveGseqAnalyzer/analyzerApp/libs/http2.py", line 90, in JsonWrapperData k = item.get('json.key') AttributeError: 'str' object has no attribute 'get' Bad Request: /analyzer/ajax/AnalyzeTrace [30/Aug/2023 22:40:33] "POST /analyzer/ajax/AnalyzeTrace HTTP/1.1" 400 0

Dockerfile.txt