Re: Ubuntu update fails

2021-10-01 Thread Bill Stephenson

Thank you very much for the help Brian!

I fiddled around a bit using the info you've provided and did get the 
update to CoucDB 3.1.2 installed and working fine.


--

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com
1-417-546-8390



Re: Ubuntu update fails

2021-10-01 Thread Bill Stephenson

On 10/1/21 3:33 AM, Robert Newson wrote:


Hi,

Bintray went offline a while ago. Our official instructions and docs were 
updated ahead of that to point to the new location for our binary artefacts;

At https://docs.couchdb.org/en/stable/install/index.html check the "Installation 
using the Apache CouchDB convenience binary packages" section, we'll keep that up to 
date should it ever change again.


B.



Thank you Robert.

I have to assume my issue is my ignorance and I'm doing this wrong. I 
suspect it's because I don't know how to properly run these commands:


I've ran them one line at a time:

sudo apt update&&  sudo apt install -y curl apt-transport-https gnupg

curl https://couchdb.apache.org/repo/keys.asc|  gpg --dearmor|  sudo tee 
/usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null2>&1
source  /etc/os-release
echo  "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] 
https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME}main"  \

|  sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null


And just copied and pasted them all into the terminal:

sudo apt update&&  sudo apt install -y curl apt-transport-https gnupg
curl https://couchdb.apache.org/repo/keys.asc|  gpg --dearmor|  sudo tee 
/usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null2>&1
source  /etc/os-release
echo  "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] 
https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME}main"  \

|  sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null


I get the same result:

Err:14 https://apache.bintray.com/couchdb-deb xenial/main amd64 Packages
  403  Forbidden
Reading package lists... Done
W: The repository 'https://apache.bintray.com/couchdb-deb xenial 
Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore 
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.
E: Failed to fetch 
https://apache.bintray.com/couchdb-deb/dists/xenial/main/binary-amd64/Packages 
403  Forbidden
E: Some index files failed to download. They have been ignored, or old 
ones used instead.


I'll certainly appreciate any additional direction I can get on this.

--

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com
1-417-546-8390



Ubuntu update fails

2021-09-30 Thread Bill Stephenson
I'm trying to update my DigitalOcean VPS that has my CouchDB running on 
it and I get this error message:


        sudo apt-get update

   Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
   [109 kB]
   Hit:2 http://mirrors.digitalocean.com/ubuntu xenial InRelease
   Hit:3 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
   Hit:4 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
   Hit:5 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
   Hit:6 http://ppa.launchpad.net/ondrej/apache2/ubuntu xenial InRelease
   Ign:7 https://apache.bintray.com/couchdb-deb xenial InRelease
   Ign:8 https://apache.bintray.com/couchdb-deb bionic InRelease
   Ign:9 https://apache.bintray.com/couchdb-deb xenial Release
   Ign:10 https://apache.bintray.com/couchdb-deb bionic Release

   ...

   Err:19 https://apache.bintray.com/couchdb-deb xenial/main amd64 Packages
  403  Forbidden
   Err:20 https://apache.bintray.com/couchdb-deb bionic/main amd64 Packages
  403  Forbidden
   Fetched 109 kB in 4s (22.6 kB/s)
   Reading package lists... Done
   W: The repository 'https://apache.bintray.com/couchdb-deb xenial
   Release' does not have a Release file.
   N: Data from such a repository can't be authenticated and is
   therefore potentially dangerous to use.
   N: See apt-secure(8) manpage for repository creation and user
   configuration details.
   W: The repository 'https://apache.bintray.com/couchdb-deb bionic
   Release' does not have a Release file.
   N: Data from such a repository can't be authenticated and is
   therefore potentially dangerous to use.
   N: See apt-secure(8) manpage for repository creation and user
   configuration details.
   E: Failed to fetch
   
https://apache.bintray.com/couchdb-deb/dists/xenial/main/binary-amd64/Packages
   403  Forbidden
   E: Failed to fetch
   
https://apache.bintray.com/couchdb-deb/dists/bionic/main/binary-amd64/Packages
   403  Forbidden
   E: Some index files failed to download. They have been ignored, or
   old ones used instead.

I've never had an issue doing this before. Any ideas on where to go from 
here?



--

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com
1-417-546-8390



Re: Introducing: PouchDB-JsonViews, a JSON-based map/reduce interface

2021-07-22 Thread Bill Stephenson

That does sound cool! I'll have the check out asap.

Thank you!

On 7/22/21 2:27 PM, Diana Thayer wrote:

Howdy folks,

Inspired by Mango, I've written a plugin for PouchDB that adds a JSON-based
map/reduce interface called *JsonViews*. This plugin, called
PouchDB-JsonViews, allows you to build templated JavaScript views using a
simple document property accessor syntax (ex: 'foo', 'foo.bar'), a small
number of transforms, and a `splay` option for unrolling arrays.

This interface works against PouchDB and CouchDB alike! Hopefully it will
save you some headaches debugging unruly views by replacing them with
descriptive JSON rather than programmatic JavaScript. Under the hood,
PouchDB-JsonViews compiles JsonViews into JavaScript functions. This
compilation process is well-tested, with 100% test coverage.

You can read more about it on GitHub:
https://github.com/garbados/pouchdb-jsonviews

Let me know what you think :)

Best regards,
Diana


--

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com
1-417-546-8390



exporting text to JSON hangs on %27 character

2021-03-06 Thread Bill Stephenson
I’m using Perl to convert old CGI.pm “save” files to JSON that look like this:

c_name=Joseph%20Semeister
c_address1=9445%20Sofa%27s%20Mill%20Rd
c_address2=
c_city=Red%20Tree
c_state=PA
c_zip=17356
=

and loading them into a CouchDB (v. 3.1.1) with curl but files with that " %27 
“ string hang with an error:

malformed JSON string, neither tag, array, object, number, string or atom, at 
character offset 0 (before "(end of string)")

I’ve narrowed down the issue to that “%27” and I can remove that like so:

$myJSON =~ s/'//;

But that doesn’t preserve the original text string "9445 Sofa’s Mill Rd”.

I’m not savvy enough to call this a “bug” but this doesn’t break on other 
encoded text like “%20”. 

Anyone got any suggestions for how I might work around this?

--

Kindest Regards,

Bill Stephenson







letsencrypt SSL certs break when updated

2020-10-23 Thread Bill Stephenson
Awhile back I’d mentioned I was having a problem with letsencrypt certs not 
working after being auto-updated.

This happened again yesterday and the issue is caused by the certs ownership 
settings. 

My CouchDB is installed on a DigitalOcean VPS running Ubuntu 16.04

You can see the difference between the old and new certs below:

-rw-r--r-- 1 couchdb root 1903 Jul 23 22:12 cert6.pem
-rw-r--r-- 1 rootroot 1903 Oct 22 18:10 cert7.pem

-rw-r--r-- 1 couchdb root 1647 Jul 23 22:12 chain6.pem
-rw-r--r-- 1 rootroot 1647 Oct 22 18:10 chain7.pem

-rw-r--r-- 1 couchdb root 3550 Jul 23 22:12 fullchain6.pem
-rw-r--r-- 1 rootroot 3550 Oct 22 18:10 fullchain7.pem

-rw--- 1 couchdb root 1708 Jul 23 22:12 privkey6.pem
-rw--- 1 rootroot 1708 Oct 22 18:10 privkey7.pem


After the letsencrypt update the new certs ownership need to be reset like so:

sudo chown couchdb:root 
/opt/couchdb/letsencrypt/archive/cherrypc.com/cert7.pem

And should look like something like this:

-rw-r--r-- 1 couchdb root 1903 Oct 22 18:10 cert7.pem

-rw-r--r-- 1 couchdb root 1647 Oct 22 18:10 chain7.pem

-rw-r--r-- 1 couchdb root 3550 Oct 22 18:10 fullchain7.pem

-rw--- 1 couchdb root 1708 Oct 22 18:10 privkey7.pem


( Hopefully sharing this here will help me remember this 3 months from now :D )

--

Kindest Regards,

Bill Stephenson





Re: Local-First apps and CouchDB

2020-08-06 Thread Bill Stephenson
Well that explains a lot. I’m not really surprised, but I am amazed he didn’t 
take advantage of the opportunity to learn from you. That just leaves me 
shaking my head.

--

Kindest Regards,

Bill Stephenson





> On Aug 6, 2020, at 10:41 AM, Jan Lehnardt  wrote:
> 
> The author of this sadly has demonstrated multiple times that they don’t 
> understand CouchDB very well, and despite my outreach, wasn’t open to 
> learning any more. I’m not sure if this is a personal choice, or a reflection 
> of few scientific papers existing around CouchDB, but it’s worth noting.
> 
> Best
> Jan
> —
> 
>> On 6. Aug 2020, at 00:09, Bill Stephenson  wrote:
>> 
>> There have been 3 submissions of a paper about "Local-First" apps 
>> (https://www.inkandswitch.com/local-first.html 
>> <https://www.inkandswitch.com/local-first.html>) to Hacker News in the past 
>> week. Twice it made it to the front page and the most recent was there most 
>> all day and was still on the 2nd page the next morning. 
>> 
>> The paper mentions and discusses CouchDB but I think it drifts quickly from 
>> the subject of "Local-First” apps to conflict resolution and overlooked 
>> using CouchDB as a data storage layer for Local-First apps.
>> 
>> I thought it’s worth mentioning here because CouchDB makes it easy for both 
>> devs and users to create and install a Local-First app. A couple months ago 
>> I made a very simple demo app that demonstrates one way to do that. I posted 
>> a link to it in the comments on those HN posts and it seemed to generate a 
>> little interest so I thought I’d share it here too...
>> 
>> https://cherrypc.com/app/editor/setup.html 
>> <https://cherrypc.com/app/editor/setup.html>
>> 
>> --
>> 
>> Bill Stephenson
>> 
>> 
>> 
>> 
>> 



Local-First apps and CouchDB

2020-08-05 Thread Bill Stephenson
There have been 3 submissions of a paper about "Local-First" apps 
(https://www.inkandswitch.com/local-first.html 
<https://www.inkandswitch.com/local-first.html>) to Hacker News in the past 
week. Twice it made it to the front page and the most recent was there most all 
day and was still on the 2nd page the next morning. 

The paper mentions and discusses CouchDB but I think it drifts quickly from the 
subject of "Local-First” apps to conflict resolution and overlooked using 
CouchDB as a data storage layer for Local-First apps.

I thought it’s worth mentioning here because CouchDB makes it easy for both 
devs and users to create and install a Local-First app. A couple months ago I 
made a very simple demo app that demonstrates one way to do that. I posted a 
link to it in the comments on those HN posts and it seemed to generate a little 
interest so I thought I’d share it here too...

https://cherrypc.com/app/editor/setup.html 
<https://cherrypc.com/app/editor/setup.html>

--

Bill Stephenson







Re: help for couchDB

2020-05-22 Thread Bill Stephenson
I’ll send him a note. I’m no “expert” but I can maybe help get him started.

Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On May 22, 2020, at 10:35 PM, Joan Touzet  wrote:
> 
> I received this private email. I don't have time to answer it, but if anyone 
> wants, feel free to respond to Lei directly.
> 
> -Joan
> 
>  Forwarded Message 
> Subject:  help for couchDB
> Date: Sat, 23 May 2020 09:27:39 +0800
> From: Lei Zhang 
> To:   woh...@apache.org
> 
> 
> 
> Hi Joan,
> This is Lei from China, I am new to CouchDB , and right now I am doing 
> some research on CouchDB.  I am writing this email to get some help from you 
> expert.
>Could you please give me some Video on how to use the CouchDB ?  so I can 
> operate the CouchDB asap.
> 
> Many thanks
> Lei



Re: can't get couchdb to work on https

2020-05-15 Thread Bill Stephenson
I don’t check into Reddit much but I saw this post there today that’s worth 
checking into:

CouchDB 3 setup on Ubuntu 18.04 
<https://konstruktor.ee/couchdb-setup-on-ubuntu/>



Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On May 2, 2020, at 9:38 PM, Bill Stephenson  wrote:
> 
> Thank you Joan!
> 
> I’ll look into both those suggestions when I get a chance and I’ll report 
> back on the results.
> 
> Kindest Regards,
> 
> Bill Stephenson
> Tech Support
> www.cherrypc.com <http://www.ezinvoice.com/>
> 1-417-546-8390
> 
> 
> 
> 
>> On May 1, 2020, at 2:26 PM, Joan Touzet  wrote:
>> 
>> Hi Bill,
>> 
>> haproxy should be as simple as installing the binary on your *NIX platform, 
>> then using something similar to our shipped configuration:
>> 
>> https://docs.couchdb.org/en/latest/best-practices/reverse-proxies.html?highlight=haproxy#reverse-proxying-with-haproxy
>> 
>> 
>> Also, I see this walkthrough is referenced elsewhere as working for Let's 
>> Encrypt and CouchDB:
>> 
>> https://www.joshmorony.com/creating-a-couchdb-database-on-an-ubuntu-server-digital-ocean/
>> 
>> Hope they help,
>> Joan "3.0.1 and 3.1.0 out hopefully next week" Touzet
> 



3.1.0 update installed

2020-05-05 Thread Bill Stephenson
Just though I’d pass on the 3.1.0 update on my DigitalOcean vps Ubuntu 16.04 
went smooth as a glass this afternoon.

I want to thank the team that made this possible. You all have been working 
your tails off and it’s very much appreciated.

Kindest Regards,

Bill Stephenson






Re: Back to "Admin Party"

2020-05-04 Thread Bill Stephenson
Thank you Robert. 

I didn’t know that.

I tried to install 3.0 on my old mac but I had some issues uninstalling the the 
old 2.3.0 version. I finally did, but I ended up replacing it with 2.3.1 and 
left it there. 

-Bill 




Re: Back to "Admin Party"

2020-05-04 Thread Bill Stephenson
Thank you Joan!

It took me some time to figure our where those CouchDB config files are on my 
Mac but I did get it back to “Admin Party” and got some testing done.

What I want to play with is configuring my web apps to use a locally installed 
CouchDB instead of my internet based CouchDB server. I think this can be a 
pretty cool option for end users. All their data is in their hands and control 
and they have options to backup their data onsite and offsite, and using 3rd 
party services. My initial tests show my app to be a lot faster, which should 
be expected because it’s not running over the internet at all. 

I’m not thinking using “Admin Party” is the best option, but it may be the 
easiest for end users so I wanted to look at how that would work.  

With PouchDB.js I can create a DB for the user, and a “_user” file, and some 
files in their DB that my apps use. I’ve not figured out how to create a 
“_security” file for a user’s DB with PouchDB yet, but I’m not sure I can’t. 

I know there are some issues using this approach. For example, before I got my 
CouchDB back to "Admin Party” I had to create a form field that contains the 
user’s CouchDB admin credentials. That’s not good. And with "Admin Party” a web 
app could potentially grab all a user’s data. 

 And there are surely some issues I don’t know of yet, but it’s a pretty cool 
way to approach that component of developing and using web apps if it can be 
secure and I’d like to work with it. 

Any thoughts on this?

—Bill


> On May 3, 2020, at 2:51 PM, Joan Touzet  wrote:
> 
> Remove all admin users defined in [admins].
> 
> On 2020-05-03 3:23 p.m., Bill Stephenson wrote:
>> No, I want to play with it a bit to see how I can use it in Admin Party mode 
>> (as if I just installed it).
>> —Bill
>>> On May 3, 2020, at 2:19 PM, Daniel Holth  wrote:
>>> 
>>> Do you want to find the local.ini and put a new password in? It'll encode
>>> the plaintext password typed into the correct .ini field
>>> 
>>> On Sun, May 3, 2020, 3:18 PM Bill Stephenson 
>>> wrote:
>>> 
>>>> Is there way to reset my CouchDB (2.3.0) to "Admin Party" that I installed
>>>> on my Mac Mini?
>>>> 
>>>> 
>>>> -Bill
>>>> 
>>>> 
>>>> 



Re: Back to "Admin Party"

2020-05-03 Thread Bill Stephenson
No, I want to play with it a bit to see how I can use it in Admin Party mode 
(as if I just installed it). 

—Bill



> On May 3, 2020, at 2:19 PM, Daniel Holth  wrote:
> 
> Do you want to find the local.ini and put a new password in? It'll encode
> the plaintext password typed into the correct .ini field
> 
> On Sun, May 3, 2020, 3:18 PM Bill Stephenson 
> wrote:
> 
>> Is there way to reset my CouchDB (2.3.0) to "Admin Party" that I installed
>> on my Mac Mini?
>> 
>> 
>> -Bill
>> 
>> 
>> 



Back to "Admin Party"

2020-05-03 Thread Bill Stephenson
Is there way to reset my CouchDB (2.3.0) to "Admin Party" that I installed on 
my Mac Mini?


-Bill




Re: can't get couchdb to work on https

2020-05-02 Thread Bill Stephenson
Thank you Joan!

I’ll look into both those suggestions when I get a chance and I’ll report back 
on the results.

Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On May 1, 2020, at 2:26 PM, Joan Touzet  wrote:
> 
> Hi Bill,
> 
> haproxy should be as simple as installing the binary on your *NIX platform, 
> then using something similar to our shipped configuration:
> 
> https://docs.couchdb.org/en/latest/best-practices/reverse-proxies.html?highlight=haproxy#reverse-proxying-with-haproxy
> 
> 
> Also, I see this walkthrough is referenced elsewhere as working for Let's 
> Encrypt and CouchDB:
> 
> https://www.joshmorony.com/creating-a-couchdb-database-on-an-ubuntu-server-digital-ocean/
> 
> Hope they help,
> Joan "3.0.1 and 3.1.0 out hopefully next week" Touzet



Re: can't get couchdb to work on https

2020-05-01 Thread Bill Stephenson
FWIW, I tried the instructions I provided earlier this week and didn’t get them 
to work again. I don’t know if it’s a change made by Let’s Encrypt or I forget 
exactly what I did. 

I’ll go through the process setting up a Digital Ocean vps again as soon as I 
get some time because getting those certs configured has always been a bit of a 
pain and it’d be a good thing to nail that process down.

If anyone has a list of instruction on setting up haproxy they can share I’d be 
glad to have them and give that a shot too.


Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On Apr 30, 2020, at 3:56 PM, Joan Touzet  wrote:
> 
> On 2020-04-30 16:22, Rene Veerman wrote:
>> i'm really only looking for a quick and easy way to getting https to work
>> again..
> 
> Bill Stephenson gave you a step-by-step that seemed reasonable to me.
> 
>> do the creators of couchdb read this mailinglist?
> 
> Yes.
> 
> Most of us terminate SSL ahead of CouchDB at a reverse proxy (such as 
> haproxy). Some of us have even contemplated dropping native SSL support in 
> CouchDB entirely, because configuring it is a bit of a pain, as you've found. 
> But it can be done, and it does work.
> 
> For SSL in pure CouchDB, when I must, I use something like EasyRSA:
> 
>  https://github.com/OpenVPN/easy-rsa
> 
> to generate the certs, then munge them together and start it. It works OK. 
> But I do this about once every 2 years max.
> 
> -Joan "Erlang's SSL support isn't great" Touzet
> 
> 
>> On Sun, Apr 26, 2020 at 3:04 PM Joel Jucá  wrote:
>>> Rene,
>>> 
>>> Your problem seems to be infrastructure-related, rather than CouchDB
>>> related. I would recommend you to read about Infrastructure as Code. This
>>> is a practice that allows a developer to declare its infrastructure (in
>>> your specific case, server configuration) and have some sort of
>>> reproducibility from it. Then, you could also understand every single
>>> change made to your server infrastructure - and even share it as a Gist,
>>> for instance, and have some sort of feedback/pull request directly on it.
>>> 
>>> I would recommend you Ansible (
>>> https://www.ansible.com/resources/get-started).
>>> It's a great solution that allows you to declare your server configuration
>>> as YAML files and use it within Ansible CLI to reproduce the declared
>>> configuration on a targeted server (eg: your Ubuntu-powered CouchDB
>>> server).
>>> 
>>> I've struggled a lot with server configuration back in 2010-2012 when I was
>>> a full-stack PHP/Drupal developer, and after discovering Ansible I could
>>> never imagine myself handling performing a complex task (server
>>> configuration) manually!
>>> 
>>> I hope it helps you in some way.
>>> 
>>> On Sat, Apr 25, 2020 at 6:28 PM Rene Veerman 
>>> wrote:
>>> 
>>>> yes, i did..
>>>> 
>>>> On Sat, Apr 25, 2020 at 9:16 PM Bill Stephenson
>>> >>>> 
>>>> wrote:
>>>> 
>>>>> Did you do a "sudo ufw allow 6984”?
>>>>> 
>>>>> 
>>>>> Kindest Regards,
>>>>> 
>>>>> Bill Stephenson
>>>>> Tech Support
>>>>> www.cherrypc.com <http://www.ezinvoice.com/>
>>>>> 1-417-546-8390
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Apr 25, 2020, at 9:28 AM, Rene Veerman 
>>>>> wrote:
>>>>>> 
>>>>>> also (FYI) : i have already entered the right port forwarding
>>> commands
>>>>> into
>>>>>> my ADSL modem..
>>>>>> 
>>>>>> On Sat, Apr 25, 2020 at 4:21 PM Rene Veerman <
>>> seductivea...@gmail.com>
>>>>>> wrote:
>>>>>> 
>>>>>>> that gets me a 'connection refused' :
>>>>>>> 
>>>>>>> ('albatross' === localhost === nicer.app)
>>>>>>> 
>>>>>>> root@albatross:/opt/couchdb/letsencrypt# service couchdb stop
>>>>>>> root@albatross:/opt/couchdb/letsencrypt# telnet localhost 6984
>>>>>>> Trying 127.0.0.1...
>>>>>>> telnet: Unable to connect to remote host: Connection refused
>>>>>>> root@albatross:/opt/couchdb/letsencrypt# telnet nicer.app 6984
>>>>>>> Trying 127.0.0.1...
>>>>>>>

Re: can't get couchdb to work on https

2020-04-25 Thread Bill Stephenson
Did you do a "sudo ufw allow 6984”?


Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On Apr 25, 2020, at 9:28 AM, Rene Veerman  wrote:
> 
> also (FYI) : i have already entered the right port forwarding commands into
> my ADSL modem..
> 
> On Sat, Apr 25, 2020 at 4:21 PM Rene Veerman 
> wrote:
> 
>> that gets me a 'connection refused' :
>> 
>> ('albatross' === localhost === nicer.app)
>> 
>> root@albatross:/opt/couchdb/letsencrypt# service couchdb stop
>> root@albatross:/opt/couchdb/letsencrypt# telnet localhost 6984
>> Trying 127.0.0.1...
>> telnet: Unable to connect to remote host: Connection refused
>> root@albatross:/opt/couchdb/letsencrypt# telnet nicer.app 6984
>> Trying 127.0.0.1...
>> Trying 82.161.37.94...
>> telnet: Unable to connect to remote host: Connection refused
>> root@albatross:/opt/couchdb/letsencrypt#
>> 
>> On Sat, Apr 25, 2020 at 1:41 PM Florian Westreicher 
>> wrote:
>> 
>>> Did you try to telnet to the port while couchdb is down? If there is no
>>> open port, telnet won't connect.
>>> 
>>> 
>>> On April 25, 2020 03:50:56 Rene Veerman  wrote:
>>> 
>>>>> 
>>>>> unfortunately that didn't fix things either. i'm still stuck at the
>>>>> eaddrinuse error..
>>>>> 
>>>> 
>>>> [info] 2020-04-25T01:49:15.730815Z couchdb@127.0.0.1 <0.232.0> 
>>>> Apache CouchDB has started on https://0.0.0.0:6984/
>>>> [info] 2020-04-25T01:49:15.731032Z couchdb@127.0.0.1 <0.11.0> 
>>>> Application couch started on node 'couchdb@127.0.0.1'
>>>> [info] 2020-04-25T01:49:15.731178Z couchdb@127.0.0.1 <0.11.0> 
>>>> Application ets_lru started on node 'couchdb@127.0.0.1'
>>>> [notice] 2020-04-25T01:49:15.737605Z couchdb@127.0.0.1 <0.284.0>
>>> 
>>>> rexi_server : started servers
>>>> [notice] 2020-04-25T01:49:15.738914Z couchdb@127.0.0.1 <0.288.0>
>>> 
>>>> rexi_buffer : started servers
>>>> [info] 2020-04-25T01:49:15.739062Z couchdb@127.0.0.1 <0.11.0> 
>>>> Application rexi started on node 'couchdb@127.0.0.1'
>>>> [notice] 2020-04-25T01:49:15.786354Z couchdb@127.0.0.1 <0.318.0>
>>> 
>>>> mem3_reshard_dbdoc start init()
>>>> [notice] 2020-04-25T01:49:15.790014Z couchdb@127.0.0.1 <0.320.0>
>>> 
>>>> mem3_reshard start init()
>>>> [notice] 2020-04-25T01:49:15.790112Z couchdb@127.0.0.1 <0.321.0>
>>> 
>>>> mem3_reshard db monitor <0.321.0> starting
>>>> [notice] 2020-04-25T01:49:15.792025Z couchdb@127.0.0.1 <0.320.0>
>>> 
>>>> mem3_reshard starting reloading jobs
>>>> [notice] 2020-04-25T01:49:15.792087Z couchdb@127.0.0.1 <0.320.0>
>>> 
>>>> mem3_reshard finished reloading jobs
>>>> [info] 2020-04-25T01:49:15.792900Z couchdb@127.0.0.1 <0.11.0> 
>>>> Application mem3 started on node 'couchdb@127.0.0.1'
>>>> [info] 2020-04-25T01:49:15.793024Z couchdb@127.0.0.1 <0.11.0> 
>>>> Application fabric started on node 'couchdb@127.0.0.1'
>>>> [error] 2020-04-25T01:49:15.796505Z couchdb@127.0.0.1 <0.330.0>
>>> 
>>>> CRASH REPORT Process  (<0.330.0>) with 0 neighbors exited with reason:
>>>> eaddrinuse at gen_server:init_it/6(line:349) <=
>>>> proc_lib:init_p_do_apply/3(line:247); initial_call:
>>>> {mochiweb_socket_server,init,['Argument__1']}, ancestors:
>>>> [chttpd_sup,<0.327.0>], message_queue_len: 0, messages: [], links:
>>>> [<0.328.0>], dictionary: [], trap_exit: true, status: running,
>>> heap_size:
>>>> 376, stack_size: 27, reductions: 990
>>>> [error] 2020-04-25T01:49:15.796670Z couchdb@127.0.0.1 <0.328.0>
>>> 
>>>> Supervisor chttpd_sup had child chttpd started with chttpd:start_link()
>>> at
>>>> undefined exit with reason eaddrinuse in context start_error
>>>> [error] 2020-04-25T01:49:15.796942Z couchdb@127.0.0.1 <0.326.0>
>>> 
>>>> CRASH REPORT Process  (<0.326.0>) with 0 neighbors exited with reason:
>>>> 
>>> {{shutdown,{failed_to_start_child,chttpd,eaddrinuse}},{chttpd_app,start,[normal,[]]}}
>>>> at application_master:init/4(line:134) <=
>>>> proc_lib:init_p_do_apply/3(line:247); initial_call:
>>>> {application_master,init,['Argument__1',...]}, ancestors: [<0.325.0>],
>>>> message_queue_len: 1, messages: [{'EXIT',<0.327.0>,normal}], links:
>>>> [<0.325.0>,<0.11.0>], dictionary: [], trap_exit: true, status: running,
>>>> heap_size: 376, stack_size: 27, reductions: 172
>>>> [info] 2020-04-25T01:49:15.797060Z couchdb@127.0.0.1 <0.11.0> 
>>>> Application chttpd exited with reason:
>>>> 
>>> {{shutdown,{failed_to_start_child,chttpd,eaddrinuse}},{chttpd_app,start,[normal,[]]}}
>>>> [info] 2020-04-25T01:49:17.882186Z couchdb@127.0.0.1 <0.11.0> 
>>>> Application couch_log started on node 'couchdb@127.0.0.1'
>>> 
>>> 
>>> 
>>> 



Re: can't get couchdb to work on https

2020-04-24 Thread Bill Stephenson
Well this is weird… my couchdb server was having pretty much the same issue as 
yours today. 

CouchDB log file said this when I tried to load Fauxton:

[error] 2020-04-24T21:06:02.289764Z couchdb@127.0.0.1 <0.27393.0>  
application: mochiweb, "Accept failed error", 
"{error,{options,{keyfile,\"/opt/couchdb/letsencrypt/live/cherrypc.com/privkey.pem\",\n
 {error,eacces"

[error] 2020-04-24T21:06:02.29Z couchdb@127.0.0.1 <0.27393.0>  
CRASH REPORT Process  (<0.27393.0>) with 0 neighbors exited with reason: 
{error,accept_failed} at mochiweb_acceptor:init/4(line:71) <= 
proc_lib:init_p_do_apply/3(line:247); initial_call: 
{mochiweb_acceptor,init,['Argument__1','Argument__2',...]}, ancestors: 
[https,couch_secondary_services,couch_sup,...], message_queue_len: 0, messages: 
[], links: [<0.254.0>], dictionary: [], trap_exit: false, status: running, 
heap_size: 1598, stack_size: 27, reductions: 1983


I ran certbot a few times and it didn’t fix it. It told me the certs were fine.

I looked at the cert files and found that the ownership on the new certs were 
different than the old ones and so were the permissions on the chain.pem.

me@couchdb:~$ sudo ls -l /opt/couchdb/letsencrypt/archive/cherrypc.com/

-rw--- 1 couchdb root 1903 Jan 25 19:18 cert4.pem
-rw-r--r-- 1 rootroot 1903 Apr 24 19:40 cert5.pem
-rw-r--r-- 1 couchdb root 1647 Jan 25 19:18 chain4.pem
-rw-r--r-- 1 rootroot 1647 Apr 24 19:40 chain5.pem
-rw--- 1 couchdb root 3550 Jan 25 19:18 fullchain4.pem
-rw-r--r-- 1 rootroot 3550 Apr 24 19:40 fullchain5.pem
-rw--- 1 couchdb root 1704 Jan 25 19:18 privkey4.pem
-rw--- 1 rootroot 1704 Apr 24 19:40 privkey5.pem


I made these changes

1st change...

sudo chown couchdb:root /opt/couchdb/letsencrypt/archive/cherrypc.com/cert5.pem 


sudo chown couchdb:root /opt/couchdb/letsencrypt/archive/cherrypc.com/chain5.pem

sudo chown couchdb:root 
/opt/couchdb/letsencrypt/archive/cherrypc.com/fullchain5.pem

sudo chown couchdb:root 
/opt/couchdb/letsencrypt/archive/cherrypc.com/privkey5.pem


2nd change...


sudo chmod 600 /opt/couchdb/letsencrypt/archive/cherrypc.com/fullchain5.pem 


And restarted CouchDB:

sudo /etc/init.d/couchdb restart

That got me back up and running. So, I think what may have happened is the cert 
was auto renewed this morning and when that happened the ownership and 
permissions were not set correctly on the new certs.

I don’t know if this will help you, but it’s worth checking into. 

—

Bill





Re: can't get couchdb to work on https

2020-04-23 Thread Bill Stephenson
I’ve look at Linode, and I know a lot devs prefer their services. I moved to DO 
around 5 years ago I suppose now. Every now and then I consider switching, but 
that’d be a process.

I don’t think I installed a web server on that droplet. 

One of the things I wanted to do was see if I could connect my apps to it that 
are running on a different VPS there, which I did with no problem. I’m pretty 
sure I made the snapshot right after I tested that and then played with the VPS 
for another week or so before shutting it off. Just before I shut it off I did 
an update & upgrade on my production CouchDB server and it upgraded CouchDB to 
3.0. I really didn’t expect that but it went smooth as a baby’s butt so that’s 
what I’m using now, 

--,

Bill 




> On Apr 23, 2020, at 10:59 PM, Bill Stephenson  
> wrote:
> 
> Well, it shouldn’t muck anything up to try the Let’s Encrypt route, and it 
> doesn’t cost anything. 
> 
> I have a Digital Ocean “snapshot” of an Ubuntu 18.04 server with CouchDB 3.0 
> & SSL installed on it I set up last month. I didn’t install anything else on 
> it. I just wanted to go through the process and keep a snapshot so I could 
> spin up a new server if I need one. Digital Ocean makes it easy to transfer 
> ownership of a  “droplet” (VPS) so that’s another option you can consider. I 
> think I installed on a $10 a month “droplet” (might have been $20) and those 
> are easy to upgrade if you need something bigger.
> 
> 
> Kindest Regards,
> 
> Bill 
> 
> 
> 
> 
>> On Apr 23, 2020, at 10:06 PM, Travis Klein  wrote:
>> 
>> I do my https to my proxy server then connect to couch using http locally. 
>> You could try that if you can’t get it to work
>> 
> 



Re: can't get couchdb to work on https

2020-04-23 Thread Bill Stephenson
Well, it shouldn’t muck anything up to try the Let’s Encrypt route, and it 
doesn’t cost anything. 

I have a Digital Ocean “snapshot” of an Ubuntu 18.04 server with CouchDB 3.0 & 
SSL installed on it I set up last month. I didn’t install anything else on it. 
I just wanted to go through the process and keep a snapshot so I could spin up 
a new server if I need one. Digital Ocean makes it easy to transfer ownership 
of a  “droplet” (VPS) so that’s another option you can consider. I think I 
installed on a $10 a month “droplet” (might have been $20) and those are easy 
to upgrade if you need something bigger.


Kindest Regards,

Bill 




> On Apr 23, 2020, at 10:06 PM, Travis Klein  wrote:
> 
> I do my https to my proxy server then connect to couch using http locally. 
> You could try that if you can’t get it to work
> 



Re: can't get couchdb to work on https

2020-04-23 Thread Bill Stephenson
Hi Rene

I have these notes on configuring SSL using certbot:

#Configuring the Firewall
sudo ufw allow 5984
sudo ufw allow 6984


## Configure SSL - Lets Encrypt

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache 

sudo mkdir /opt/couchdb/letsencrypt

sudo certbot certonly --webroot -w /var/www/YOUR.com --config-dir 
/opt/couchdb/letsencrypt --logs-dir /var/log/couchdb -d YOUR.com


sudo certbot certonly --webroot -w /var/www/html --config-dir 
/opt/couchdb/letsencrypt --logs-dir /var/log/couchdb -d YOUR.com

sudo chmod 600 /opt/couchdb/letsencrypt/live/YOUR.com/cert.pem
sudo chmod 600 /opt/couchdb/letsencrypt/live/YOUR.com/privkey.pem
sudo chmod 600 /opt/couchdb/letsencrypt/live/YOUR.com/fullchain.pem

# set the permissions on the files to the following:

sudo chmod 600 /opt/couchdb/letsencrypt/live/YOUR.com/cert.pem
sudo chmod 600 /opt/couchdb/letsencrypt/live/YOUR.com/privkey.pem
sudo chmod 600 /opt/couchdb/letsencrypt/live/YOUR.com/fullchain.pem

sudo chown -R couchdb /opt/couchdb/letsencrypt/

sudo nano /opt/couchdb/etc/local.ini

# You will need to modify the following entries:

port = 6984
cert_file = /opt/couchdb/letsencrypt/live/YOUR.com/cert.pem
key_file = /opt/couchdb/letsencrypt/live/YOUR.com/privkey.pem
cacert_file = /opt/couchdb/letsencrypt/live/YOUR.com/fullchain.pem 
<http://your.com/fullchain.pem>

test it at: https://YOUR.com:6984/_utils/

—

Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On Apr 23, 2020, at 9:36 PM, Rene Veerman  wrote:
> 
> i've installed couchdb on ubuntu-18.04, have modified
> /opt/couchdb/etc/local.ini to use the proper https certificates, but i
> can't get a connection to https://mydomain.com:5984 going at all.
> there is nothing of use in /var/log/couchdb/couchdb.log,
> and all i get in the browser is a connection timedout error.
> 
> can someone please help me?
> my entire stack of business logic that i had built to run on top of couchdb
> is unusable at the moment..



Re: [DISCUSS] moving email lists to Discourse

2020-03-12 Thread Bill Stephenson
I got your previous message just moments before I sent this one, and read it 
afterwards. 

I had no idea there was so many specs on something like this, but it makes 
sense there are. 

Kindest Regards,

Bill Stephenson



> On Mar 12, 2020, at 12:33 PM, Joan Touzet  wrote:
> 
> Hi Bill,
> 
> On 2020-03-12 13:28, Bill Stephenson wrote:
>> I’ve recently pointed a few people on Reddit to this mailing list who were 
>> asking questions there. A forum would probably be a good thing to have.
>> I’m not familiar with Discourse but it looks pretty simple to spin up a 
>> digital ocean vps. 
>> <https://marketplace.digitalocean.com/apps/discourse?utm_campaign=marketplace_source=marketplace#api-creation>
>>   “Mail-in-a-box <https://mailinabox.email/>” makes it pretty easy to set up 
>> an email server. DigitalOcean probably isn’t the best platform for that. I 
>> have one I setup there but it took some time to get the larger mail 
>> providers to unblock it. That’s probably the case no matter how you approach 
>> that though. Using a 3rd party service like MailChimp might be easier but 
>> would probably cost more.
>> Unfortunately I’m not in a position to donate any cash to this but I could 
>> spend some time on getting Discourse up and running on a DO vps if that’s a 
>> viable option.
> 
> Please don't take this step. Apache Infra needs to be aware of what's going 
> on, and fully support whatever approach is taken. Our community cannot be 
> seen to be "going around them" without some severe backlash.
> 
> As I mentioned in my other email, let's work together with them to make this 
> happen.
> 
> -Joan
> 
>> Kindest Regards,
>> Bill Stephenson
>>> On Mar 12, 2020, at 9:32 AM, Garren Smith  wrote:
>>> 
>>> Hi All,
>>> 
>>> The CouchDB slack channel has been a real success with lots of people
>>> asking for help and getting involved. The main issue is that it is not
>>> searchable so we often get people asking the same questions over and over.
>>> The user mailing list is great in that sense that if you have subscribed to
>>> it you have a searchable list of questions and answers. However, it's
>>> really not user-friendly and judging by the fact that it has very low user
>>> participation I'm guessing most people prefer to use slack to ask questions.
>>> 
>>> I've been really impressed with how the FoundationDB forum[1] and the rust
>>> internal forum work [2]. I find them easy to use and really encourage
>>> participation. I would like to propose that we move our user and dev
>>> discussion to Discourse or a forum that works as well as Discourse. I think
>>> that would make it really easy for users of CouchDB to look up answers to
>>> questions and get involved in the development discussion.
>>> 
>>> I haven't checked yet, but I'm sure we could get all discourse threads to
>>> automatically email back to the user and dev mailing list so that we still
>>> fulfill our Apache requirements.
>>> 
>>> I know its a big step away from what we're used to with our mailing lists,
>>> but I think it would definitely open up our community.
>>> 
>>> Cheers
>>> Garren
>>> 
>>> 
>>> [1] https://forums.foundationdb.org/
>>> [2] https://internals.rust-lang.org/



Re: [DISCUSS] moving email lists to Discourse

2020-03-12 Thread Bill Stephenson
I’ve recently pointed a few people on Reddit to this mailing list who were 
asking questions there. A forum would probably be a good thing to have. 

I’m not familiar with Discourse but it looks pretty simple to spin up a digital 
ocean vps. 
<https://marketplace.digitalocean.com/apps/discourse?utm_campaign=marketplace_source=marketplace#api-creation>
  “Mail-in-a-box <https://mailinabox.email/>” makes it pretty easy to set up an 
email server. DigitalOcean probably isn’t the best platform for that. I have 
one I setup there but it took some time to get the larger mail providers to 
unblock it. That’s probably the case no matter how you approach that though. 
Using a 3rd party service like MailChimp might be easier but would probably 
cost more.

Unfortunately I’m not in a position to donate any cash to this but I could 
spend some time on getting Discourse up and running on a DO vps if that’s a 
viable option. 

Kindest Regards,

Bill Stephenson





> On Mar 12, 2020, at 9:32 AM, Garren Smith  wrote:
> 
> Hi All,
> 
> The CouchDB slack channel has been a real success with lots of people
> asking for help and getting involved. The main issue is that it is not
> searchable so we often get people asking the same questions over and over.
> The user mailing list is great in that sense that if you have subscribed to
> it you have a searchable list of questions and answers. However, it's
> really not user-friendly and judging by the fact that it has very low user
> participation I'm guessing most people prefer to use slack to ask questions.
> 
> I've been really impressed with how the FoundationDB forum[1] and the rust
> internal forum work [2]. I find them easy to use and really encourage
> participation. I would like to propose that we move our user and dev
> discussion to Discourse or a forum that works as well as Discourse. I think
> that would make it really easy for users of CouchDB to look up answers to
> questions and get involved in the development discussion.
> 
> I haven't checked yet, but I'm sure we could get all discourse threads to
> automatically email back to the user and dev mailing list so that we still
> fulfill our Apache requirements.
> 
> I know its a big step away from what we're used to with our mailing lists,
> but I think it would definitely open up our community.
> 
> Cheers
> Garren
> 
> 
> [1] https://forums.foundationdb.org/
> [2] https://internals.rust-lang.org/



Re: CouchDB SSL issue

2019-12-04 Thread Bill Stephenson
I have these notes on installing CouchDB with certbot to install an SSL cert on 
a DigitalOcean Ubuntu 16.04 vps.

Maybe they will help...


## Configure SSL - Lets Encrypt

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache

sudo mkdir /opt/couchdb/letsencrypt
sudo certbot certonly --webroot -w /var/www/cherrypc --config-dir 
/opt/couchdb/letsencrypt --logs-dir /var/log/couchdb -d cherrypc.com

sudo chmod 600 /opt/couchdb/letsencrypt/live/cherrypc.com/cert.pem
sudo chmod 600 /opt/couchdb/letsencrypt/live/cherrypc.com/privkey.pem
sudo chmod 600 /opt/couchdb/letsencrypt/live/cherrypc.com/fullchain.pem
sudo chown -R couchdb /opt/couchdb/letsencrypt/

sudo nano /opt/couchdb/etc/local.ini

## You will need to modify the following entries:

[daemons]
; enable SSL support by uncommenting the following line and supply the PEM's 
below.
; the default ssl port CouchDB listens on is 6984
httpsd = {chttpd, start_link, [https]}

[ssl]
port = 6984
cert_file = /opt/couchdb/letsencrypt/live/azartiz.com/cert.pem
key_file = /opt/couchdb/letsencrypt/live/azartiz.com/privkey.pem
cacert_file = /opt/couchdb/letsencrypt/live/azartiz.com/fullchain.pem

## restart CouchDB

— 

Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On Dec 4, 2019, at 2:15 PM, Narepalepu, Vimal Abhishek 
>  wrote:
> 
> Hi,
> 
> Using CouchDB 2.3.1. Configured the local.ini as below:
> 
> [chttpd]
> port = 5984
> bind_address = 0.0.0.0
> 
> [ssl]
> enable = true
> port = 6984
> cert_file = 
> key_file = 
> 
> The certificates are trusted signed. And now after restarting the couchdb 
> service and using "curl -v https://domain:6984; gives the below error:
> 
> *   Trying IP ADDRESS...
> * Connected to IP ADDRESS port 6984 (#0)
> * Initializing NSS with certpath: sql:/etc/pki/nssdb
> *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
>  CApath: none
> * NSS error -5938 (PR_END_OF_FILE_ERROR)
> * Encountered end of file
> * Closing connection 0
> curl: (35) Encountered end of file
> 
> Tried above using https://localhost:6984 and still see the same error.
> 
> From couch logs:
> 
> [notice] 2chttpd_auth_cache changes listener died database_does_not_exist at 
> mem3_shards:load_shards_from_db/6(line:395) <= 
> mem3_shards:load_shards_from_disk/1(line:370) <= 
> mem3_shards:load_shards_from_disk/2(line:399) <= 
> mem3_shards:for_docid/3(line:86) <= fabric_doc_open:go/3(line:39) <= 
> httpd_auth_cache:ensure_auth_ddoc_exists/2(line:195) <= 
> chttpd_auth_cache:listen_for_changes/1(line:142)
> [error] 2019-12-04T19:52:22.041264Z couchdb@127.0.0.1 emulator  Error 
> in process <0.9139.0> on node 'couchdb@127.0.0.1' with exit value:
> {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,395}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,370}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,399}]},
> {mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,86}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,39}]},
> {chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,195}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,142}]}]}
> 
> 
> netstat -plnt command shows that it is listening on port 6984. "0 
> 0.0.0.0:6984"
> 
> Not sure if I am missing any configuration that is not allowing me to access 
> couchdb securely.
> 
> 
> Best,
> Vimal
> 
> 
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.



Re: FolderDB - advice wanted

2019-07-22 Thread Bill Stephenson
FWIW, I made an app way back in 2002 that uses CGI.pm’s “Save” function to save 
a CGI object. CGI.pm uses a simple "name=value” per line format that I store in 
files in directories for specific users as a simple database. It’s still in 
use. It’s very fast, easy to work with, and very reliable.

But, CouchDB is a pretty giant upgrade by comparison so I'm using it with 
PouchDB.js for upgrades to that app now. I still use Perl and CGI.pm for server 
side chores though, like user setup, because it’s still a great server side 
tool.

--

Bill Stephenson





> On Jul 22, 2019, at 9:20 AM, Joel Wallis Jucá  wrote:
> 
> Hello Rene,
> 
> Have you ever tried YAML? If you're planning to manage the data manually
> through a text editor, YAML will provide a DX (Developer Experience) way
> better than JSON. It works great for simple websites (Jekyll uses something
> similar, called Data Files <https://jekyllrb.com/docs/datafiles/>).
> 
> Em dom, 21 de jul de 2019 às 18:00, Martin Broerse 
> escreveu:
> 
>> Hi Rene,
>> 
>> I actually don't see what you want advice on but I can say 2 things about
>> it.
>> 
>>   - Use CouchDB with keys like
>>   `rss_2_-MM-DD-hh-mm-ss-CATEGORY_SUBMENU_PATH` or
>>`rss_2_CATEGORY_SUBMENU_PATH--MM-DD-hh-mm-ss` depending on what you
>>   want to find with mango queries and use as value your JSON data in a
>> `data
>>   `root key. like this
>> 
>> https://my.couchcluster.com/bloggr/post_2_9F4D597F-037B-0037-8F64-917B1DDBA611
>>   to be able to switch to relational-pouch
>>   <https://github.com/pouchdb-community/relational-pouch> later.
>>   - Use a MIT, Apache or similar License but not GPL or LGPL if you want
>>   companies to use it. We have a policy at our company not to use and
>> invest
>>   in GPL licensed code.
>> 
>> Play with Mango queries direct from Fauxton to see the advantage of using
>> rss_2_ like this
>> 
>> ```
>> {
>>   "selector": {
>>  "data": {
>> "key1": "s|string"
>>  },
>>  "_id": {
>> "$gt": "rss_2_",
>> "$lt": "rss_3"
>>  }
>>   }
>> }
>> 
>> ```
>> 
>> - Martin
>> 
>> On Sun, 21 Jul 2019 at 18:50, Rene Veerman 
>> wrote:
>> 
>>> Hi.
>>> 
>>> I like JSON a lot better than the SQL data model,
>>> but now that i've been using it for a few years,
>>> i find myself combining file system storage of lots of JSON files in many
>>> sub-folders into a web app,
>>> like news gathering with commandline PHP per N minutes from 280+ RSS
>> online
>>> sources,
>>> into a PHP web-app that loads the latest news, via a web-powered PHP
>>> filesystem search of the latest new-items JSON files, stored on a
>>> filesystem thats got folders like
>>> .//MM/DD/hh/mm/ss/CATEGORY_SUBMENU_PATH leading to JSON files.
>>> 
>>> so now i want something more flexible. something that can give me a
>>> web-based treeview of data spanning many JSON-like files (in more
>>> complicated ways than my news app) and even into other file formats
>> stored
>>> somewhere on the filesystem of some server.
>>> 
>>> i plan to license this right from the start under a LGPL typed license,
>>> because i believe input from other developers is key to making a DB
>> system
>>> that is not only easy to use, but also very efficient to run.
>>> 
>>> i'd like the code to stay pure PHP, not even using the object oriented
>>> functionality of PHP, just plain properly named functions and their
>> return
>>> values.
>>> 
>>> i'll name this DB architecture FolderDB, and to prevent web-apps from
>>> forcing the server to reload (and decode!) many .jsone files upon a
>> simple
>>> request to change something in some referenced .jsone file, i plan to
>> run a
>>> single PHP server daemon that will respond to a yet to be written
>>> ASCII/UNICODE protocol.
>>> 
>>> the file format itself, has to differ from JSON somewhat i think, and i
>>> also believe we can lose some of the overhead.
>>> i post this all here to hear your opinion, especially when it points to
>>> insurmountable problems related to my designs.
>>> 
>>> i'm also interested to learn about how to add cloud redundancy to this DB
>>> architecture, preferably with tiered backup servers, or at least be

Re: replicated blog engine?

2019-02-04 Thread Bill Stephenson
PouchDB evolved very quickly in the past few years, so it’s worth another look. 
It seems to have stalled at the 7.0 version for close to the past year, but 
it’s a solid toolset with a nice API to interact with CouchDB. 

Running PouchDB in Node.js provides that same API on the server side to 
interact CouchDB. I wrote my comments feature in Perl because you have to 
restrict what users can do with that feature. It could be done just as easily, 
or maybe even easier, using JS and Node running on the server side and when you 
look at it that way there’s very little difference between using Perl or Python 
or JS, except that most of the Perl modules on CPAN for CouchDB are pretty old 
and crappy, and PouchDB is pretty sweet and easy.

I’ve just not mess with Node.js much, and I already know a bit of Perl.

Bill




> On Feb 4, 2019, at 3:36 PM, Bill Stephenson  wrote:
> 
> Look into the PouchDB API:
> 
> https://pouchdb.com/api.html#replication
> 
> And check into the CouchDB docs on replication. These are made to work 
> together.
> 
> You can probably trigger a replication a number of ways. As far as I know 
> though, it’s not uncommon to use PouchDB on a server to manage CouchDBs on 
> the same and remote servers. 
> 
> Kindest Regards,
> 
> Bill 
> 
> 
> 
> 
> 
>> On Feb 4, 2019, at 3:18 PM, Miles Fidelman  
>> wrote:
>> 
>> Now that just seems silly.  If CouchDB is already running, who needs Pouch?
>> 
>> On 2/4/19 4:12 PM, Bill Stephenson wrote:
>>> You can run PouchDB on the server side in Node.js. An instance of that 
>>> could be configured to live sync remote CouchDBs
>>> 
>>> Kindest Regards,
>>> 
>>> Bill Stephenson
>>> Tech Support
>>> www.cherrypc.com <http://www.ezinvoice.com/>
>>> 1-417-546-8390
>>> 
>>> 
>>> 
>>> 
>>>> On Feb 4, 2019, at 3:10 PM, Miles Fidelman  
>>>> wrote:
>>>> 
>>>> I'm thinking more of sync across multiple CouchDB back-ends.  I'm really 
>>>> not looking for a solution that runs completely in a browser, without 
>>>> installing PouchDB.
>>>> 
>>>> On 2/4/19 4:05 PM, Bill Stephenson wrote:
>>>>> Yes, using PouchDB on the client side you can configure the text.js  (the 
>>>>> “publisher app) to “live sync” the changes on their local db to your 
>>>>> CouchDB, which will then sync all the connected clients.
>>>>> 
>>>>> When a user views a post with the blog app, the app grabs the post from 
>>>>> the CouchDB, so they always get the latest version.
>>>>> 
>>>>> You can check out an example of the live sync feature with the “Todo” 
>>>>> app. Run it in two or more web browsers at the same time, make changes in 
>>>>> one of them and you’ll see the changes appear in the others almost 
>>>>> instantly.
>>>>> 
>>>>> 
>>>>> Bill
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Feb 4, 2019, at 2:55 PM, Miles Fidelman  
>>>>>> wrote:
>>>>>> 
>>>>>> And that will replicate to other couchdb instances hosting the page?
>>>>>> 
>>>>>> Miles
>>>>>> 
>>>>>> On 2/4/19 3:47 PM, Bill Stephenson wrote:
>>>>>>> Yes, viewer comments are added to the blog post doc with a perl script 
>>>>>>> running on the server side.
>>>>>>> 
>>>>>>> I’d be glad to send you the script.
>>>>>>> 
>>>>>>> Kindest Regards,
>>>>>>> 
>>>>>>> Bill Stephenson
>>>>>>> Tech Support
>>>>>>> www.cherrypc.com <http://www.ezinvoice.com/>
>>>>>>> 1-417-546-8390
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> On Feb 4, 2019, at 2:41 PM, Miles Fidelman 
>>>>>>>>  wrote:
>>>>>>>> 
>>>>>>>> Martin & Bill - thanks for your replies & pointers!  Both look 
>>>>>>>> interesting.
>>>>>>>> 
>>>>>>>> Bill - a follow-up:  Does the single page blog, at azartiz.com, 
>>>>>>>> support replication of comments?  My goal is to publish a blog, 
>>>>>>>> distribute it to various social media sites, an

Re: replicated blog engine?

2019-02-04 Thread Bill Stephenson
Look into the PouchDB API:

https://pouchdb.com/api.html#replication

And check into the CouchDB docs on replication. These are made to work together.

You can probably trigger a replication a number of ways. As far as I know 
though, it’s not uncommon to use PouchDB on a server to manage CouchDBs on the 
same and remote servers. 

Kindest Regards,

Bill 





> On Feb 4, 2019, at 3:18 PM, Miles Fidelman  wrote:
> 
> Now that just seems silly.  If CouchDB is already running, who needs Pouch?
> 
> On 2/4/19 4:12 PM, Bill Stephenson wrote:
>> You can run PouchDB on the server side in Node.js. An instance of that could 
>> be configured to live sync remote CouchDBs
>> 
>> Kindest Regards,
>> 
>> Bill Stephenson
>> Tech Support
>> www.cherrypc.com <http://www.ezinvoice.com/>
>> 1-417-546-8390
>> 
>> 
>> 
>> 
>>> On Feb 4, 2019, at 3:10 PM, Miles Fidelman  
>>> wrote:
>>> 
>>> I'm thinking more of sync across multiple CouchDB back-ends.  I'm really 
>>> not looking for a solution that runs completely in a browser, without 
>>> installing PouchDB.
>>> 
>>> On 2/4/19 4:05 PM, Bill Stephenson wrote:
>>>> Yes, using PouchDB on the client side you can configure the text.js  (the 
>>>> “publisher app) to “live sync” the changes on their local db to your 
>>>> CouchDB, which will then sync all the connected clients.
>>>> 
>>>> When a user views a post with the blog app, the app grabs the post from 
>>>> the CouchDB, so they always get the latest version.
>>>> 
>>>> You can check out an example of the live sync feature with the “Todo” app. 
>>>> Run it in two or more web browsers at the same time, make changes in one 
>>>> of them and you’ll see the changes appear in the others almost instantly.
>>>> 
>>>> 
>>>> Bill
>>>> 
>>>> 
>>>> 
>>>>> On Feb 4, 2019, at 2:55 PM, Miles Fidelman  
>>>>> wrote:
>>>>> 
>>>>> And that will replicate to other couchdb instances hosting the page?
>>>>> 
>>>>> Miles
>>>>> 
>>>>> On 2/4/19 3:47 PM, Bill Stephenson wrote:
>>>>>> Yes, viewer comments are added to the blog post doc with a perl script 
>>>>>> running on the server side.
>>>>>> 
>>>>>> I’d be glad to send you the script.
>>>>>> 
>>>>>> Kindest Regards,
>>>>>> 
>>>>>> Bill Stephenson
>>>>>> Tech Support
>>>>>> www.cherrypc.com <http://www.ezinvoice.com/>
>>>>>> 1-417-546-8390
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> On Feb 4, 2019, at 2:41 PM, Miles Fidelman  
>>>>>>> wrote:
>>>>>>> 
>>>>>>> Martin & Bill - thanks for your replies & pointers!  Both look 
>>>>>>> interesting.
>>>>>>> 
>>>>>>> Bill - a follow-up:  Does the single page blog, at azartiz.com, support 
>>>>>>> replication of comments?  My goal is to publish a blog, distribute it 
>>>>>>> to various social media sites, and build a single discussion community 
>>>>>>> around each post.  I prefer to take a replicated approach for the 
>>>>>>> database, on general principles (reliability and such).  Essentially, 
>>>>>>> publish via RSS, with each post & associated comments becoming their 
>>>>>>> own mesh network.
>>>>>>> 
>>>>>>> Thanks Again,
>>>>>>> 
>>>>>>> Miles
>>>>>>> 
>>>>>>> On 2/4/19 1:24 PM, Bill Stephenson wrote:
>>>>>>>> I’m not sure if it qualifies, but you’re welcome to take a look the 
>>>>>>>> blog I've made at azartiz.com.
>>>>>>>> 
>>>>>>>> Kindest Regards,
>>>>>>>> 
>>>>>>>> Bill Stephenson
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> On Feb 4, 2019, at 12:20 PM, Miles Fidelman 
>>>>>>>>>  wrote:
>>>>>>>>> 
>>>>>>>>> Hi Folks,
>>>>>>>>> 
>>>>>>>>> I wonder if anybody has built a replicated blog engine on top of 
>>>>>>>>> CouchDB - something like WordPress that can run as multiple, 
>>>>>>>>> synchronized, local copies.
>>>>>>>>> 
>>>>>>>>> Anybody know of such a beast?
>>>>>>>>> 
>>>>>>>>> Thanks very much,
>>>>>>>>> 
>>>>>>>>> Miles Fidelman
>>>>>>>>> 
>>>>>>>>> -- 
>>>>>>>>> In theory, there is no difference between theory and practice.
>>>>>>>>> In practice, there is.   Yogi Berra
>>>>>>> -- 
>>>>>>> In theory, there is no difference between theory and practice.
>>>>>>> In practice, there is.   Yogi Berra
>>>>> -- 
>>>>> In theory, there is no difference between theory and practice.
>>>>> In practice, there is.   Yogi Berra
>>> -- 
>>> In theory, there is no difference between theory and practice.
>>> In practice, there is.   Yogi Berra
>> 
> -- 
> In theory, there is no difference between theory and practice.
> In practice, there is.   Yogi Berra



Re: replicated blog engine?

2019-02-04 Thread Bill Stephenson
You can run PouchDB on the server side in Node.js. An instance of that could be 
configured to live sync remote CouchDBs

Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On Feb 4, 2019, at 3:10 PM, Miles Fidelman  wrote:
> 
> I'm thinking more of sync across multiple CouchDB back-ends.  I'm really not 
> looking for a solution that runs completely in a browser, without installing 
> PouchDB.
> 
> On 2/4/19 4:05 PM, Bill Stephenson wrote:
>> Yes, using PouchDB on the client side you can configure the text.js  (the 
>> “publisher app) to “live sync” the changes on their local db to your 
>> CouchDB, which will then sync all the connected clients.
>> 
>> When a user views a post with the blog app, the app grabs the post from the 
>> CouchDB, so they always get the latest version.
>> 
>> You can check out an example of the live sync feature with the “Todo” app. 
>> Run it in two or more web browsers at the same time, make changes in one of 
>> them and you’ll see the changes appear in the others almost instantly.
>> 
>> 
>> Bill
>> 
>> 
>> 
>>> On Feb 4, 2019, at 2:55 PM, Miles Fidelman  
>>> wrote:
>>> 
>>> And that will replicate to other couchdb instances hosting the page?
>>> 
>>> Miles
>>> 
>>> On 2/4/19 3:47 PM, Bill Stephenson wrote:
>>>> Yes, viewer comments are added to the blog post doc with a perl script 
>>>> running on the server side.
>>>> 
>>>> I’d be glad to send you the script.
>>>> 
>>>> Kindest Regards,
>>>> 
>>>> Bill Stephenson
>>>> Tech Support
>>>> www.cherrypc.com <http://www.ezinvoice.com/>
>>>> 1-417-546-8390
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On Feb 4, 2019, at 2:41 PM, Miles Fidelman  
>>>>> wrote:
>>>>> 
>>>>> Martin & Bill - thanks for your replies & pointers!  Both look 
>>>>> interesting.
>>>>> 
>>>>> Bill - a follow-up:  Does the single page blog, at azartiz.com, support 
>>>>> replication of comments?  My goal is to publish a blog, distribute it to 
>>>>> various social media sites, and build a single discussion community 
>>>>> around each post.  I prefer to take a replicated approach for the 
>>>>> database, on general principles (reliability and such).  Essentially, 
>>>>> publish via RSS, with each post & associated comments becoming their own 
>>>>> mesh network.
>>>>> 
>>>>> Thanks Again,
>>>>> 
>>>>> Miles
>>>>> 
>>>>> On 2/4/19 1:24 PM, Bill Stephenson wrote:
>>>>>> I’m not sure if it qualifies, but you’re welcome to take a look the blog 
>>>>>> I've made at azartiz.com.
>>>>>> 
>>>>>> Kindest Regards,
>>>>>> 
>>>>>> Bill Stephenson
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> On Feb 4, 2019, at 12:20 PM, Miles Fidelman 
>>>>>>>  wrote:
>>>>>>> 
>>>>>>> Hi Folks,
>>>>>>> 
>>>>>>> I wonder if anybody has built a replicated blog engine on top of 
>>>>>>> CouchDB - something like WordPress that can run as multiple, 
>>>>>>> synchronized, local copies.
>>>>>>> 
>>>>>>> Anybody know of such a beast?
>>>>>>> 
>>>>>>> Thanks very much,
>>>>>>> 
>>>>>>> Miles Fidelman
>>>>>>> 
>>>>>>> -- 
>>>>>>> In theory, there is no difference between theory and practice.
>>>>>>> In practice, there is.   Yogi Berra
>>>>> -- 
>>>>> In theory, there is no difference between theory and practice.
>>>>> In practice, there is.   Yogi Berra
>>> -- 
>>> In theory, there is no difference between theory and practice.
>>> In practice, there is.   Yogi Berra
>> 
> -- 
> In theory, there is no difference between theory and practice.
> In practice, there is.   Yogi Berra



Re: replicated blog engine?

2019-02-04 Thread Bill Stephenson
Hmmm… I not sure that does what you’re asking for. Let me ponder that a bit.

Off the top of my head, it seems to me you can schedule replications in 
Fauxton. I’m not sure it you can configure them to live sync though. 

You probably can configure that in the client side DB with PouchDB though. 

Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On Feb 4, 2019, at 3:05 PM, Bill Stephenson  wrote:
> 
> Yes, using PouchDB on the client side you can configure the text.js  (the 
> “publisher app) to “live sync” the changes on their local db to your CouchDB, 
> which will then sync all the connected clients. 
> 
> When a user views a post with the blog app, the app grabs the post from the 
> CouchDB, so they always get the latest version.
> 
> You can check out an example of the live sync feature with the “Todo” app. 
> Run it in two or more web browsers at the same time, make changes in one of 
> them and you’ll see the changes appear in the others almost instantly.
> 
> 
> Bill 
> 
> 
> 
>> On Feb 4, 2019, at 2:55 PM, Miles Fidelman  
>> wrote:
>> 
>> And that will replicate to other couchdb instances hosting the page?
>> 
>> Miles
>> 
>> On 2/4/19 3:47 PM, Bill Stephenson wrote:
>>> Yes, viewer comments are added to the blog post doc with a perl script 
>>> running on the server side.
>>> 
>>> I’d be glad to send you the script.
>>> 
>>> Kindest Regards,
>>> 
>>> Bill Stephenson
>>> Tech Support
>>> www.cherrypc.com <http://www.ezinvoice.com/>
>>> 1-417-546-8390
>>> 
>>> 
>>> 
>>> 
>>>> On Feb 4, 2019, at 2:41 PM, Miles Fidelman  
>>>> wrote:
>>>> 
>>>> Martin & Bill - thanks for your replies & pointers!  Both look interesting.
>>>> 
>>>> Bill - a follow-up:  Does the single page blog, at azartiz.com, support 
>>>> replication of comments?  My goal is to publish a blog, distribute it to 
>>>> various social media sites, and build a single discussion community around 
>>>> each post.  I prefer to take a replicated approach for the database, on 
>>>> general principles (reliability and such).  Essentially, publish via RSS, 
>>>> with each post & associated comments becoming their own mesh network.
>>>> 
>>>> Thanks Again,
>>>> 
>>>> Miles
>>>> 
>>>> On 2/4/19 1:24 PM, Bill Stephenson wrote:
>>>>> I’m not sure if it qualifies, but you’re welcome to take a look the blog 
>>>>> I've made at azartiz.com.
>>>>> 
>>>>> Kindest Regards,
>>>>> 
>>>>> Bill Stephenson
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Feb 4, 2019, at 12:20 PM, Miles Fidelman  
>>>>>> wrote:
>>>>>> 
>>>>>> Hi Folks,
>>>>>> 
>>>>>> I wonder if anybody has built a replicated blog engine on top of CouchDB 
>>>>>> - something like WordPress that can run as multiple, synchronized, local 
>>>>>> copies.
>>>>>> 
>>>>>> Anybody know of such a beast?
>>>>>> 
>>>>>> Thanks very much,
>>>>>> 
>>>>>> Miles Fidelman
>>>>>> 
>>>>>> -- 
>>>>>> In theory, there is no difference between theory and practice.
>>>>>> In practice, there is.   Yogi Berra
>>>> -- 
>>>> In theory, there is no difference between theory and practice.
>>>> In practice, there is.   Yogi Berra
>>> 
>> -- 
>> In theory, there is no difference between theory and practice.
>> In practice, there is.   Yogi Berra
> 



Re: replicated blog engine?

2019-02-04 Thread Bill Stephenson
Yes, using PouchDB on the client side you can configure the text.js  (the 
“publisher app) to “live sync” the changes on their local db to your CouchDB, 
which will then sync all the connected clients. 

When a user views a post with the blog app, the app grabs the post from the 
CouchDB, so they always get the latest version.

You can check out an example of the live sync feature with the “Todo” app. Run 
it in two or more web browsers at the same time, make changes in one of them 
and you’ll see the changes appear in the others almost instantly.


Bill 



> On Feb 4, 2019, at 2:55 PM, Miles Fidelman  wrote:
> 
> And that will replicate to other couchdb instances hosting the page?
> 
> Miles
> 
> On 2/4/19 3:47 PM, Bill Stephenson wrote:
>> Yes, viewer comments are added to the blog post doc with a perl script 
>> running on the server side.
>> 
>> I’d be glad to send you the script.
>> 
>> Kindest Regards,
>> 
>> Bill Stephenson
>> Tech Support
>> www.cherrypc.com <http://www.ezinvoice.com/>
>> 1-417-546-8390
>> 
>> 
>> 
>> 
>>> On Feb 4, 2019, at 2:41 PM, Miles Fidelman  
>>> wrote:
>>> 
>>> Martin & Bill - thanks for your replies & pointers!  Both look interesting.
>>> 
>>> Bill - a follow-up:  Does the single page blog, at azartiz.com, support 
>>> replication of comments?  My goal is to publish a blog, distribute it to 
>>> various social media sites, and build a single discussion community around 
>>> each post.  I prefer to take a replicated approach for the database, on 
>>> general principles (reliability and such).  Essentially, publish via RSS, 
>>> with each post & associated comments becoming their own mesh network.
>>> 
>>> Thanks Again,
>>> 
>>> Miles
>>> 
>>> On 2/4/19 1:24 PM, Bill Stephenson wrote:
>>>> I’m not sure if it qualifies, but you’re welcome to take a look the blog 
>>>> I've made at azartiz.com.
>>>> 
>>>> Kindest Regards,
>>>> 
>>>> Bill Stephenson
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On Feb 4, 2019, at 12:20 PM, Miles Fidelman  
>>>>> wrote:
>>>>> 
>>>>> Hi Folks,
>>>>> 
>>>>> I wonder if anybody has built a replicated blog engine on top of CouchDB 
>>>>> - something like WordPress that can run as multiple, synchronized, local 
>>>>> copies.
>>>>> 
>>>>> Anybody know of such a beast?
>>>>> 
>>>>> Thanks very much,
>>>>> 
>>>>> Miles Fidelman
>>>>> 
>>>>> -- 
>>>>> In theory, there is no difference between theory and practice.
>>>>> In practice, there is.   Yogi Berra
>>> -- 
>>> In theory, there is no difference between theory and practice.
>>> In practice, there is.   Yogi Berra
>> 
> -- 
> In theory, there is no difference between theory and practice.
> In practice, there is.   Yogi Berra



Re: replicated blog engine?

2019-02-04 Thread Bill Stephenson
Yes, viewer comments are added to the blog post doc with a perl script running 
on the server side.

I’d be glad to send you the script. 

Kindest Regards,

Bill Stephenson
Tech Support
www.cherrypc.com <http://www.ezinvoice.com/>
1-417-546-8390




> On Feb 4, 2019, at 2:41 PM, Miles Fidelman  wrote:
> 
> Martin & Bill - thanks for your replies & pointers!  Both look interesting.
> 
> Bill - a follow-up:  Does the single page blog, at azartiz.com, support 
> replication of comments?  My goal is to publish a blog, distribute it to 
> various social media sites, and build a single discussion community around 
> each post.  I prefer to take a replicated approach for the database, on 
> general principles (reliability and such).  Essentially, publish via RSS, 
> with each post & associated comments becoming their own mesh network.
> 
> Thanks Again,
> 
> Miles
> 
> On 2/4/19 1:24 PM, Bill Stephenson wrote:
>> I’m not sure if it qualifies, but you’re welcome to take a look the blog 
>> I've made at azartiz.com.
>> 
>> Kindest Regards,
>> 
>> Bill Stephenson
>> 
>> 
>> 
>> 
>> 
>>> On Feb 4, 2019, at 12:20 PM, Miles Fidelman  
>>> wrote:
>>> 
>>> Hi Folks,
>>> 
>>> I wonder if anybody has built a replicated blog engine on top of CouchDB - 
>>> something like WordPress that can run as multiple, synchronized, local 
>>> copies.
>>> 
>>> Anybody know of such a beast?
>>> 
>>> Thanks very much,
>>> 
>>> Miles Fidelman
>>> 
>>> -- 
>>> In theory, there is no difference between theory and practice.
>>> In practice, there is.   Yogi Berra
>> 
> -- 
> In theory, there is no difference between theory and practice.
> In practice, there is.   Yogi Berra



Re: Can a couched 2.3.0 be downgraded to 2.1.1 without changes to the data

2019-02-04 Thread Bill Stephenson
Have you tried replicating your data to the 2.2.1 DB?


Bill



> On Feb 4, 2019, at 2:19 PM, Compu Net  wrote:
> 
> Can a couched 2.3.0 be downgraded to 2.1.1 without changes to the data ?



Re: replicated blog engine?

2019-02-04 Thread Bill Stephenson
I’m not sure if it qualifies, but you’re welcome to take a look the blog I've 
made at azartiz.com.

Kindest Regards,

Bill Stephenson





> On Feb 4, 2019, at 12:20 PM, Miles Fidelman  
> wrote:
> 
> Hi Folks,
> 
> I wonder if anybody has built a replicated blog engine on top of CouchDB - 
> something like WordPress that can run as multiple, synchronized, local copies.
> 
> Anybody know of such a beast?
> 
> Thanks very much,
> 
> Miles Fidelman
> 
> -- 
> In theory, there is no difference between theory and practice.
> In practice, there is.   Yogi Berra



Re: Prevent anonymous creation of users...

2018-11-23 Thread Bill Stephenson
Eiri, Chris,

Thank you both for the quick help. 

Setting “admin" as "_users" database admin did the trick.  I don’t know why it 
didn’t occur to me to try that but it makes perfect sense now that you pointed 
it out.

Kindest Regards,

Bill Stephenson





> On Nov 23, 2018, at 2:13 PM, Eiri  wrote:
> 
> Hi Bill,
> 
> A "_users" database is an (almost) ordinary Couch database and access to it 
> controlled the same way as with any other database, by setting a valid 
> "_security" object.
> Try to set your server's admin as "_users" database admin, i.e. update the 
> security object in _users to {"admins": {"roles": ["_admin"]}, "members": 
> {"roles": ["_admin"]}}
> 
> 
> Regards,
> Eric
> 
> 
>> On Nov 23, 2018, at 15:44, Bill Stephenson  wrote:
>> 
>> I’ve been unaware that by default anyone can create a user in the _user file 
>> and I have someone doing that on a CouchDB server I run.
>> 
>> From what I’ve been able to learn about this so far I need to modify the 
>> "_design/_auth” file to prevent this, but I’m reluctant to muck around with 
>> that without knowing exactly how and where I need to edit that file.
>> 
>> Any help would be much appreciated.
>> 
>> --
>> 
>> Bill Stephenson
>> 
>> 
>> 
>> 
>> 



Prevent anonymous creation of users...

2018-11-23 Thread Bill Stephenson
I’ve been unaware that by default anyone can create a user in the _user file 
and I have someone doing that on a CouchDB server I run.

From what I’ve been able to learn about this so far I need to modify the 
"_design/_auth” file to prevent this, but I’m reluctant to muck around with 
that without knowing exactly how and where I need to edit that file.

Any help would be much appreciated.

--

Bill Stephenson







Re: Updating _id for documents with attachment in CouchDB

2018-09-27 Thread Bill Stephenson
I may have missed something but can’t you just load the data from the old doc, 
and the additional data, and any changes into a new doc and save that, and 
delete the old on if necessary?

I may be wrong, but I assume by design you can’t change the _id of an existing 
doc and “save” it. 

Kindest Regards,

Bill 



> On Sep 27, 2018, at 1:34 PM, Arcadius Ahouansou  wrote:
> 
> Hello.
> I have a set of documents with _id in the format "doc-1", ..., "doc-N"
> shown below.
> I need to change the _id of those documents from let's say "doc-1" to
> "user-1" and also add some additional fields to the documents.
> 
> To prove my strategy, I started by loading only 1 document, then updating
> the _id, add additional fields, remove the _rev field and save it.
> This fails with error:
> 
> HTTP 412 Precondition Failed
> 
> {"error":"missing_stub","reason":"Invalid attachment stub in user-1 for
> photo.png"}
> 
> when I remove the stub:true, I get
> 
> {"error":"bad_request","reason":"Invalid attachment data for photo.png"}
> 
> 
> Is there a way to link this new document to the existing attachment without
> having to fully load and copy the attachment?
> 
> I have noticed that there is also a COPY API available for CouchDB which is
> able to copy a document preserving all attachments.
> My only issue with the COPY is that it seems to operate only on a single
> document and there seem to be no way of modifying the document being
> copied.
> In my case, I need to be able to perform copy and multiple documents at
> once.
> 
> Any hint will be very appreciated.
> 
> Thank you very much.
> 
> Arcadius.
> 
> 
> {
>  "_id": "doc-001",
>  "_rev": "3-61954f961abfb012ff7262ebb2d40426",
>  "_attachments": {
>"photo.png": {
>  "content_type": "image/png",
>  "revpos": 3,
>  "digest": "md5-IfggOdAm507L7pnXzfCzWA==",
>  "length": 6873,
>  "stub": true
>}
>  }
> }



Re: Queries regarding CouchDB

2018-07-30 Thread Bill Stephenson
Hi Mayur,

You’ll want to look into creating a “_users” DB to manage users and assigning 
“roles” to them.

Then look into creating a database and setting the “Permission” on that 
database for users (“admins" and "members”) and “roles” for users of that 
specific database.

Then look into creating “Design Documents” that contain rules for what users 
with different “roles” can do with what documents in that database. 

http://docs.couchdb.org/en/latest/intro/security.html?highlight=_users

Once you get the hang of it you have a pretty fine grained control.

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com <http://www.ezinvoice.com/>
1-417-546-8390



> On Jul 30, 2018, at 4:26 AM, Mayur Baldha  wrote:
> 
> Dear CouchDB Devs,
> 
> We are developing the Smart Maintenance Solution (SMS) which we are planning 
> to develop using CouchDB.
> 
> Here is brief about what we are trying to achieve….
> We are developing mobile based maintenance system which can be used by any 
> transit, healthcare or other domain to shorten issue resolution time and 
> increase productivity.
> System will have following user role :
> · On Field staff
> · Admin
> · Workers
> 
> Consider a case of Transit metro system, if there is any damage or fault in 
> metro vehicle, tracks, engine etc, then On field staff should be able to 
> report an issue in SMS system by entering form and capturing image/video.
> Admin should see reported issues and assign them to Workers.  
> Worker should visit the field and resolve the issue and updated issue status.
> 
> We are very new to CouchDB + NoSQL and have major expertise in the SQL 
> Database.
> 
> Now the queries here…..
> 1.   Can we use CouchDB for such kind of solution. (probably Yes, we feel 
> so)
> 2.   For SQL DB, we can create a single DB with User, Issues tables. How 
> can we do the similar activity in CouchDB?
> Do we need to create separate DB for each user? Please explain?
> 3.If we create single Database for all users, then how can we validate 
> logged in user credentials? and how to protect user specific documents?
> 
> Appraise if you can reply to above queries.
> 
> Regards,
> 
> Mayur Baldha
> Consultant | TES
> Datamatics Global Services Limited
> www.datamatics.com <http://www.datamatics.com/>
> 
> Regards,
> 
> Mayur Baldha
> Consultant | TES
> Datamatics Global Services Limited
> www.datamatics.com <http://www.datamatics.com/>



Re: permissions specific to each document?

2018-07-25 Thread Bill Stephenson
You might find what you need in the plugins for PouchDB:

https://pouchdb.com/external.html

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com <http://www.ezinvoice.com/>
1-417-546-8390



> On Jul 25, 2018, at 1:37 PM, Rene Veerman  wrote:
> 
> ok how would i do that in pouchdb .query() and .find() ?



Re: database initialization and backup scripts?

2018-07-22 Thread Bill Stephenson
Hi Rene,

The CouchDB docs have info on what you’re looking for:

http://docs.couchdb.org/en/latest/ 

CouchDB has a built-in web based DB manager called Fauxton that makes it easy 
to create and duplicate databases. Once you’ve installed your CouchDB you can 
access it at: 

https://your.com:6984/_utils/ 

You may want to look into PouchDB as well. It’s a Javascript DB that interfaces 
with CouchDB:

https://pouchdb.com 

—

Bill


> On Jul 22, 2018, at 10:48 PM, Rene Veerman  wrote:
> 
> hi..
> 
> i am new to couchdb.
> 
> back in SQL land, i'd use to have scripts to both initialize my database,
> and scripts to back up and restore my database too.
> 
> how would i best implement such scripts in couchdb 2?



CouchDB 2.1.0 - Fauxton - very minor database permissions issue

2018-05-09 Thread Bill Stephenson
If this is the wrong place to report this I apologize...

Sometimes, but not all the time, when I delete a “Member” from a database’s 
permissions the Fauxton will appear to delete the member I click on and the one 
right above it.

If I go back to the database list and click again on that database->permissions 
it shows the user that was not clicked on is still there, so it doesn’t really 
delete it (at least not every time afaik). And it doesn’t happen every time 
I've deleted a “Member”. 

I’ve had this happen a few times now and the first few times I re-added the 
user as soon as I noticed it. That will keep the same username twice in the 
permissions. 

It’s a very minor issue but it did have me a bit baffled the first few times it 
happened. I’ve not tried to duplicate in 2.1.1 but I suspect it may occur there 
too if hasn’t been addressed already.

- 

Kindest Regards,

Bill Stephenson





Re: Some questions about couchdb

2018-04-25 Thread Bill Stephenson
Hi Jinmin,

> On Apr 25, 2018, at 7:11 PM, 明 淨  wrote:
> 
> What I'm thinking about is the following things:
> 
> 1. If I store the info of a person as a document in couchdb, will update of a 
> few words in his/her self introduction cause the whole document to be 
> rewrite? also, I have to submit the whole document to make this a few words 
> update? Shall couchdb support field unit update in the future?

In a nutshell yes, you will update the entire document but that’s easy. You 
“get” the document as a JSON object and then update just the parts of the 
object you want and then “put” the updated document object back in the 
database. 

> 
> 2. By default, a user of a database in couchdb can update all the documents 
> in the database, but usually in the real world, every document has it's 
> owner, and shouldn't be updated by users other than the owner. Is there any 
> mechanism in couchdb to support document unit authorization?

With CouchDB you can set it up so every user has their own database that only 
they can create, modify, and delete documents in. You can assign other users 
“roles” and add them to a database's “Permissions” that allow them to only read 
documents in a database as well.

> 
> 3. As replication is the basis of data sync across cluster nodes, so will 
> couchdb support field unit update in cluster data sync, not just document 
> unit?

I don’t know the answer to this, but I do know you can replicate and sync 
databases between more than one CouchDB server. You don’t need a cluster to do 
that though.

I will suggest you take a look at PouchDB too. The info on their site will help 
you get a feel for some of the ways you can manage users and documents and 
permissions and you can use PouchDB in your web browser offline without a 
CouchDB server, and you can sync your web browser database with a remote 
CouchDB server, or just use PouchDB with a remote CouchDB server.

https://pouchdb.com

Also check out their “Authentication” plugin page to learn more about how you 
can manage users and database permissions on your CouchDB:

https://github.com/pouchdb-community/pouchdb-authentication/blob/master/docs/recipes.md

I hope this helps,

Bill

Re: Perl and bad characters - Solved!

2018-04-07 Thread Bill Stephenson
I found the simple “append” solution I was looking for on stackoverflow.com:

https://stackoverflow.com/questions/21718486/need-to-add-new-data-to-json-array-in-perl
 
<https://stackoverflow.com/questions/21718486/need-to-add-new-data-to-json-array-in-perl>

Thank you all again for the help!

I’ve included the working script below. If anyone has suggestions for 
improvements please let me know.

Kindest Regards,

Bill Stephenson


—
#!/usr/bin/perl

use strict;
use warnings;
use JSON::XS;
use Data::Dumper;
use CGI;
use LWP::Simple;

my $cgi = CGI->new;
my $msg;

# Get and print the post doc ID:
my $id = $cgi->param('postID');
# $msg = "id:  $id";
# _message($msg);  

# Get the blog post from CouchDB
my $url = "https://user:pass\@cherrypc.com:6984/cherrypc/$id;;

my $blogdoc = get $url;
die "Couldn't get $url" unless defined $blogdoc;

# convert json to perl object
my $data_structure = decode_json($blogdoc);
 
# $msg = "Doc Title: ". $data_structure->{'title'};
# _message;

# $msg = "data_structure: \n" . Dumper($data_structure);
# _message($msg);

# -
#Append the list of comments:

my $newCommentDate = $cgi->param('commentDate'); 
my $newComment = $cgi->param('comment');  

my $newdata = {commentDate=>"$newCommentDate",comment=>"$newComment"};
push @{ $data_structure->{'comments'}  }, $newdata;
# -

# convert perl object back to json 
my $updatedDoc = encode_json $data_structure;

# Update the document
my $req = HTTP::Request->new(PUT => $url);
$req->content_type('application/json');
$req->content($updatedDoc);

my $ua = LWP::UserAgent->new; 
my $res = $ua->request($req);
# $res is an HTTP::Response.

if ($res->is_success) {
$msg = "Success: ". $res->as_string;
_message($msg);
  }
  else {
$msg =  "Failed: ". $res->status_line;
_message($msg);
  }

# $msg = Dumper($res);
# _message($msg);

print $cgi->header('text/plain;charset=UTF-8');  
  
exit;

#
sub print_message {
#
open (DUMPFILE, ">>/usr/lib/cgi-bin/debug.txt") or die "Unable to open 
/usr/lib/cgi-bin/debug.txt \n";
print DUMPFILE "\n--- message --- \n";
print DUMPFILE "$msg";
print DUMPFILE "\n- end - \n";
close(DUMPFILE);
$msg = "";
return;
}



Re: Perl and bad characters - Progress!

2018-04-07 Thread Bill Stephenson
As per the advice given I took a different route and used LWP to  get and put 
the document. 

And I’m going the ditch the building of the JSON like so:

my $returnJSON = qq`{"_id": "$_id", "_rev": "$_rev", "title": "$title", 
"subtitle": "$subtitle", "content": "$content", "docType": "text", 
"Text_publish": "yes", "publishDate": "$publishDate",$newCommentsList}`;

That just doesn’t work.  I don’t know why, but all I really need to do is add 
the comment to the Perl object so I’m going to work on that. Perl Objects do 
baffle me a bit but I’m going to try and trudge my way through figuring it out. 

Thank you all for the advice and pointers.

Below is what I’ve got so far and this does update the doc successfully so I 
have made progress with your help:
--

#!/usr/bin/perl

use strict;
use warnings;
use JSON::XS;
use Data::Dumper;
use CGI;
use LWP::Simple;

my $cgi = CGI->new;
my $msg;

# Get and print the post doc ID:
my $id = $cgi->param('postID');
# $msg = "id:  $id";
# _message($msg);  

# Get the blog post from CouchDB
my $url = "https://user:pass\@cherrypc.com:6984/cherrypc/$id;;

my $blogdoc = get $url;
die "Couldn't get $url" unless defined $blogdoc;

# convert json to perl object
my $data_structure = decode_json($blogdoc);

$msg = "Doc Title: ". $data_structure->{'title'};
_message;

# -
#Get the list of comments:

my %comments;
my $comments;
my @comments;
my $comment;
my $commentDate;
my $msgCounter = 1;
my $commentList;

$comments{ $_->{'comment'} } = $_->{'commentDate'} for @{ 
$data_structure->{'comments'} };

$msg = "Number of Comments: " . scalar keys %comments;
_message;

# Get and print old comments:
while ( ( $comment, $commentDate ) = each %comments ) { 
$commentList .= "Comment: $comment :: Comment Date : $commentDate \n";
}

$msg = "Old Comments: \n" .$commentList; 
_message;

# Need to add the new comment to the $data_structure perl object here
my $newCommentDate = $cgi->param('commentDate'); 
my $newComment = $cgi->param('comment');  

# Print new comment:
$msg = "New Comment: \nComment $newComment :: Comment Date : $newCommentDate";
_message($msg);

# I have no idea yet how to append the new comment to the Perl Object.
# Seems like this should be easy but I've yet to figure that out.

# -
# convert perl object back to json 
my $updatedDoc = encode_json $data_structure;
# -

# Update the document
my $req = HTTP::Request->new(PUT => $url);
$req->content_type('application/json');
$req->content($updatedDoc);

my $ua = LWP::UserAgent->new; 
my $res = $ua->request($req);
# $res is an HTTP::Response.

if ($res->is_success) {
$msg = "Success: ". $res->as_string;
_message($msg);
  }
  else {
$msg =  "Failed: ". $res->status_line;
_message($msg);
  }

# $msg = Dumper($res);
# _message($msg);

print $cgi->header('text/plain;charset=UTF-8');  
  
exit;

#
sub print_message {
#
open (DUMPFILE, ">>/usr/lib/cgi-bin/debug.txt") or die "Unable to open 
/usr/lib/cgi-bin/debug.txt \n";
print DUMPFILE "\n--- message --- \n";
print DUMPFILE "$msg";
print DUMPFILE "\n- end - \n";
close(DUMPFILE);
$msg = "";
return;
}



Perl and bad characters

2018-04-06 Thread Bill Stephenson
I’ve been working on a “comments” feature for my “CherryPC blog”. 

I don’t want readers to have to make a user account to comment so I’m wanting 
to use a perl script on the server side that has the user credentials in the 
$url variable below.

This is the code I’m using to update the document with the comment.

# Convert the JSON to a perl object

my $data_structure = decode_json(`curl -X GET $url`);

my $_id = $data_structure->{'_id'};
my $_rev = $data_structure->{'_rev'};
my $title = $data_structure->{'title'};
my $subtitle = $data_structure->{'subtitle'};
my $content = $data_structure->{'content'};
my $Text_publish = $data_structure->{'Text_publish'};
my $publishDate = $data_structure->{'publishDate'};


my $returnJSON = qq`{"$_id": "_id", "_rev": "$_rev", "title": "$title", 
"subtitle": "$subtitle", "content": "$content", "docType": "text", 
"Text_publish": "yes", "publishDate": "$publishDate",$newCommentsList}`;

my $Post = `curl -X PUT $url -d '$returnJSON'`;

This works fine with plain text, but the blog posts are made with TinyMCE and 
use HTML.  I can update them fine with Javascript and PouchDB, but Perl is 
dying on double quotes, single quotes, and backslashes:

‘ “ \

I’ve narrowed it down to just those 3 characters. If I strip those from the 
html and comments it will all post fine, but html doesn’t work without those so 
that’s not an option.

I’m using these modules:

use strict;
use warnings;
use utf8;
use JSON::XS;
use Data::Dumper;
use CGI;

From what I understand "use utf8” forces the all data to be utf-8 encoded and 
I’ve used several different modules to encode the data and built the entire 
document in a perl object and converted that to JSON as opposed to a simple 
string like above, but it still dies on those three characters. 

This is what the curl error tells me:

PUT Error: bad_request
reason: invalid UTF-8 JSON

So, it’s those 3 characters that are not being encoded correctly.

If anyone has any ideas and/or advice on how to deal with this I’d sure 
appreciate them. I’ve pretty much ran out of them at this point.

Kindest Regards,

Bill Stephenson





CouchDB weekly news

2018-04-05 Thread Bill Stephenson
Well I was sure surprised to see my “CherryPC blog" mentioned in this week’s 
news. I didn’t even expect that to happen :D

I’ve been working on a “Comments” feature and struggling a bit with that 
because I’m using Perl on the server side to add user comments and having 
trouble figuring out how to encode the data to update a blog couchDB document, 
so it might be broken at any given time for a spell.

Still, I thank you all for the mention!

Bill Stephenson






Re: Latest Firefox won't load Fauxton

2018-01-12 Thread Bill Stephenson
I loaded Fauxton in the Vivaldo browser on a Raspberry Pi this afternoon, so 
it’s just Firefox on my old Mac that seems to have this issue. 

Jan, I’ll post this info on the github link you provided if you think it will 
help. It seems to be a pretty narrow problem and since my Mac isn’t running the 
latest mac os it’s probably not a problem for very many users.

Thank you all for responding!

Kindest Regards,

Bill Stephenson




> On Jan 12, 2018, at 8:32 AM, Damjan Georgievski <gdam...@gmail.com> wrote:
> 
> On 11 January 2018 at 20:29, Bill Stephenson <b...@cherrypc.com 
> <mailto:b...@cherrypc.com>> wrote:
> 
>> There’s a question on stack overflow:
>> 
>> Unable Fetch data using PouchDB in Mozilla latest browser using web <
>> https://stackoverflow.com/questions/48170173/unable- 
>> <https://stackoverflow.com/questions/48170173/unable->
>> fetch-data-using-pouchdb-in-mozilla-latest-browser-using-web>
>> 
>> I can still access Fauxton with Safari and Chrome and was able to access
>> it with Firefox just a few weeks ago but now I’m getting this error in
>> Firefox:
>> 
> 
> 
> Seems to work for me with Firefox 57.0.4 (64-bit) on Linux and also 59.0a1
> (2018-01-12) (64-bit)
> 
> You should check for any strange extensions
> 
> 
> 
> 
>> window.controllers/Controllers is deprecated. Do not use it for UA
>> detection.
>> vendor.884175873da25bb4e526.js:40:95354
>> 
>> SecurityError: The operation is insecure.
>> bundle.25bdeac6d2ce92b30461.js:1
>> h
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:1
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:36603
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:457657
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:386570
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:96028
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:501197
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:507783
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:371372
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:259285
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> 
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> bundle.25bdeac6d2ce92b30461.js:1:624052
>> r
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:96
>> window.webpackJsonp
>> https://cherrypc.com:6984/_utils/dashboard.assets/js/
>> manifest.9900c5a8eb329caf2817.js:1:418
>> 
>> 
>> I’ve not made any changes, but Firefox may have updated itself since I
>> last tried using Fauxton. I’m using Firefox v 57.0.4 (64-bit) on a Mac
>> running El Capitan v 10.11.6 (15G18013)
>> 
>> Anyone here having this issue, and/or have any pointers on how to fix it?
>> 
>> --
>> 
>> Kindest Regards,
>> 
>> Bill Stephenson
>> 
>> 
>> 
> 
> 
> -- 
> damjan



Latest Firefox won't load Fauxton

2018-01-11 Thread Bill Stephenson
There’s a question on stack overflow:

Unable Fetch data using PouchDB in Mozilla latest browser using web 
<https://stackoverflow.com/questions/48170173/unable-fetch-data-using-pouchdb-in-mozilla-latest-browser-using-web>

I can still access Fauxton with Safari and Chrome and was able to access it 
with Firefox just a few weeks ago but now I’m getting this error in Firefox:

window.controllers/Controllers is deprecated. Do not use it for UA detection.
vendor.884175873da25bb4e526.js:40:95354

SecurityError: The operation is insecure.
bundle.25bdeac6d2ce92b30461.js:1
h
https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:1

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:36603
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:457657
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:386570
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:96028
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:501197
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:507783
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:371372
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:259285
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96

https://cherrypc.com:6984/_utils/dashboard.assets/js/bundle.25bdeac6d2ce92b30461.js:1:624052
r
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:96
window.webpackJsonp
https://cherrypc.com:6984/_utils/dashboard.assets/js/manifest.9900c5a8eb329caf2817.js:1:418


I’ve not made any changes, but Firefox may have updated itself since I last 
tried using Fauxton. I’m using Firefox v 57.0.4 (64-bit) on a Mac running El 
Capitan v 10.11.6 (15G18013)

Anyone here having this issue, and/or have any pointers on how to fix it?

--

Kindest Regards,

Bill Stephenson




Re: SSL with Let's Encrypt for CouchDB

2017-11-24 Thread Bill Stephenson
Thank you all for responding.

The “mad pink” install instructions worked for me, thank you so much for 
sharing that!

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com <http://www.ezinvoice.com/>
1-417-546-8390



> On Nov 24, 2017, at 2:02 PM, Mad, Pink and Dangerous to Know <p...@mad.pink> 
> wrote:
> 
> I would recommend using HAProxy with Let's Encrypt, it's easy to configure
> and works well...
> https://github.com/madpink/understandingcouchdb/blob/master/section_02_installation/Ubuntu_Debian_2.1_with_SSL
> 
> On Fri, Nov 24, 2017 at 2:33 PM, Bill Stephenson <b...@cherrypc.com> wrote:
> 
>> I’ve been trying to get Let's Encrypt SSL certs configured to work with
>> CouchDB 2.1.1 running on Ubuntu 16.04, but so far no joy.
>> 
>> I think I’m getting closer but if someone has a link or any info they can
>> share it would be much appreciated.
>> 
>> 
>> Kindest Regards,
>> 
>> Bill
>> 
>> 
>> 
>> 



SSL with Let's Encrypt for CouchDB

2017-11-24 Thread Bill Stephenson
I’ve been trying to get Let's Encrypt SSL certs configured to work with CouchDB 
2.1.1 running on Ubuntu 16.04, but so far no joy.

I think I’m getting closer but if someone has a link or any info they can share 
it would be much appreciated. 


Kindest Regards,

Bill





Re: Installation of Couchdb1.7.1 issues

2017-11-21 Thread Bill Stephenson
I’ve used these instructions to successfully install CouchDB 1.7.1 on a 
DigitalOcean Droplet running Ubuntu 16.04:

Install CoucdB 1.7.1 Ubuntu 14.04
# Create DigitalOcean Ubuntu 16.04 Droplet and login via ssh:

sudo apt update
sudo apt upgrade
reboot

# login again:

sudo apt-get -y install build-essential erlang-base-hipe erlang-dev 
erlang-manpages erlang-eunit erlang-nox libicu-dev libmozjs185-dev 
libcurl4-openssl-dev

cd /home

wget 
http://mirrors.advancedhosters.com/apache/couchdb/source/1.7.1/apache-couchdb-1.7.1.tar.gz
tar -zxvf apache-couchdb-*.tar.gz
cd apache*
./configure
make && sudo make install
sudo adduser --disabled-login --disabled-password --no-create-home --gecos "" 
couchdb
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/log/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/run/couchdb
sudo chown -R couchdb:couchdb /usr/local/etc/couchdb
sudo chmod 0770 /usr/local/var/lib/couchdb/
sudo chmod 0770 /usr/local/var/log/couchdb/
sudo chmod 0770 /usr/local/var/run/couchdb/
sudo chmod 0770 /usr/local/etc/couchdb/*.ini
sudo chmod 0770 /usr/local/etc/couchdb/*.d
sudo ln -s /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb
sudo ln -s /usr/local/etc/init.d/couchdb /etc/init.d
sudo update-rc.d couchdb defaults
sudo -i -u couchdb couchdb
cd /etc/init.d
ln -s /usr/local/etc/init.d/couchdb couchdb
/etc/init.d/couchdb start
update-rc.d couchdb defaults
curl http://127.0.0.1:5984/

# bind CouchDB IP addresss to Droplet IP
nano /usr/local/etc/couchdb/default.ini

update-rc.d couchdb defaults

# Restart CouchdB
service couchdb restart
curl http://DROPLET_IP:5984


> On Nov 21, 2017, at 12:51 PM, Karl Helmer  wrote:
> 
> Hi Everyone,
> 
>   I'm having problems installing 1.7.1 and don't see any online
> instructions on how to do it.  Currently we're running 1.6.1 on a
> CentOS 6.9 server and I'm following the 1.6.1 steps that I successfully
> used.  There are two issues:
> 




Fauxton Plugin

2017-09-29 Thread Bill Stephenson
I’m just curious, but after the latest Chrome update broke the PouchDB 
Inspector plugin I read a bit about why it wasn't being maintained any longer 
(which I admit was far over my head) and that got me to wondering if making a 
web app with PouchDB couldn't provides those features.

Are there reasons why that approach wouldn’t work or just isn’t one worth 
taking? 

Kindest Regards,

Bill

Re: Setting up SSL Certs for CouchDB 2.0 on Ubuntu 16.04

2017-07-13 Thread Bill Stephenson
I got the SSL working today. It’s a bare minimum setup but it’s a start. 

I’ll put the step-by-step I’m using on the web somewhere and post a link to it 
after I work with it a bit more.

Bill Stephenson




Setting up SSL Certs for CouchDB 2.0 on Ubuntu 16.04

2017-07-12 Thread Bill Stephenson
Hi all,

I apologize to you all for being MIA here for so long. I redid all my email a 
few months ago and the address I’d used here was deleted.

Anyway I’ve been working with a DigitalOcean VPS running CouchDB 2 installed on 
Ubuntu 16.04 with this script:

https://github.com/afiskon/install-couchdb 
<https://github.com/afiskon/install-couchdb>

That works great and it also sets up a service to start CouchDB (which I was 
having trouble with when building it from source myself).

After that I moved on setting up SSL. From what I’ve gathered I should use 
Haproxy and can use Certbot to do this and I found this guide by Daniel West on 
using Haproxy and Certbot with CouchDB on Centos 7:


https://medium.com/@silverbackdan/installing-couchdb-2-0-nosql-with-centos-7-and-certbot-lets-encrypt-f412198c3051
 
<https://medium.com/@silverbackdan/installing-couchdb-2-0-nosql-with-centos-7-and-certbot-lets-encrypt-f412198c3051>

With that and some other reading I’ve got Haproxy working using the example 
config file that comes with CouchDB:

root@ebloc:~# curl http://ebloc.com:15984
{"couchdb":"Welcome","version":"2.0.0","vendor":{"name":"The Apache 
Software Foundation”}}

Next I used Fauxton to create the CouchDB admin user and rebooted the VPS and 
I’m still good. I made a few databases using Fauxton and curl and all is 
working fine:

root@ebloc:~# curl -X PUT http://admin:passw...@ebloc.com:15984/bill
{"ok":true}

Here I made a “snapshot” of my DigitalOcean “Droplet” so I could start over 
from this point and then I tried to use Fauxton to setup a single node as per 
the Daniel West guide but that mucked things up for me and I could no longer 
access CouchDB so I rebuilt my Droplet from the snapshot.

With the rebuilt VPS I’ve not messed with the CouchDB "local.ini” or 
“default.ini” files at all and everything is working so I installed Certbot and 
Openssl. 

In the Daniel West guide he has: "Step 6. Create CertBot hook for Haproxy — 
Bash script”. 

I started there and followed though to: "Step 9. Configure Haproxy for HTTPS"

When I was finished and ran "service haproxy restart” I got an error. I rebuilt 
the Droplet and repeated those steps a few times to make sure I didn’t fat 
finger any input but got the same error each time.

So I tried again by just issuing the cert and copying the fullchain.pem to the 
path in the shown in Step 9:

/etc/haproxy/cert-haproxy.pem

 After restarting haproxy I get the same error:

"Job for haproxy.service failed because the control process exited with error 
code. See "systemctl status haproxy.service" and "journalctl -xe" for details.” 

Below I’ve included what those output but this line in it looks like what I 
might need to know more about:

"input_userauth_request: invalid user teamspeak [preauth]"

I have no idea where to go from here so any pointers would be much appreciated.

Thank you all for being here,

—

Bill Stephenson
b...@cherrypc.com

———


root@ebloc:~# systemctl status haproxy.service
● haproxy.service - HAProxy Load Balancer
   Loaded: loaded (/lib/systemd/system/haproxy.service; enabled; vendor preset: 
enabled)
   Active: active (running) since Thu 2017-07-13 03:38:29 UTC; 8min ago
 Docs: man:haproxy(1)
   file:/usr/share/doc/haproxy/configuration.txt.gz
  Process: 4274 ExecStartPre=/usr/sbin/haproxy -f ${CONFIG} -c -q (code=exited, 
status=0/SUCCESS)
 Main PID: 4278 (haproxy-systemd)
Tasks: 3
   Memory: 1.0M
  CPU: 47ms
   CGroup: /system.slice/haproxy.service
   ├─4278 /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg 
-p /run/haproxy.pid
   ├─4280 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p 
/run/haproxy.pid -Ds
   └─4282 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p 
/run/haproxy.pid -Ds

Jul 13 03:38:29 ebloc systemd[1]: Starting HAProxy Load Balancer...
Jul 13 03:38:29 ebloc systemd[1]: Started HAProxy Load Balancer.
Jul 13 03:38:29 ebloc haproxy-systemd-wrapper[4278]: haproxy-systemd-wrapper: 
executing /usr/sbin/haproxy -f /etc/ha
Jul 13 03:38:29 ebloc hap

———

root@ebloc:~# journalctl -xe
Jul 13 03:36:35 ebloc systemd[1]: haproxy.service: Service hold-off time over, 
scheduling restart.
Jul 13 03:36:35 ebloc systemd[1]: Stopped HAProxy Load Balancer.
-- Subject: Unit haproxy.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit haproxy.service has finished shutting down.
Jul 13 03:36:35 ebloc systemd[1]: Starting HAProxy Load Balancer...
-- Subject: Unit haproxy.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit haproxy.service has begun starting up.
Jul 13 03:36:3

Re: [Release] CouchDB 2.0

2016-09-22 Thread Bill Stephenson
I have to congratulate and give my whole hearted thanks to all who worked on 
this. I am truly indebted to all of you, and so are the users of the software I 
make.


Thank you all, and take some time to “relax” yourselves. You’ve certainly 
earned it!

--

Bill



Re: Can I run couchdb instance without installing?

2016-08-13 Thread Bill Stephenson
I’m not sure if this helps but you might look at PouchDB server.

https://github.com/pouchdb/pouchdb-server


Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com <http://www.ezinvoice.com/>
1-417-546-8390

> On Aug 13, 2016, at 1:35 PM, Cihad Guzel <cguz...@gmail.com> wrote:
> 
> Hi Michael
> 
> Thanks for your suggestion. I already use docker. But I am looking
> different method because this caused dependence to docker.
> 
> 2016-08-13 21:23 GMT+03:00 Michael Zedeler <mich...@zedeler.dk>:
> 
>> You can run it in a docker container.
>> 
>> --
>> Michael Zedeler
>> 70 25 19 99
>> mich...@zedeler.dk
>> 
>> dk.linkedin.com/in/mzedeler |twitter.com/mzedeler | github.com/mzedeler
>> 
>> 
>>  Cihad Guzel wrote 
>> 
>> 
>> Hi
>> 
>> I want to use couchdb for my project testing. So I want to embed cocuhdb in
>> my project. Then I run couchdb with my script  programmaticaly and make
>> test. After test, I stop couchdb instance with my script. But, I don't want
>> to install couchdb because I want to embed it as binary. Is it possible?
>> 
>> Can I run it without installing?
>> 
>> regards
>> Cihad Guzel
>> 



Re: 14 days and couchdb becomes unresponsive

2016-08-08 Thread Bill Stephenson
I’m not a CouchDB expert but I wonder if you’re logging the responses to your 
requests, and when you say it becomes unresponsive I wonder what happens when 
you login to Futon? Does it not respond as well?

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com <http://www.ezinvoice.com/>
1-417-546-8390

> On Aug 8, 2016, at 5:32 PM, Ian Danforth <idanfo...@fetchrobotics.com> wrote:
> 
> Hello!
> 
> First post to the list so please forgive any faux-pas. I'm running couchdb
> 1.5.0 on Ubuntu 14.04 and I am consistently running into a state where,
> after 14 days of uptime on the computer, couchdb becomes unresponsive.
> Requests to the db start queueing up until all I'm getting from the python
> client are 599 relax exceptions.
> 
> couch.couch.CouchException: HTTP 599: Unknown
> 
> Asking the service to stop and restart does not recover and
> /var/log/couchdb/couch.log doesn't have any errors.
> 
> I have been unable to find reports of similar errors in various Google
> searches, so I thought I'd ask here. Additional debugging and logging
> suggestions are welcome!
> 
> -- 
> Ian Danforth
> Fetch Robotics
> Lead Robotics Engineer
> 650-391-4467