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 2017/11/11 15:04:17 UTC

[GitHub] realulim opened a new issue #982: Creating simple View in _users Database fails with "unknown_error"

realulim opened a new issue #982: Creating simple View in _users Database fails with "unknown_error"
URL: https://github.com/apache/couchdb/issues/982
 
 
   <!--- Provide a general summary of the issue in the Title above -->
   
   ## Expected Behavior
   I am trying to create a view that returns all users by their email address. This worked in earlier versions with the steps detailed below.
   
   ## Current Behavior
   The error message I am getting, when trying to create the view, is this:
   {"error":"unknown_error","reason":"undef","ref":2998209829}
   
   ## Steps to Reproduce (for bugs)
   0. cd /home/couchpotato
   1. mkdir tmp && cd tmp && wget http://mirror.synyx.de/apache/couchdb/source/2.1.1/apache-couchdb-2.1.1.tar.gz
   2. tar -xzf apache-couchdb-2.1.1.tar.gz && cd apache-couchdb-2.1.1 && ./configure && make release
   3. cp -R rel/couchdb ~/ && find ~/couchdb -type d -exec chmod 0770 {} \; && chmod 0644 ~/couchdb/etc/*
   4. find /home/couchpotato/couchdb -type d -exec chmod 0770 {} \;
   5. configure admin-password to be "admin" in local.ini
   6. systemctl start couchdb (as root via the unit file as provided below)
   7. verify CouchDB is running by curl -u admin:admin http://localhost:5984/_membership
   8. curl -s -X PUT -u admin:admin http://localhost:5984/_users
   9. curl -s -X PUT -u admin:admin http://localhost:5984/_replicator
   10. curl -s -X PUT -u admin:admin http://localhost:5984/_global_changes
   11. curl -s -u admin:admin -X PUT http://localhost:5984/_users/_design/User -d '@/home/couchpotato/User.json' (file User.json as provided below)
   
   ## Your Environment
   <!--- Include as many relevant details about the environment you experienced the bug in -->
   * Version used: 2.1.1
   * Browser Name and version: n/a
   * Operating System and version (desktop or mobile): CentOS Linux release 7.4.1708 (Core) 
   
   couchdb.service:
   [Unit]
   Description=Apache CouchDB
   Wants=network-online.target
   After=network-online.target
   
   [Service]
   RuntimeDirectory=couchdb
   User=couchpotato
   Group=couchpotato
   ExecStart=/home/couchpotato/couchdb/bin/couchdb
   Restart=always
   
   [Install]
   WantedBy=multi-user.target
   
   User.json:
   {
     "_id": "_design/User",
     "views": {
       "by_email": {
         "map": "function(doc) { if(doc.email) {emit(doc.email, doc._id)} }"
       }
     },
     "lists": {},
     "shows": {},
     "language": "javascript",
     "filters": {},
     "updates": {}
   }
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services