{"id":2694,"date":"2022-09-05T11:38:02","date_gmt":"2022-09-05T11:38:02","guid":{"rendered":"https:\/\/salientsoft.co.uk\/?p=2694"},"modified":"2023-05-09T11:29:04","modified_gmt":"2023-05-09T11:29:04","slug":"reinstalling-apache-couchdb","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=2694","title":{"rendered":"Reinstalling Apache CouchDB"},"content":{"rendered":"\n<p><span style=\"text-decoration: underline;\"><strong>Update 9\/5\/23<\/strong><\/span><\/p>\n<p>I reinstalled the current latest version, V3.3.2, to try to solve an issue where I could not connect to Fauxton (In fact this was my mistake &#8211; I was effectively using 127.0.0.1:5984 rather than the actual IP address i.e. nodename:5984, having forgotton I had changed the binding in local.ini).<\/p>\n<p>After reinstalling, I edited local.ini and used my previous trick below to add a plaintext password and let couchDB encode it. However, couchDB seemed to ignore anything I placed in local.ini, and instead was using a file etc\\local.d\\10-admins.ini. When I editied this latter file, I could add the password correctly and it was honored (then encoded by CouchDB and replaced in the file).<\/p>\n<p>When reinstalling, I had simply uninstalled the old version via control panel, then installed the new one on top without removing any other existing files (in particular I left the existing database in place). It appears that the installer took my old custom settings and placed them in the above 10-admins.ini file.<\/p>\n<p>I have left this as it is at present but may change this later. <a href=\"https:\/\/docs.couchdb.org\/en\/stable\/config\/intro.html\"><strong>This page here<\/strong><\/a> gives a good intro to the configuration files, their precedence order and how to override stuff. <a href=\"https:\/\/docs.couchdb.org\/en\/stable\/config\/auth.html\"><strong>This section on authentication<\/strong><\/a> mentions the 10-admins.ini file which it says is present if you intall from a package like I did.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Original Post<\/strong><\/span><\/p>\n<p>I had a zip backup of a complete old version with data, but needed to locate the old release to reinstall on a new PC and reinstate the data<\/p>\n<p>MSIs of old releases can be found in the apache archive <a href=\"http:\/\/archive.apache.org\/dist\/couchdb\/binary\/win\/\"><strong>here\u00a0<\/strong><\/a><\/p>\n<p>If you look under the releases subfolder in the old installation there is a RELEASES text file which details the release information. Mine was release 2.0.0.<\/p>\n<p>The latest release at the time of posting is 3.2.2, but I was not clear that the data structures would be forwards compatible if I just restored all the previous data I had (this is one way that backup is proposed, as opposed to replicating to another server which I didn&#8217;t want to do).<\/p>\n<p>On issue was that I had temporarily forgotten the admin password.\u00a0<a href=\"https:\/\/stackoverflow.com\/questions\/9765809\/forgot-username-pwd-to-couchdb\"><strong>This post here<\/strong><\/a> details how to change an admin password manually if you forget &#8211; you can just change the hashed password against an admin user with a plaintext one, and CouchDB will detect this and swap it for the hashed version when it is next restarted.<\/p>\n<p>After installing v2.0.0, it would not fully start on Windows 11 &#8211; the service paused during startup. It did however run on an older Windows 10 pc, and also ran correctly when I restored all the data.<\/p>\n<p>I then tried the latest 3.2.2 version on the Windows 11 pc, and again restored the data. I had a couple of issues &#8211; one was an incorrect server name in the app config url which prevented access to the database. A second issue peculiar to V3.2.2 was that initially I got errors when trying to access the database from the app with no authentication (this simple legacy Proof of Concept was not authenticated). I then found in the user settings in V3 that by default there were admin roles specified which were preventing simple access with no authentication. Once I removed these, this solved the problem and access from the application worked correctly without authentication.<\/p>\n<p>This then worked fine &#8211; there were no compatibility issues with V2.0.0 data when restored under v3.2.2.<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update 9\/5\/23 I reinstalled the current latest version, V3.3.2, to try to solve an issue where I could not connect to Fauxton (In fact this was my mistake &#8211; I was effectively using 127.0.0.1:5984 rather than the actual IP address i.e. nodename:5984, having forgotton I had changed the binding in local.ini). After reinstalling, I edited [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[197,11,77],"tags":[16,15],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2694"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2694"}],"version-history":[{"count":8,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2694\/revisions"}],"predecessor-version":[{"id":2760,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2694\/revisions\/2760"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}