22

I have hosted my websocket server using python tornado server on localhost ws://localhost:8001 and client is on another system on 192.168.0.116 so when we try to communicate it works fine but cant debug it using wireshark. My websocket is running on port 8001 so i tried using

tcp.port==8001

but no result found so i then tried it on http my ip in lan is 192.168.0.219 and port 8001. so

http.host == 192.168.0.219 && tcp.port == 8001

but no results found. Is there anything else that i can try to debug my websocket.

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
Hitul Mistry
  • 2,105
  • 4
  • 21
  • 29

3 Answers3

29

You can also filter to show only WebSocket packets by using a display filter:

(websocket)
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
  • 3
    Seems to work sometimes for me, working for the socket connection on stackoverflow, but not for the website I am building for some reason, I wonder if its because the site I am building is ssl/tsl? – Josh Mc Aug 15 '13 at 00:22
8

Finally i found it.

When i put

tcp.dstport == 8001 || tcp.srcport == 8001

At that time i can capture it.

Hitul Mistry
  • 2,105
  • 4
  • 21
  • 29
  • 2
    WebSockets do not necessarily use port 8001. For example, Openshift websockets currently use port 8000: https://blog.openshift.com/paas-websockets/ – vicch Apr 06 '16 at 18:42
3

Check the syntax for filters, in your case, it should be tcp port 8001.

Step by step:

  1. Capture options
  2. Select the network interface
  3. Fill the filed next to the button "Capture Filter:" with tcp port 8001
  4. Start
gpoo
  • 8,408
  • 3
  • 38
  • 53
  • You have to add more information, such as what specifically you tried, in which platform have you tried, version, etc. In my case, I use that kind of filters very often in Linux and it works. Also, check if you are running wireshark with privileges (superuser o suid) and check if you are filtering the right network interface. – gpoo Sep 29 '12 at 06:41