Print

Print


When a file exists, the cmsd returns the wrong error code (or maybe just doesn't provide a distinct error code?) resulting in the wrong xrootd error code.

See the following example (note PID 2072999 is the `cmsd` and 2075105 is the `xrootd`):
```
200328 09:18:45 2072999 unknown.1:22@example do_Select: failed; Unable to create new file; file already exists. /prefix/test_folder4
200328 09:18:45 2075105 Receive ???????? 52 bytes on 3071
200328 09:18:45 2075105 Decode example gave unknown.1:22@example err -2 'Unable to create new file; file already exists.' /prefix/test_folder4
200328 09:18:45 2075096 unknown.1:22@example XrootdResponse: sending err 3011: Unable to create new file; file already exists.
```

I think what happens is the `-2` error code in the `cmsd` response is interpreted as a Unix `errno` by the `xrootd` daemon, which corresponds to `ENOENT` and then mapped to error code `3011`.

The wrong response (3011 is `kXR_NotFound` or file not found) is causing the HTTP protocol to return the wrong response and clients to take the wrong action.

The right fix isn't readily apparent -- it looks like giving the "right" error code from the `cmsd` would be a large-scale protocol break, which I'm not confident in doing immediately.  May have to do a short-term workaround based on the error message in the meantime.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/1167

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1