Skip to content
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

WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING... #16

Open
breakstar opened this issue Jul 16, 2024 · 2 comments
Open

WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING... #16

breakstar opened this issue Jul 16, 2024 · 2 comments

Comments

@breakstar
Copy link

Thank you very much for this project, but I seem unable to achieve the expected results. I have set up CouchDB using Docker, and both the PC and mobile versions of Obsidian can sync properly. Now, I have a requirement to sync the inote database from CouchDB to the local directory /volume2/docker-data/bt/www/wwwroot/static.hsbt.xyz/ via livesync-bridge.

I ran it using the following method:

Simply run
Clone the GitHub Repository
git clone --recursive https://github.com/vrtmrz/livesync-bridge
Open the config file dat/config.sample.json, edit and save to dat/config.json. (You do not have to worry, the sample is in the following section).
Simply run like this.
$ deno run -A main.ts
Note: If you want to scan all storage and databases from the beginning, please run with --reset

My configuration file is as follows:

    "peers": [
        {
            "type": "storage",
            "group": "main",
            "name": "HS-BT-inote",
            "baseDir": "/volume2/docker-data/bt/www/wwwroot/static.hsbt.xyz/",
            "syncFromRemote": true,
            "syncToRemote": true,
            "scanOfflineChanges": true
        },
        {
            "type": "couchdb",
            "name": "HomeStation-couchDB-iNote",
            "group": "main",
            "database": "inote",
            "username": "admin",
            "password": "xxxx",
            "url": "http://192.168.10.107:17888",
            "customChunkSize": 100,
            "minimumChunkSize": 20,
            "passphrase": "",
            "obfuscatePassphrase": "",
            "baseDir": "",
            "syncFromRemote": true,
            "syncToRemote": true,
            "scanOfflineChanges": true
        }
    ]
}

The execution log is:

root@HomeStation:/volume2/docker-data/couchdb/livesync-bridge# deno run -A main.ts
LiveSync Bridge is now starting...
LiveSync Bridge is now started!
7/16/2024, 9:59:09 AM	1	Cache initialized 300 / 10000000000000
7/16/2024, 9:59:09 AM	1	Cache initialized 300 / 10000000000000
7/16/2024, 9:59:09 AM	1	Cache initialized 300 / 50000000
7/16/2024, 9:59:09 AM	10	[HS-BT-inote] Scan offline changes: Enabled, now starting...
7/16/2024, 9:59:09 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_local%2Fobsydian_livesync_milestone
7/16/2024, 9:59:09 AM	10	[HomeStation-couchDB-iNote] Watch starting from now
7/16/2024, 9:59:09 AM	10	WATCH: START: (since:now)
7/16/2024, 9:59:09 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_changes?style=all_docs&filter=replicate%2Fpull&include_docs=true&since=now&feed=continuous&timeout=100000&heartbeat=5000
7/16/2024, 9:59:09 AM	10	WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING...
7/16/2024, 9:59:19 AM	10	WATCH: START: (since:now)
7/16/2024, 9:59:19 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_changes?style=all_docs&filter=replicate%2Fpull&include_docs=true&since=now&feed=continuous&timeout=100000&heartbeat=5000
7/16/2024, 9:59:19 AM	10	WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING...
7/16/2024, 9:59:29 AM	10	WATCH: START: (since:now)
7/16/2024, 9:59:29 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_changes?style=all_docs&filter=replicate%2Fpull&include_docs=true&since=now&feed=continuous&timeout=100000&heartbeat=5000
7/16/2024, 9:59:29 AM	10	WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING...
@breakstar
Copy link
Author

breakstar commented Jul 16, 2024

The following is the execution method for adding the reset parameter.

root@HomeStation:/volume2/docker-data/couchdb/livesync-bridge# deno run -A main.ts --reset
LiveSync Bridge is now starting...
LiveSync Bridge is now started!
7/16/2024, 10:06:41 AM	1	Cache initialized 300 / 10000000000000
7/16/2024, 10:06:41 AM	1	Cache initialized 300 / 10000000000000
7/16/2024, 10:06:41 AM	1	Cache initialized 300 / 50000000
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] Scan offline changes: Enabled, now starting...
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_local%2Fobsydian_livesync_milestone
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 1.png
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 1.jpg
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: Image
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 20240709110118.png
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 20240710092547.jpeg
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 20240710092710.jpeg
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: downCouchDB-inote-static.sh
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 2
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 3
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 4
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 0x99.Static/5
7/16/2024, 10:06:41 AM	-1	[HS-BT-inote] New detected: 0x99.Static/6
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote] Remote database looks like rebuilt. fetch from the first again.
7/16/2024, 10:06:41 AM	10	WATCH: START: (since:0)
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_changes?style=all_docs&filter=replicate%2Fpull&include_docs=true&since=0&feed=continuous&timeout=100000&heartbeat=5000
7/16/2024, 10:06:41 AM	10	WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING...
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 1.jpg change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> Image change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 20240709110118.png change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 20240710092547.jpeg change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 20240710092710.jpeg change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> downCouchDB-inote-static.sh change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 2 change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 3 change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 4 change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 0x99.Static/5 change detected
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 0x99.Static/6 change detected
7/16/2024, 10:06:41 AM	1	GET: START: 1.jpg
7/16/2024, 10:06:41 AM	1	GET: START: Image
7/16/2024, 10:06:41 AM	1	GET: START: 20240709110118.png
7/16/2024, 10:06:41 AM	1	GET: START: 20240710092547.jpeg
7/16/2024, 10:06:41 AM	1	GET: START: 20240710092710.jpeg
7/16/2024, 10:06:41 AM	1	GET: START: downCouchDB-inote-static.sh
7/16/2024, 10:06:41 AM	1	GET: START: 2
7/16/2024, 10:06:41 AM	1	GET: START: 3
7/16/2024, 10:06:41 AM	1	GET: START: 4
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/1.jpg
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/Image
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/20240709110118.png
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/20240710092547.jpeg
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/20240710092710.jpeg
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/downCouchDB-inote-static.sh
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/2
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/3
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/4
7/16/2024, 10:06:41 AM	1	GET: START: 0x99.Static/5
7/16/2024, 10:06:41 AM	1	GET: START: 0x99.Static/6
7/16/2024, 10:06:41 AM	10	[HS-BT-inote] --> 1.png change detected
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/0x99.Static%2F5
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/0x99.Static%2F6
7/16/2024, 10:06:41 AM	10	GET: DONE: 1.jpg
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	1	GET: START: 1.png
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/1.png
7/16/2024, 10:06:41 AM	10	GET: DONE: 4
7/16/2024, 10:06:41 AM	10	GET: DONE: Image
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	10	GET: DONE: 20240710092710.jpeg
7/16/2024, 10:06:41 AM	10	GET: DONE: 20240710092547.jpeg
7/16/2024, 10:06:41 AM	10	GET: DONE: 3
7/16/2024, 10:06:41 AM	10	GET: DONE: 0x99.Static/5
7/16/2024, 10:06:41 AM	10	GET: DONE: downCouchDB-inote-static.sh
7/16/2024, 10:06:41 AM	10	GET: DONE: 20240709110118.png
7/16/2024, 10:06:41 AM	10	GET: DONE: 2
7/16/2024, 10:06:41 AM	10	GET: DONE: 0x99.Static/6
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 1
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs?include_docs=true
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 1.jpg
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 1.jpg 
7/16/2024, 10:06:41 AM	10	GET: DONE: 1.png
7/16/2024, 10:06:41 AM	1	PUT: START: 1.png
7/16/2024, 10:06:41 AM	-1	Collecting chunks: 8
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_all_docs
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 4
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 4 
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 3
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 3 
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 2
7/16/2024, 10:06:41 AM	10	GET: DONE (META): Image
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 20240709110118.png
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 0x99.Static/6
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 0x99.Static/5
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 20240710092710.jpeg
7/16/2024, 10:06:41 AM	10	GET: DONE (META): 20240710092547.jpeg
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 2 
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 0x99.Static/6 
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 0x99.Static/5 
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) Image 
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 20240709110118.png 
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 20240710092710.jpeg 
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) 20240710092547.jpeg 
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (1 / 1)
7/16/2024, 10:06:41 AM	10	GET: DONE (META): downCouchDB-inote-static.sh
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote]  Skipped (Same) downCouchDB-inote-static.sh 
7/16/2024, 10:06:41 AM	-1	Chunks retrieved (8 / 8)
7/16/2024, 10:06:41 AM	10	PUT: All chunks:8, Upload chunk: 0
7/16/2024, 10:06:41 AM	-1	Requesting ... post http://192.168.10.107:17888/inote/_bulk_docs
7/16/2024, 10:06:41 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/1.png
7/16/2024, 10:06:41 AM	1	PUT: UPLOADING: 1.png
7/16/2024, 10:06:41 AM	-1	Requesting ... put http://192.168.10.107:17888/inote/1.png
7/16/2024, 10:06:41 AM	10	PUT: DONE: 1.png
7/16/2024, 10:06:41 AM	10	[HomeStation-couchDB-iNote] <--  1.png saved
7/16/2024, 10:06:51 AM	10	WATCH: START: (since:0)
7/16/2024, 10:06:51 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_changes?style=all_docs&filter=replicate%2Fpull&include_docs=true&since=0&feed=continuous&timeout=100000&heartbeat=5000
7/16/2024, 10:06:51 AM	10	WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING...
7/16/2024, 10:07:01 AM	10	WATCH: START: (since:0)
7/16/2024, 10:07:01 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_changes?style=all_docs&filter=replicate%2Fpull&include_docs=true&since=0&feed=continuous&timeout=100000&heartbeat=5000
7/16/2024, 10:07:01 AM	10	WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING...
7/16/2024, 10:07:11 AM	10	WATCH: START: (since:0)
7/16/2024, 10:07:11 AM	-1	Requesting ... get http://192.168.10.107:17888/inote/_changes?style=all_docs&filter=replicate%2Fpull&include_docs=true&since=0&feed=continuous&timeout=100000&heartbeat=5000
7/16/2024, 10:07:11 AM	10	WATCH: CONNECTION HAS BEEN CLOSED, RECONNECTING...

The newly added file 11 in the local directory seems to be able to synchronize to the database of CouchDB normally, but the changes in the CouchDB database cannot be synchronized to the local directory normally

@breakstar
Copy link
Author

http://192.168.10.107:17888/inote/_changes?style=all_docs&filter=replicate%2Fpull&include_docs=true&since=0&feed=continuous&timeout=100000&heartbeat=5000

{"error":"not_found","reason":"missing"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant