dCache / dcache

dCache - a system for storing and retrieving huge amounts of data, distributed among a large number of heterogenous server nodes, under a single virtual filesystem tree with a variety of standard access methods
https://dcache.org
277 stars 132 forks source link

Webdav door returns 500 withour explanation if OSMTemplate has invalid content #7560

Open kofemann opened 2 months ago

kofemann commented 2 months ago

If a directory tag OSMTemplate is not empty but doesn't contain the expected line StoreName xxx, then Webdav door will return error 500 without details and log message. With higher debug lever one can get more information, which is still quite cryptic:

26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] template 'client' not found in templategroup: /usr/share/dcache/webdav/templates/html.stg
26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] Internal server error: org.dcache.webdav.WebDavException: StoreName not found in template
26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] Client indicated response preference: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] MIME-Type "text/html" has no q-value
26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] Responding with MIME-Type "text/html; charset=utf-8"
26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] write(array HeapByteBuffer@72ad8a0a[p=0,l=3251,c=3251,r=3251]={<<<    <!DOCTYPE html>\n    <...    </body>\n    </html>>>>})
26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] write(array) s=OPEN,api=BLOCKING,sc=false,e=null aggregated !flush HeapByteBuffer@734cee33[p=0,l=3251,c=32768,r=3251]={<<<    <!DOCTYPE html>\n    <...    </body>\n    </html>>>>  </html>...\x00\x00\x00\x00\x00\x00\x00}
26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] sendResponse info=null content=HeapByteBuffer@734cee33[p=0,l=3251,c=32768,r=3251]={<<<    <!DOCTYPE html>\n    <...    </body>\n    </html>>>>  </html>...\x00\x00\x00\x00\x00\x00\x00} complete=false committing=true callback=Blocker@ab7cb39{null}
26 Apr 2024 08:56:40 (WebDAVs-door01) [door:WebDAVs-door01@WebDAVs-door01-domain:AAYW/BUEIhA] COMMIT for / on HttpChannelOverHttp@10ef9815{s=HttpChannelState@55ed046c{s=HANDLING rs=BLOCKING os=COMMITTED is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=https://10.47.91.34:8443/,age=18}
Apr 26 08:56:40 door01 dcache@WebDAVs-door01-domain[3480]: 500 null HTTP/1.1
Apr 26 08:56:40 door01 dcache@WebDAVs-door01-domain[3480]: Date: Fri, 26 Apr 2024 08:56:40 GMT
Apr 26 08:56:40 door01 dcache@WebDAVs-door01-domain[3480]: Server: dCache/9.2.12
Apr 26 08:56:40 door01 dcache@WebDAVs-door01-domain[3480]: Accept-Ranges: bytes