You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/05/05 03:38:55 UTC

[GitHub] [couchdb] DeylEnergy opened a new issue #2867: Can't create user. Server responds with 500 Internal Server Error.

DeylEnergy opened a new issue #2867:
URL: https://github.com/apache/couchdb/issues/2867


   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   Hello, was following [security introduction](https://docs.couchdb.org/en/2.3.1/intro/security.html) and got into the error when trying to add a new user to $HOST/_users. The response from curl request and through Fauxton is identical. 
   
   ## Steps to Reproduce
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   
   **Through curl:**
   ```
   curl -X PUT http://localhost:5984/_users/org.couchdb.user:jan \
        -H "Accept: application/json" \
        -H "Content-Type: application/json" \
        -d '{"name": "jan", "password": "apple", "roles": [], "type": "user"}'
   ```
   
   **Response:**
   ```
   *   Trying ::1:5984...
   * TCP_NODELAY set
   * connect to ::1 port 5984 failed: Connection refused
   *   Trying 127.0.0.1:5984...
   * TCP_NODELAY set
   * Connected to localhost (127.0.0.1) port 5984 (#0)
   > PUT /_users/org.couchdb.user:jan HTTP/1.1
   > Host: localhost:5984
   > User-Agent: curl/7.68.0
   > Accept: application/json
   > Content-Type: application/json
   > Content-Length: 69
   > 
   * upload completely sent off: 69 out of 69 bytes
   * Mark bundle as not supporting multiuse
   < HTTP/1.1 500 Internal Server Error
   < Cache-Control: must-revalidate
   < Content-Length: 47
   < Content-Type: application/json
   < Date: Tue, 05 May 2020 03:17:23 GMT
   < Server: CouchDB/2.3.1 (Erlang OTP/22)
   < X-Couch-Request-ID: 913ae46a1b
   < X-CouchDB-Body-Time: 0
   < 
   {"error":"unknown_error","reason":"undefined"}
   * Connection #0 to host localhost left intact
   ```
   
   **And how it looks in Fauxton:**
   ![](https://i.imgur.com/GyCFuq9.png)
   
   ## Expected Behaviour
   
   Server shoud respond with something like this:
   ```
   PUT /_users/org.couchdb.user:jan HTTP/1.1
   Accept: application/json
   Content-Length: 62
   Content-Type: application/json
   Host: localhost:5984
   User-Agent: curl/7.31.0
   ```
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * CouchDB version used: 2.3.1-3 (from Arch community repository)
   * Browser name and version: Chromium Version 80.0.3987.87 (Official Build) Arch Linux (64-bit)
   * Operating system and version: Arch Linux (64-bit) / Kernel: Linux 5.5.2-arch1-1
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] DeylEnergy edited a comment on issue #2867: Can't create user. Server responds with 500 Internal Server Error.

Posted by GitBox <gi...@apache.org>.
DeylEnergy edited a comment on issue #2867:
URL: https://github.com/apache/couchdb/issues/2867#issuecomment-623861843


   Thank you @wohali Just installed ```libffi``` dependency and it solved the issue.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] DeylEnergy commented on issue #2867: Can't create user. Server responds with 500 Internal Server Error.

Posted by GitBox <gi...@apache.org>.
DeylEnergy commented on issue #2867:
URL: https://github.com/apache/couchdb/issues/2867#issuecomment-623861843


   Thank you @wohali Just installed ```libffi''' dependency and it's working now.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] DeylEnergy edited a comment on issue #2867: Can't create user. Server responds with 500 Internal Server Error.

Posted by GitBox <gi...@apache.org>.
DeylEnergy edited a comment on issue #2867:
URL: https://github.com/apache/couchdb/issues/2867#issuecomment-623861843


   Thank you @wohali Just installed ```libffi``` dependency and it's working now.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] wohali commented on issue #2867: Can't create user. Server responds with 500 Internal Server Error.

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #2867:
URL: https://github.com/apache/couchdb/issues/2867#issuecomment-623845078


   Can you share your logfile output from when the error occurred? I'm not sure where Arch places it, but in our packages it's usually in `/var/log/couchdb` or similar.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] wohali commented on issue #2867: Can't create user. Server responds with 500 Internal Server Error.

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #2867:
URL: https://github.com/apache/couchdb/issues/2867#issuecomment-623845233


   I also note that CouchDB 2.3.1 doesn't officially support Erlang 22, but perhaps the Arch community has provided their own downstream patches for compatibility...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] DeylEnergy commented on issue #2867: Can't create user. Server responds with 500 Internal Server Error.

Posted by GitBox <gi...@apache.org>.
DeylEnergy commented on issue #2867:
URL: https://github.com/apache/couchdb/issues/2867#issuecomment-623850392


   Here's the output, I start couchdb.service manually
   ```
   May 05 10:21:23 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:23.960819Z couchdb@127.0.0.1 <0.295.0> -------- rexi_buffer : cluster stable
   May 05 10:21:23 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:23.959978Z couchdb@127.0.0.1 <0.291.0> -------- rexi_server : cluster stable
   May 05 10:21:23 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:23.576165Z couchdb@127.0.0.1 <0.683.0> 5b095c6b37 localhost:5984 127.0.0.1 undefined PUT /_users/org.couchdb.user:jan 500 ok 5091
   May 05 10:21:23 dellpc couchdb[2716]: [error] 2020-05-05T04:21:23.561202Z couchdb@127.0.0.1 <0.741.0> -------- rexi_server: from: couchdb@127.0.0.1(<0.738.0>) mfa: fabric_rpc:update_docs/3 exit:{timeout,{gen_server,call,[couch_proc_manager,{get_proc,{doc,<<"_design/_auth">>,{1,[<<>
   May 05 10:21:18 dellpc couchdb[2716]: [error] 2020-05-05T04:21:18.579995Z couchdb@127.0.0.1 <0.755.0> -------- OS Process Error <0.756.0> :: {os_process_error,{exit_status,127}}
   May 05 10:21:18 dellpc couchdb[2773]: ./bin/couchjs: error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory
   May 05 10:21:14 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:14.069774Z couchdb@127.0.0.1 <0.421.0> -------- Started replicator db changes listener <0.556.0>
   May 05 10:21:14 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:14.061034Z couchdb@127.0.0.1 <0.376.0> -------- couch_replicator_clustering : cluster stable
   May 05 10:21:09 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:09.099178Z couchdb@127.0.0.1 <0.110.0> -------- config: [features] scheduler set to true for reason nil
   May 05 10:21:08 dellpc couchdb[2716]: [error] 2020-05-05T04:21:08.972105Z couchdb@127.0.0.1 <0.275.0> -------- Could not get design docs for <<"shards/e0000000-ffffffff/_users.1588035186">> error:{badarg,[{ets,member,[mem3_openers,<<"_users">>],[]},{mem3_shards,maybe_spawn_shard_w>
   May 05 10:21:08 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:08.966628Z couchdb@127.0.0.1 <0.295.0> -------- rexi_buffer : started servers
   May 05 10:21:08 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:08.959394Z couchdb@127.0.0.1 <0.291.0> -------- rexi_server : started servers
   May 05 10:21:08 dellpc couchdb[2716]: [info] 2020-05-05T04:21:08.937344Z couchdb@127.0.0.1 <0.227.0> -------- Apache CouchDB has started on http://127.0.0.1:5986/
   May 05 10:21:08 dellpc couchdb[2716]: [info] 2020-05-05T04:21:08.937070Z couchdb@127.0.0.1 <0.227.0> -------- Apache CouchDB has started. Time to relax.
   May 05 10:21:08 dellpc couchdb[2716]: [notice] 2020-05-05T04:21:08.815137Z couchdb@127.0.0.1 <0.110.0> -------- config: [features] pluggable-storage-engines set to true for reason nil
   May 05 10:21:08 dellpc couchdb[2716]: [info] 2020-05-05T04:21:08.802713Z couchdb@127.0.0.1 <0.228.0> -------- Starting couch_sup
   May 05 10:21:08 dellpc couchdb[2716]: [info] 2020-05-05T04:21:08.800442Z couchdb@127.0.0.1 <0.227.0> -------- Apache CouchDB 2.3.1 is starting.
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] wohali commented on issue #2867: Can't create user. Server responds with 500 Internal Server Error.

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #2867:
URL: https://github.com/apache/couchdb/issues/2867#issuecomment-623855687


   The error is:
   
   ```
   May 05 10:21:18 dellpc couchdb[2773]: ./bin/couchjs: error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory
   ```
   
   Your `libffi` is missing, or incompatible. Please speak to your distribution about fixing the CouchDB binary there.
   
   This is not a CouchDB bug.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org