I am a newbee using Wireshark, so hope for a little help :-) I have an issue with an SQL DB application which craches. I my tracefile I see very high Delta Time on SMB2 and a max SRT(s) of 625.347497 on Notify on SMB2 Service Response Time. Where should I start to look? Is it the network, server or Client? Thanks in advance.asked 04 Jan ‘17, 23:55 bachsec edited 07 Jan ‘17, 11:04 grahamb ♦ showing 5 of 7 show 2 more comments |
One Answer:
Hello bachsec, and welcome to ask.wireshark Application errors like missing access rights or lock conflicts are easily spotted with this display filter: Looking at the Service Response Time Statistics can be helpful. Alas, in this case we only get marginal info. The most remarkable part in the statistics from your trace file is one instance of a long time for the Create command. The Create function is called to obtain a file handle. This can be used to either create a file or to open an existing file. 1.7 seconds is considered "long" for most cases. However, a a virus scanner checking a 4 GB ISO image in 1.7 seconds would be impressive. So we have a number, but no unit to measure against. The delay could also be caused a TCP retransmissions or other network issues. The long response times for the notify request are usually not a problem, as this an asynchronous message from the server like "Hey client, a time stamp on a file has changed". A trace file would help a lot. Depending on the configuration (DFS, Branch Cache etc.) a full network trace from the client view would be the best option. Certain problems might require two traces taken simultaneously with client and server. Please bear in mind, that SMB traffic usually reveals the file contents and (depending on the configuration of workstation and server) could also reveal users passwords. To investigate that problem we need at least the SMB or SMB2 headers with the return codes. I am not aware of a tool that sanitizes SMB traffic as one might desire. If you can not share the trace file with the general public a network consultant might be your best option. Good hunting answered 05 Jan '17, 10:32 packethunter Hi Packethunter With the filter you gave me, I can see something is that errors E.G. Error: STATUS_BUFFER_TOO_SMALL (08 Jan '17, 00:14) bachsec Hmmmm. "Buffer too small" is a regular message for certain protocols, that use named pipes. The client sends a request and a default buffer size, say 1kByte. If the server's response exceeds 1 kB the response will have the return code "Buffer too small". Another field will hold the required buffer size for the response. Here are a few root causes for performance problems, that I have encountered during various analysis projects:
After a day at the Sharkfest conference you will certainly have a list that is five times this long. The majority of these issues is best found with diagnostic tools on the server, like the Performance Monitor. Wireshark will help you in many situations to identify the culprit (server, client, network ...). Getting to the root cause requires other tools, once you have arrived at the server. I am not sure, if I can help you further without a trace file. Good hunting (08 Jan '17, 09:16) packethunter |
Could you explain the topology of the system a little? Is it:
Client PC —- Database Server —- SMB File Server
or
Client PC / Access —- SMB File Server
or
????
Hi PaulOfford
It is Client(with developed frontend) —-> SMB Server with SQL Express as DB for the frontend Application
The application connects to the SQL express instance in the SMB server.
There are two ways to connect to a Microsoft SQL database; named pipes or TDS over TCP. You could be using named pipes but Find and Notify are SMB2 commands that I wouldn’t expect to see.
By the way, Notify response times might be long as Notify is used to notify a client if a change has been made to a file or directory. See https://wiki.wireshark.org/SMB2/Notify
Can you confirm that the client application connects to the database using named pipes? If you are not sure, check to see if there is any traffic in your trace between the client and port 1433 on your server with the filter expression:
ip.addr==the_client_ip_address and tcp.port=1433
TCP port 1433 is the default port number for Microsoft SQL Server. Although it can be set to a different value and so you might want to check with whoever supports the database.
Sorry to keep asking dumb questions but I don’t want to send you off on a wild goose chase.
Hi PaulOfford
In the tracefile I see at lot of traffic between the client and the serve on port 1433. 80% of the packages in the trace is that, when I filter with the filet you wrote.
Does this graph say anything.
no. sorry.
It has answered the question I had. So, although your client application may use SMB file services, the connection to the database is via TDS/TCP.
You say in the title that the application crashes. Do you literally mean that? Does it throw an exception, dump and then exit? Or do you get an error message? If so, what’s the message and have you determined what it means?