r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
8 stars 2 forks source link

Deployment SSL errors #122

Open jeroen opened 2 years ago

jeroen commented 2 years ago

For example: https://github.com/r-universe/rstudio/runs/4922906332?check_suite_focus=true

  > PUT /packages/bookdown/0.24.5/mac/cdf9ef03c2876d6bc1effe21ce196bcb HTTP/1.1
  > Host: rstudio.r-universe.dev
  > Authorization: Basic ***
  > User-Agent: curl/7.68.0
  > Accept: */*
  > Builder-Upstream: https://github.com/rstudio/bookdown
  > Builder-Registered: true
  > Builder-Commit: eJydzLEKwjAYBOBXCZmlpG1IWxER1NVFxME6JM1v-6NpQpIWQXx3M4gPIDccHHz3oqjpkhalAFYpzksNqlI3yXijlJYFE7xugIOoc6GUoAsqpzhYn8x28BiidQOQHfgZYXqSVfcbM_0dN72R-Mg6a9aJpzIYI_z_YCAE2UPyJ6dlBHLYn49EjpqoyTiiYSYz-IB2bFMu4Y6OdHhtx2QjmgRzwUtWcF407w_QbVaQ
  > Builder-Maintainer: eJyrVspLzE1VslKKzMwozVSIyExV0lFKzU3MzAGKVWSmOlSCxPXAinSUcvLTM_OAEmBBID-_KDkzBcg3AAJdIDbWNTAzMdU1NTMzU6oFADb3Gvs=
  > Builder-Distro: macos
  > Builder-Host: GitHub-Actions
  > Builder-Status: success
  > Builder-Pkgdocs: skipped
  > Builder-Url: https://github.com/r-universe/rstudio/actions/runs/1739701652
  > Content-Length: 1081959
  > 
  } [5 bytes data]
  * We are completely uploaded and fine
  * OpenSSL SSL_read: Connection reset by peer, errno 104

  100 1056k    0     0  100 1056k      0  9967k --:--:-- --:--:-- --:--:-- 9967k
  * Closing connection 0
  } [5 bytes data]
  curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104

On the server, it looks as if nginx rejected the request without fowarding it?

nginx       | 2022-01-24T14:13:47.310393501Z 40.121.80.42 - ropensci [24/Jan/2022:14:13:47 +0000] "PUT /packages/bookdown/0.24.5/mac/cdf9ef03c2876d6bc1effe21ce196bcb HTTP/1.1" 400 0 "-" "curl/7.68.0"

Perhaps it ran out of memory again.

jeroen commented 2 years ago

Internet suggest one problem may be that express has a lower timeout than nginx. I don't think that is the issue here because the log shows the upload errors within 1s after starting, but just in case: https://github.com/r-universe-org/cranlike-server/commit/f025da038a96f549a91078dd77a59a3ab678251d

jeroen commented 2 years ago

Still happening, out of memory also seems very unlikely right now https://github.com/r-universe/rcppcore/runs/4927004376?check_suite_focus=true

jeroen commented 2 years ago

Just did 150 ropensci quick deployments while monitoring the server. None of them failed and the memory usage did not even increase 1%. So there must be some other problem.

jeroen commented 2 years ago

Could there be some race condition, where the package that we want to delete is currently being downloaded?

jeroen commented 2 years ago

Identified a couple more, not sure if this is the same issue though:

  curl: (22) The requested URL returned error: 400
  <!DOCTYPE html><html><head><title></title><link rel="stylesheet" href="/assets/css/style.css"></head><body><h1>key X-schema.org-applicationCategory must not contain '.'</h1><h2>400</h2><pre>Error: key X-schema.org-applicationCategory must not contain '.'
      at serializeInto (/app/node_modules/bson/lib/bson/parser/serializer.js:921:19)
      at serializeObject (/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
      at serializeInto (/app/node_modules/bson/lib/bson/parser/serializer.js:729:17)
      at serializeObject (/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
      at serializeInto (/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
      at BSON.serialize (/app/node_modules/bson/lib/bson/bson.js:64:28)
      at Msg.serializeBson (/app/node_modules/mongodb/lib/core/connection/msg.js:127:22)
      at Msg.makeDocumentSegment (/app/node_modules/mongodb/lib/core/connection/msg.js:119:33)
      at Msg.toBin (/app/node_modules/mongodb/lib/core/connection/msg.js:105:25)
      at MessageStream.writeCommand (/app/node_modules/mongodb/lib/cmap/message_stream.js:55:28)
      at Connection.write (/app/node_modules/mongodb/lib/cmap/connection.js:400:26)
      at _command (/app/node_modules/mongodb/lib/core/wireprotocol/command.js:149:10)
      at command (/app/node_modules/mongodb/lib/core/wireprotocol/command.js:28:5)
      at writeCommand (/app/node_modules/mongodb/lib/core/wireprotocol/write_command.js:56:3)
      at Object.insert (/app/node_modules/mongodb/lib/core/wireprotocol/index.js:6:5)
      at Connection.insert (/app/node_modules/mongodb/lib/cmap/connection.js:218:8)</pre></body></html>