weimarnetz / registrator-nodejs

registrator to register a weimarnetz knotennummer
http://reg.weimarnetz.de
0 stars 2 forks source link

Neuen Knoten anlegen ist kaputt: CouchError: "reason": "Document update conflict." #14

Open mtippmann opened 7 years ago

mtippmann commented 7 years ago
$ wget -qO - 'http://reg.weimarnetz.de/POST/ffweimar/knoten?mac=a8ded036574a&pass=foo'
{
  "status": 500,
  "msg": "Server Error!",
  "result": {
    "name": "CouchError",
    "message": "conflict: Document update conflict.",
    "error": "conflict",
    "reason": "Document update conflict.",
    "headers": {
      "server": "CouchDB/1.6.1 (Erlang OTP/19)",
      "date": "Mon, 06 Mar 2017 02:54:49 GMT",
      "content-type": "text/plain; charset=utf-8",
      "content-length": "58",
      "cache-control": "must-revalidate",
      "status": 409
    },
    "status": 409
  }
}

Hier steht was: http://writing.jan.io/2013/12/19/understanding-couchdb-conflicts.html

So richtig schlau werd ich aus dem Code nicht, muss mal debuggen - hier ist wohl die Action: https://github.com/weimarnetz/registrator/blob/master/lib/register.js

andibraeu commented 7 years ago

ist das ein echter POST-Request?

@eins78

mtippmann commented 7 years ago

Ist kein echter, aber macht wohl keinen Unterschied:

~ » curl -XPOST 'http://reg.weimarnetz.de/ffweimar/knoten?mac=a8ded036574a&pass=foo'
{
  "status": 500,
  "msg": "Server Error!",
  "result": {
    "name": "CouchError",
    "message": "conflict: Document update conflict.",
    "error": "conflict",
    "reason": "Document update conflict.",
    "headers": {
      "server": "CouchDB/1.6.1 (Erlang OTP/19)",
      "date": "Thu, 16 Mar 2017 15:35:08 GMT",
      "content-type": "text/plain; charset=utf-8",
      "content-length": "58",
      "cache-control": "must-revalidate",
      "status": 409
    },
    "status": 409
  }
}%