couchbase ios replication error - ios

Im new to couchbase and have been struggeling with an error for hours.
I create a user_profile_<-insert guid here-> document and save it successfully to local mobile couchbase db
with the following test data:
{
"_id" = "user_profile_F6854F81-FE36-4D6B-BD69-DAEBF0E9D766";
"_rev" = "7-9012d2c1990b4c2ab4eb96cdf6c7dbdb";
birthday = Birthday;
gender = Male;
name = Ted;
uuid = 123456789;
}
I have set up replication to a remote couchbase server.
However, each time it tries to replicate I get the following error:
[error] [<0.102.0>] Error in replication
`bb788350a95e4580ddc768d760f89575+continuous`
(triggered by document `d15feb5b5838e5044cdd7b9d9b0009f8`):
{invalid_json,{{error,{1,"lexical error: invalid char in json text.\n"}},
<<"Not found.">>}}
I've been stuck at this problem for about 6 hours now.
Could someone please help here? :)
Thank you !
Update:
I downloaded the project at https://github.com/dthompson/couchbase-ios-example/
and when I run it I get the same error

I have had the same problem but I was trying to use the futon replication functionality. It turned out the problem was due to the way I was inputting the remote database address.
For example: The local database I wanted to replicate is called "cardata"; On my remote server (with the same user account like on my local) I created a database "cardata" whose address is http://your_remote_server_name:port/cardata.
When I used the above format for remote server it worked fine. The erroneous address I had used at first was in the format: http://your_remote_server_name:port/_utils/database.html?cardata.
Considering my experience as detailed above, you too could be inputting the address of your remote server wrongly. Check it to make sure you input it correctly.
NOTE: If your local installation is of a different version from that on you remote server, the difference is not the cause. I checked it, I had 1.2.0 on local and 1.0.1 on the remote server. So I upgraded the server to 1.2.0 and still I had the problem until I fixed the address as explained above. Good luck man.

Related

Cosmos DB and Azure.iOS data query issues

I'm fairly new to Cosmos DB so for starters I created a MongoDB based instance. I then wanted to add a document to it, just as a "Hello World" test. I'm using a self made iOS app for this which uses the official Azure.iOS library from GitHub.
Once I run the "create" command (with the proper collection id set) on AzureData the framework returns me a "success" inside the response with a resource id etc. However once I use an external tool such as Robo3T or the mongo shell the given collection is said to be empty, or returns this error:
{"code":400,"body":"Command find failed: Unknown server error occurred when processing this request.."}
The connection to the DB however is successful since I can display the collection stats and so on.
Now if I open my app again and query the collection documents through the Azure.iOS framework it returns me the result I just saved. This makes me feel a bit puzzled. Did I miss doing something inside the app, or do all MongoDB tools fail listing the documents? The documentation for the framework is rather sparse so any help would be appreciated.
Actually the issue that happened for me is very hard to debug. Since the error messages don't tell anything.
My Cosmos DB is using the MongoDB backend which seems to create issues together with the mentioned Azure.iOS framework.
The issue is further described here:
Cosmos Mongodb query fails but azure storage explorer works fine?
TL;DR what happened is that the iOS framework was not creating a "_id" which is necessary for MongoDB and that lead to corrupted data. I had to switch from MongoDB to the SQL backend. This solved my issue and now everything works fine.

"Login failed for user" trying to connect to SQL Server 2012

I'm trying to get acces to a remote SQL Server, using SDAC.
(in fact I have to get access to the remote DB from android application)
What I've done to set up is here
The configuration string of the TMSConnection is:
Password=mysaPwd;Data Source=RemoteIp;Initial Catalog=myDB;User ID=sa
What I get is : Login failed for user 'sa'
I tried to change the remote IP with local ip, starting the application locally on the server, but the error I get is the same.
I know that it's not a good way for safe reasons, but I want understand where the problem is
this is the authentication mode:
then, the connection configuration
Jerry Dodge was right!
I tried to connect to a different server instance than I intended
There was an old instance of SQL server already installed.
Unfortunately the error message was not clear as something like "User name or password is incorrect" but "Login failed for user", that lead me down the wrong path.
Thank you all!

Reason for Error Timeout in CouchDB

I'm using CouchDB for my iOS application.
Following is my Application flow,
When my application is launched for the first time it replicates the remote database using xyz:a...#mmm.iriscouch.com/databasename.
if the replication is successful, everything works as expected, but sometimes the replication is not successful. In that case I'm getting the following error with log
1> OTHER: {'EXIT',{error,timeout,#Ref<0.0.0.506>}}
and it doesn't replicate until i remove the application and freshly reinstall the application on the device/simulator.
is there any callback/delegate to handle this?
Somehow when I try synching with empty DB then I never get Error time out, once I have content in DB I get the error!
Also it is hard to replicate on simulator, whereas on iPad occurrence is 90%.
i have placed the sample project in git hub
https://github.com/interactiveblueprints/CouchDBSyncTest (for couchDB username password, please read readme.txt)
this sample code is just modification of PhotoLocations. An example application (https://github.com/couchbaselabs/iOS-Demo-PhotoLocations), But changed as per my requirement.
I have also attached the error logs in
http://dl.dropbox.com/u/35814355/ErrorLog.rtf
Waiting for reply,
Krishna.
I have tried with your sample and updated the "Couchbase.framework" to the latest one, from https://github.com/couchbaselabs/CouchCocoa and now the problem seems to be solved, may be this was a bug in previous version. now it seems the DB tries to restart by itself. and the replication feels more smoother and faster.

although i am getting "succeeded" state in the command history table, the data is not moving

Could anyone tell me how to verify whether my data is reaching the specified location or not??I am able to issue the command successfully but unable to see the data...i am trying to move my data from local disk to a file in the local disk itself.i am using the following configuration -
host : text("/home/hadoop/file1.txt") | agentSink("localhost",35853);
node2 : collectorSource(35853) | collectorSink("file:///home/hadoop/","file2.txt");
it's hard to tell exactly:
make sure port 35853 is open
I guess node2 is on the same machine as the agent (cause you configured the agent to localhost)
I'd change the agentSink to console (temporarily) just to make sure the file reading is woking properly
use apache-flume users mailing list :-) I found them very responsive and helpful

IPC Remoting problem

We are receiving the following error using IPC.
"Failed to connect to an IPC Port: The system cannot find the file specified."
The issue is happening on a Windows 2003 server.
Of course it only happens in production. We are unable to reproduce this in our development environment.
The Windows service that is attempting to use IPC is running as Local System.
Is there some sort of permission that needs to be changed?
We were attempting to access the channel before it was spun up. So we would receive the 'not found' error. Wrapping the access code in some 'is it really ready' code fixed the problem.
For me DTA was working fine. But Suddenly I started getting this same error.
For me the fix was this:
-> Go To Task Manager
-> Go To Processes Tab
-> Find and kill the DTA process. For me this process is named as 'DTASHELL.exe'
Now try to launch DTA. It should work now :-)
We had this problem in production code. It was failing on a small percentage of user's systems.
The error turns out to be in the microsoft code that we were using. It generates the IPC channel using the username.
ipc://APP_USER_000:SingeInstanceIPCChannel/SingleInstanceApplicationService
with certain characters in the username, this generates an invalid channel URL, so the receiving app fails to create the channel in the first place.
our fix is to use a hash of the username, rather than the first characters in the username.
(we were using the code here: http://blogs.microsoft.co.il/blogs/arik/archive/2010/05/28/wpf-single-instance-application.aspx )
Please post the code you use to initialize the server channel and publish the object, and the client code with the uri you use when you try to access the remote object.
A common pitfall is when you initialize the channel with a dictionary, and set the name of the channel using
dic["name"] = "channelName";
//used for retrieving the channel - ChannelServices.GetChannel("channelName");
instead of
dic["portName"] = "channelName";
//used as the identifier for the named pipe -
//The client should get the object from the uri : ipc://channelName/objectName

Resources