Estamos vendo aplicativos como o erro nginx e php-fpm ocasionalmente (e temporariamente) ao abrir arquivos bons de uma montagem NFS conectada:
exemplo de erro php-fpm:
2017/05/20 22:53:09 [error] 55#0: *6575 FastCGI sent in stderr: "PHP message: PHP Warning: getimagesize(/www/newspaperfoundation.org/html/wp-content/blogs.dir/22/files/2017/05/19-highest-honors-1.jpg): failed to open stream: Input/output error in /www/newspaperfoundation.org/html/wp-content/plugins/mashsharer/includes/header-meta-tags.php on line 271" while reading response header from upstream, client:
192.168.255.34, server: www.dailyrepublic.com, request: "GET /solano-news/fairfield/highest-honors-commends-students-with-4-0-and-higher-grade-point-average/ HTTP/1.1", upstream: "fastcgi://172.17.0.3:9001", host: "www.dailyrepublic.com"
Exemplo de erro
nginx:
2017/05/20 23:22:32 [crit] 56#0: *712 open() "/www/newspaperfoundation.org/html/wp-content/blogs.dir/24/files/2017/05/Tandem1W-550x550.jpg" failed (5: Input/output error), client: 192.168.255.34, server: www.davisenterprise.com, request: "GET /files/2017/05/Tandem1W-550x550.jpg HTTP/1.1", host: "www.davisenterprise.com", referrer: "http://www.davisenterprise.com/"
Durante um erro temporário, posso ls
e ver o arquivo com as permissões corretas. A imagem finalmente fica boa depois de um longo tempo. Outros arquivos retornam OK sem erros de entrada / saída.
Não há muito logging para documentar o problema. Mas ativando rpcdebug
, vejo muitas mensagens como essas na época dos erros:
May 20 16:10:07 tomentella kernel: NFSD: nfsd4_open filename 19tommeyerW.jpg op_openowner (null)
May 20 16:10:07 tomentella kernel: nfsv4 compound op ffff8806239e5080 opcnt 5 #2: 18: status 10011
May 20 16:10:07 tomentella kernel: nfsv4 compound returned 10011
May 20 16:10:07 tomentella kernel: nfsd_dispatch: vers 4 proc 1
May 20 16:10:07 tomentella kernel: nfsv4 compound op #1/5: 22 (OP_PUTFH)
May 20 16:10:07 tomentella kernel: nfsd: fh_verify(36: 01070001 008c0312 00000000 3c639297 604b0f25 ce691899)
May 20 16:10:07 tomentella kernel: nfsv4 compound op ffff8806239e5080 opcnt 5 #1: 22: status 0
May 20 16:10:07 tomentella kernel: nfsv4 compound op #2/5: 18 (OP_OPEN)
May 20 16:10:07 tomentella kernel: NFSD: nfsd4_open filename 19tommeyerW.jpg op_openowner (null)
May 20 16:10:07 tomentella kernel: nfsv4 compound op ffff8806239e5080 opcnt 5 #2: 18: status 10011
May 20 16:10:07 tomentella kernel: nfsv4 compound returned 10011
May 20 16:10:08 tomentella kernel: nfsd_dispatch: vers 4 proc 1
May 20 16:10:08 tomentella kernel: nfsv4 compound op #1/4: 22 (OP_PUTFH)
May 20 16:10:08 tomentella kernel: nfsd: fh_verify(36: 01070001 008c0312 00000000 3c639297 604b0f25 ce691899)
May 20 16:10:08 tomentella kernel: nfsv4 compound op ffff8806239e5080 opcnt 4 #1: 22: status 0
May 20 16:10:08 tomentella kernel: nfsv4 compound op #2/4: 15 (OP_LOOKUP)
Em particular, sinto que só vejo esta mensagem para arquivos com erros:
May 20 16:10:07 tomentella kernel: NFSD: nfsd4_open filename 19tommeyerW.jpg op_openowner (null)
Alguma idéia sobre o que pode estar causando os erros input/output
?
O cliente é montado usando o seguinte:
mount.nfs4 -v -o proto=tcp $NFSMASTERHOST:/srv/data /srv/data
Centos 7 com pacotes atualizados. O erro é "novo" com poucas mudanças no servidor recentemente. Acho que talvez minha atualização recente dos pacotes do sistema possa ter sido o gatilho para essa mudança.
Como o problema entra e sai de algumas imagens, consigo observar os logs e comparar / contrastar. Aqui está um exemplo disso indo de OK para ruim ao usar um nome de imagem em particular:
May 20 18:38:37 tomentella kernel: NFSD: nfsd4_open filename Ron-Thomas-web-150x150.jpg op_openowner (null)
May 20 18:38:37 tomentella kernel: NFSD: nfsd4_open_confirm on file Ron-Thomas-web-150x150.jpg
May 20 18:38:37 tomentella kernel: NFSD: nfsd4_close on file Ron-Thomas-web-150x150.jpg
May 20 18:39:08 tomentella kernel: NFSD: nfsd4_open filename Ron-Thomas-web-150x150.jpg op_openowner (null)
May 20 18:39:08 tomentella kernel: NFSD: nfsd4_open filename Ron-Thomas-web-150x150.jpg op_openowner (null)
May 20 18:39:10 tomentella kernel: NFSD: nfsd4_open filename Ron-Thomas-web-150x150.jpg op_openowner (null)
May 20 18:39:10 tomentella kernel: NFSD: nfsd4_open filename Ron-Thomas-web-150x150.jpg op_openowner (null)
May 20 18:39:11 tomentella kernel: NFSD: nfsd4_open filename Ron-Thomas-web-150x150.jpg op_openowner (null)
May 20 18:39:11 tomentella kernel: NFSD: nfsd4_open filename Ron-Thomas-web-150x150.jpg op_openowner (null)
Aqui está o nfsstat
tomentella ★ ~ $ nfsstat
Server rpc stats:
calls badcalls badclnt badauth xdrcall
94437487 6 6 0 0
Server nfs v4:
null compound
503 0% 94436978 99%
Server nfs v4 operations:
op0-unused op1-unused op2-future access close commit
0 0% 0 0% 0 0% 11213689 3% 2631554 0% 3377 0%
create delegpurge delegreturn getattr getfh link
579 0% 0 0% 0 0% 88581315 31% 32460559 11% 0 0%
lock lockt locku lookup lookup_root nverify
365 0% 0 0% 365 0% 30058556 10% 0 0% 0 0%
open openattr open_conf open_dgrd putfh putpubfh
2771686 0% 0 0% 74326 0% 0 0% 92969992 32% 0 0%
putrootfh read readdir readlink remove rename
2435 0% 1999675 0% 1917567 0% 350 0% 12404 0% 5072 0%
renew restorefh savefh secinfo setattr setcltid
1226801 0% 0 0% 5072 0% 0 0% 18315216 6% 121025 0%
setcltidconf verify write rellockowner bc_ctl bind_conn
121105 0% 0 0% 115189 0% 365 0% 0 0% 0 0%
exchange_id create_ses destroy_ses free_stateid getdirdeleg getdevinfo
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
getdevlist layoutcommit layoutget layoutreturn secinfononam sequence
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
set_ssv test_stateid want_deleg destroy_clid reclaim_comp
0 0% 0 0% 0 0% 0 0% 0 0%
Client rpc stats:
calls retrans authrefrsh
0 0 0