-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
works on workstation, not working on server #25
Comments
Hi What happens if you try to install with npm on the server rather than copying it? npm -i couch-to-postgres Also what version of couch are you using as I have not tested it with 2.x and 3.x and have only used it with 1.x |
I use this repo. The index.js is started on this line. You can see in the Please don't let this post stop anyone else from helping. I hope this helps rather than confuses things. |
I am using couchdb 3.1 sync works great from desktop with couchdb on server. on server I tried to run "git clone..." on the server and i get : any ideas? Thanks |
So i have downloaded a new folder of couch-to-postgres from git C:\Program Files\couch-to-postgres-master>node ./bin/index.js |
When is is running (and not syncing) follow:http://administrator:[email protected]:5984/tcsmaster:debug Req 2021-03-29T17:08:04.083Z made no changes for 30s +30s |
It does look like its running but it looks like the following of the couch changes feed is timeing out for some reason - Im not really sure what is causing this and perhaps an issue with the "follow" dependency and the version of couch your using. |
One thing to try is using the daemon.js instead of the index.js - the index.js one was just an example of how to use the library and daemon.js is probably better to work with. |
I was wondering if it works on a machine that is not the database machine but I do not want it running on a desktop, maybe have it run on a server next to the database server. ( we have multiple VM servers in the network). I will also try the daemon.js and let you know. |
It may be worth just trying the Follow npm by itself with a simple script which just prints stuff on the console var follow = require('follow'); |
When i run daemon.js after setting config I get : PG_WATCHDOG: reconnecting on my desktop I get: PG_WATCHDOG: OK The only thing i change between the desktop and server is the address. I have tried both |
Ok to me thats pointing towards a setup config issue with postgres - double check the user/password and also postgres config allows connection - maybe check postgres logs for any clue |
yes, I do not see it as a session in PG. I do see my desktop as a session. I would assume the pass would the same as the one that works. |
I have installed postbird on a neighboring VM server and connects just fine to PG. Any more ideas? Thanks |
Perhaps a permission issue and localhost/127.0.0.1 is missing from pg_hba.conf for the db your using? |
I was thinking something similar. I was looking at pg_hba yesterday and not sure what it should be. here is what I have, do you know how I should change it? IPv4 local connections:host all all 0.0.0.0/0 trust IPv6 local connections:host all all ::1/128 md5 Allow replication connections from localhost, by a user with thereplication privilege.host replication all 127.0.0.1/32 md5 |
I tried but did not work: #IPv4 local connections: |
I am not getting the log of "Connected to postgres" from the index.js code. In the part with "pgclient.connect(function(err) {" on my desktop I get: running on the server I get: |
I think you need to check postgres logs (probably somewhere in /var/log) not the output of daemon.js - postgres should give you some clue as to why its not accepting the connection so is some issue on your sever config rather than anything else. |
I found some logs in ...data/log but nothing important Where do I find ../var/log ? Thanks so much |
It depends on your server (ie os type & postgres version) so really dont know where your server has postgres setup to log to - you may get some clues from postgres.conf file. |
I have been running through a lot of setting with the IP addresses. Thanks |
Also, why do i get all those "follow:http:........" and "follow:stream http:....." messages on the server but not on my desktop ? Thanks |
You should be able to see what ip to set it to from postgres.conf - again i would check postgres logs for any clue as to why you cannot connect from the server running postgres. If this continues to be a problem and you have other vm's to use I suggest you run ctp on a different machine rather than the machine running postgres as seem to be is a postgres config issue for local connections and not sure what else to suggest. |
Thanks for all your help. now what I did figure out is: When I change the ctp index.js file to match "node-postgres", on the server with PG, it is acting like the query is not running . So therefore I can connect to PG from the same server but not with ctp. Any ideas? |
I think I have tracked it down a bit: |
I got it to work!!! yaaaaaa. It still a little noisy on the console,
And I have your "not connected to PG error" to work also. (line 28 note in /bin/index.js)
|
I had the same issue here and used the solution of @jmorganh in previous message. I'm running PostgreSQL 16. |
I worked through getting this to work on my desktop with PG and couch on our server.
When I copy the folder( couch-to-Postgres) to my server (same server as pg and couch) it will not sync.
I get this on the server. there is blue text that starts with "follow:" This text was green when I first ran it.
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug } +9ms
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug JSON: '{"seq":"25-g1AAAACTeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUklMiTV____PyuDOZEhFyjAbmxqaGiRYpzCwFmal5KalpmXmoJHex4LkGRoAFL_oaZIQkyxNDNISjbBpi8LAJ9ZLRw","id":"wo::1010","changes":[{"rev":"2-779eb03dff0f507cbedf9dd44b5c1a24"}],"deleted":true,"doc":{"_id":"wo::1010","_rev":"2-779eb03dff0f507cbedf9dd44b5c1a24","_deleted":true}}' +19ms
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug Object: {
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug seq: '25-g1AAAACTeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUklMiTV____PyuDOZEhFyjAbmxqaGiRYpzCwFmal5KalpmXmoJHex4LkGRoAFL_oaZIQkyxNDNISjbBpi8LAJ9ZLRw',
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug id: 'wo::1010',
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug changes: [ { rev: '2-779eb03dff0f507cbedf9dd44b5c1a24' } ],
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug deleted: true,
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug doc: {
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug _id: 'wo::1010',
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug _rev: '2-779eb03dff0f507cbedf9dd44b5c1a24',
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug _deleted: true
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug }
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug } +3ms
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug JSON: '{"seq":"27-g1AAAACTeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUklMiTV____PyuDOZEhFyjAbmxqaGiRYpzCwFmal5KalpmXmoJHex4LkGRoAFL_oaZIQ0yxNDNISjbBpi8LAJ-dLR4","id":"wo::12365","changes":[{"rev":"2-e0d0a9a121da8776801f59ccea7cc691"}],"deleted":true,"doc":{"_id":"wo::12365","_rev":"2-e0d0a9a121da8776801f59ccea7cc691","_deleted":true}}' +6ms
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug Object: {
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug seq: '27-g1AAAACTeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUklMiTV____PyuDOZEhFyjAbmxqaGiRYpzCwFmal5KalpmXmoJHex4LkGRoAFL_oaZIQ0yxNDNISjbBpi8LAJ-dLR4',
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug id: 'wo::12365',
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug changes: [ { rev: '2-e0d0a9a121da8776801f59ccea7cc691' } ],
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug deleted: true,
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug doc: {
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug _id: 'wo::12365',
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug _rev: '2-e0d0a9a121da8776801f59ccea7cc691',
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug _deleted: true
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug }
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug } +13ms
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug emit: data +3ms
follow:http://administrator:[email protected]:5984/tcsoffice:debug Data from 2021-03-26T20:33:11.106Z +2ms
follow:http://administrator:[email protected]:5984/tcsoffice:debug Req 2021-03-26T20:33:11.106Z timeout=37500, inactivity=30000: http://192.168.0.12:5984/tcsoffice +11ms
example: Starting checkpointer
example: Checkpoint 1 is current next check in: 120 seconds
follow:http://administrator:[email protected]:5984/tcsoffice:debug Req 2021-03-26T20:33:11.106Z made no changes for 30.002s +30s
follow:http://administrator:[email protected]:5984/tcsoffice:debug Stop +1ms
follow:http://administrator:[email protected]:5984/tcsoffice:debug Destroying req 2021-03-26T20:33:11.106Z +4ms
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug destroy +1ms
follow:http://administrator:[email protected]:5984/tcsoffice:debug Checking database: http://192.168.0.12:5984/tcsoffice +4ms
follow:stream http://administrator:[email protected]:5984/tcsoffice:debug write: { data: '', buf: '' } +8ms
follow:http://administrator:[email protected]:5984/tcsoffice:debug Confirmed database: http://192.168.0.12:5984/tcsoffice +7ms
example: {"db_name":"tcsoffice","purge_seq":"0-g1AAAABXeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUnlsQBJhgYg9R8IshIZ8KhNZEiqhyjKAgBm5Rxs","update_seq":"151-g1AAAABXeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUnlsQBJhgYg9R8IshL78KhNZEiqByvizAIAfJkdAw","sizes":{"file":467308,"external":95,"active":25024},"props":{"partitioned":true},"doc_del_count":39,"doc_count":1,"disk_format_version":8,"compact_running":false,"cluster":{"q":2,"n":1,"w":1,"r":1},"instance_start_time":"0"}
follow:http://administrator:[email protected]:5984/tcsoffice:debug Feed query 2021-03-26T20:33:41.278Z: http://192.168.0.12:5984/tcsoffice/_changes?since=11-g1AAAACTeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUklMiTV____PyuDOZEhFyjAbmxqaGiRYpzCwFmal5KalpmXmoJHex4LkGRoAFL_oaZwQ0yxNDNISjbBpi8LAJ19LQ4&feed=continuous&heartbeat=30000&include_docs=true +2ms
follow:http://administrator:[email protected]:5984/tcsoffice:debug Remove feed from agent pool: 2021-03-26T20:33:41.278Z +9ms
follow:http://administrator:[email protected]:5984/tcsoffice:debug Good response: 2021-03-26T20:33:41.278Z +1ms
follow:http://administrator:[email protected]:5984/tcsoffice:debug Req 2021
The text was updated successfully, but these errors were encountered: