Using DTrace With a Problem Uploading Files via FTPDerek Crudgington, May 2006 I was having a problem trying to upload something via FTP through a web application, and it wasn't uploading for some reason. The FTP daemon was receiving the commands, but the file wasn't showing up in the directory. Here's the FTP log of the session I was trying to upload: Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 165209 daemon.info] USER pinnftp Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 125383 daemon.info] PASS password Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 201503 daemon.info] CWD / Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 313182 daemon.info] PORT Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 307055 daemon.info] TYPE Image Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 206289 daemon.info] STOR logo-left.jpg
Nothing looks suspicious here, and even to test if it was a permission
error I went ahead and made the
I decided to use DTrace to investigate. (Note: Dynamic Tracing or DTrace is a new feature in the Solaris 10 OS that is used to better understand the system and programs run on the system.) I ran the DTrace script
What we are looking for here is all of the -1< FD values. This indicates there was an error somewhere. Looking at all of them,
only one really sticks out, and it is the name of the image I was trying to upload, It has an error number of 13. Let's see what this means: root@callacct:~/DTraceToolkit-0.83# grep 13 /usr/include/sys/errno.h #define EACCES 13 /* Permission denied */ #define ECONNABORTED 130 /* Software caused connection abort */ #define ECONNRESET 131 /* Connection reset by peer */ #define ENOBUFS 132 /* No buffer space available */ #define EISCONN 133 /* Socket is already connected */ #define ENOTCONN 134 /* Socket is not connected */ /* XENIX has 135 - 142 */
It is showing that I'm getting a permission denied. This makes more sense if you look at the FTP log above: It shows it issuing
At first I overlooked the FTP application sending the About the Author
Derek Crudgington can be reached at dacrud@gmail.com, or see his web site at:
The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource. Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
| |||