i have a very big problem. I'm building an app at the moment. When I start the App with the Android emulator it works fine. I can save some Data and it will show me these too. So it saves the Data locally. (Couchbase Lite)
I work with an ionic framework.
Now I want to sync between Couchbase Server and Couchbase Lite.
I use the Sync Gateway, but it doesn't work.
Below you can see my sync-gateway-config.json and my log.
Can someone help me please?
{
"interface": ":4984",
"adminInterface": "0.0.0.0:4985",
"log": ["*"],
"databases": {
"syncdb": {
"server": "http://127.0.0.1:8091",
"bucket": "sync_gateway",
"username": "sync_gateway",
"password": "********",
"sync":
function (doc) {
channel (doc.channels);
},
"users": {
"GUEST": {
"disabled": true,
"admin_channels": ["public"]
},
"Administrator": {
"disabled": false,
"password": "**********",
"admin_channels": ["*"]
}
}
}
Log
The Android emulator uses a special address to connect to the machine it runs on. Set your app to connect to Sync Gateway via 10.0.2.2. See this Stack Overflow post for more information.
you can add the property: "import_docs": "continuous", and "enable_shared_bucket_access": true, in your database config, between syncdb braces, to see if there is a differencee.
"syncdb": {
"import_docs": "continuous",
"enable_shared_bucket_access": true,
"server": "http://127.0.0.1:8091",
........
}
Related
We can disable azure devops services form UI
Is there any API available to GET the info about enabled / disabled services ?
Like in above image boards is disabled , Can I find this info using API ?
This is an feature in Project Settings.
I checked the related REST API and Azure CLI for Team Projects, however I did not find any available interface can list the info about enabled / disabled services, also no available interface to enabled / disabled services.
So, I think your question is more like a feature request. I recommend that you can report the feature request to Developer Community.
[UPDATE]
I found below API from the Network logs of the web browser (press F12). I have tested this API on my side, it should be the one you are looking for.
Request URI:
POST https://dev.azure.com/{Organization_name}/_apis/FeatureManagement/FeatureStatesQuery/host/project/{Project_id}?api-version=4.1-preview.1
Request Body:
{
"featureIds": [
"ms.vss-work.agile", // Boards
"ms.vss-code.version-control", // Repos
"ms.vss-build.pipelines", // Pipelines
"ms.vss-test-web.test", // Test Plans
"ms.feed.feed" // Artifacts
],
"featureStates": {},
"scopeValues": {
"project": "{Project_id}"
}
}
Response Body:
{
"featureIds": [
"ms.vss-work.agile",
"ms.vss-code.version-control",
"ms.vss-build.pipelines",
"ms.vss-test-web.test",
"ms.feed.feed"
],
"featureStates": {
"ms.vss-work.agile": {
"featureId": "ms.vss-work.agile",
"scope": {
"userScoped": false,
"settingScope": "project"
},
"state": "disabled"
},
"ms.vss-code.version-control": {
"featureId": "ms.vss-code.version-control",
"scope": null,
"state": "enabled"
},
"ms.vss-build.pipelines": {
"featureId": "ms.vss-build.pipelines",
"scope": null,
"state": "enabled"
},
"ms.vss-test-web.test": {
"featureId": "ms.vss-test-web.test",
"scope": null,
"state": "disabled",
"reason": "\"Test Plans\" is off because the \"Boards\" feature is off. In order to manage \"Test Plans\", you must turn on \"Boards\".",
"overridden": true
},
"ms.feed.feed": {
"featureId": "ms.feed.feed",
"scope": null,
"state": "enabled"
}
},
"scopeValues": {
"project": "{Project_id}"
}
}
The right name of the features are:
ms.vss-build.pipelines [Azure Pipelines]
ms.vss-test-web.test [Test Plans]
ms.vss-work.agile [Azure Boards]
ms.vss-code.version-control [Azure Repos]
ms.azure-artifacts.feature [Azure Artifacts]
I want to configure OpenVPN using CloudFormation, I thought I can get the AMI ID from Market place and launch it, because I want to launch an instance with 10 connection, but unfortunately I am not able to get AMI ID from Market place.
How to get the AMI ID of OpenVPN Server with 10 supported connection ?
You can launch OpenVPN Server using CloudFormation using the following steps :
Use the following command to list the OpenVPN AMI ID
aws --region=ap-southeast-2 ec2 describe-images --owner=aws-marketplace --filters 'Name=name,Values=OpenVPN Access Server 2.7.5*'
The above command will give the following output
{
"Images": [
{
"VirtualizationType": "hvm",
"Hypervisor": "xen",
"RootDeviceType": "ebs",
"SriovNetSupport": "simple",
"OwnerId": "123",
"ImageId": "ami-01f26c6ea254596c5",
"Name": "OpenVPN Access Server 2.7.5-bbff26cd-b407-44a2-a7ef-70b8971391f1-ami-0c56f53c16ad84dcd.4",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Ebs": {
"SnapshotId": "snap-0624e972dc64638ed",
"VolumeSize": 8,
"Encrypted": false,
"VolumeType": "standard",
"DeleteOnTermination": true
}
}
],
"EnaSupport": true,
"ImageLocation": "aws-marketplace/OpenVPN Access Server 2.7.5-bbff26cd-b407-44a2-a7ef-70b8971391f1-ami-0c56f53c16ad84dcd.4",
"ImageOwnerAlias": "aws-marketplace",
"ProductCodes": [
{
"ProductCodeId": "b4oaowtu943z36a9jxepql6gh",
"ProductCodeType": "marketplace"
}
],
"ImageType": "machine",
"Public": true,
"CreationDate": "2019-09-30T14:17:14.000Z",
"Description": "http://www.openvpn.net/",
"State": "available",
"RootDeviceName": "/dev/sda1",
"Architecture": "x86_64"
}, ...
.....
}]
}
To get more details about the image and OpenVPN Server you will have to search MarketPlace using the AMI-ID.
To use the image in CloudFormation you have to Subscribe to the Product over Market Place.
Once you have subscribed you can launch OpenVPN like other normal EC2 Instances using the AMI ID.
I am trying to deploy Strapi on a Dokku instance on a Digital Ocean droplet. I originally ran into some issues connecting to the mongo database, but after some trial and error and a lot of review of these docs and this issue, I was able to get it to stop complaining about the mongo connection. Here was my final config/environments/production/database.json
{
"defaultConnection": "default",
"connections": {
"default": {
"connector": "mongoose",
"settings": {
"client": "mongo",
"uri": "${process.env.MONGO_URL}",
"database": "${process.env.DATABASE_NAME}",
"username": "${process.env.DATABASE_USERNAME}",
"password": "${process.env.DATABASE_PASSWORD}",
"port": "${process.env.DATABASE_PORT || 27017}"
},
"options": {
"authenticationDatabase": "${process.env.DATABASE_AUTHENTICATION_DATABASE || ''}",
"useUnifiedTopology": "${process.env.USE_UNIFIED_TOPOLOGY || false}",
"ssl": "${process.env.DATABASE_SSL || false}"
}
}
}
}
Here is my config/environments/production/server.json
{
"host": "${process.env.HOST || '0.0.0.0'}",
"port": "${process.env.PORT || 1337}",
"production": true,
"proxy": {
"enabled": false
},
"cron": {
"enabled": false
},
"admin": {
"autoOpen": false
}
}
I believe the original issue was that I was accidentally using the PORT variable for the database instead of the DATABASE_PORT variable.
However, now that I have that worked out I am getting this error:
error Error: listen EADDRNOTAVAIL: address not available <my-host-ip>:5000
I thought maybe there was some wrong port being cached somewhere, but regardless of what I do, I can't seem to get it to work. Do I need to enable ssl? and then add a letsencrypt cert to my domain? am i using the wrong ports? set a proxy in the server.json?
PS. I am using Dokku Mongo. Didn't think that would be an issue considering the dynos don't go to sleep like they would on heroku. Is that an incorrect assumption?
Also, there are other apps running on the droplet. Maybe a proxy problem?
I just finished the pluralsigt course and completed the tutorial of the official project documentation without problems, but nevertheless using the CLI I could not use the functions get_acc_ast_tx, get_acc_tx, I checked that the peer keys and the configuration files and correspond to genesis file, where admin#test is allowed to use these functions and I get:
[2019-12-08 04: 55: 57.883070400] [E] [CLI/ResponseHandler/Query]: Query is stateless invalid.
The genesis file I use is the initial one of the git repository:
{
"blockV1": {
"payload": {
"transactions": [{
"payload": {
"reducedPayload": {
"commands": [{
"addPeer": {
"peer": {
"address": "127.0.0.1:10001",
"peerKey": "bddd58404d1315e0eb27902c5d7c8eb0602c16238f005773df406bc191308929"
}
}
}, {
"createRole": {
"roleName": "admin",
"permissions": ["can_add_peer", "can_add_signatory", "can_create_account", "can_create_domain", "can_get_all_acc_ast", "can_get_all_acc_ast_txs", "can_get_all_acc_detail", "can_get_all_acc_txs", "can_get_all_accounts", "can_get_all_signatories", "can_get_all_txs", "can_get_blocks", "can_get_roles", "can_read_assets", "can_remove_signatory", "can_set_quorum"]
}
}, {
"createRole": {
"roleName": "user",
"permissions": ["can_add_signatory", "can_get_my_acc_ast", "can_get_my_acc_ast_txs", "can_get_my_acc_detail", "can_get_my_acc_txs", "can_get_my_account", "can_get_my_signatories", "can_get_my_txs", "can_grant_can_add_my_signatory", "can_grant_can_remove_my_signatory", "can_grant_can_set_my_account_detail", "can_grant_can_set_my_quorum", "can_grant_can_transfer_my_assets", "can_receive", "can_remove_signatory", "can_set_quorum", "can_transfer"]
}
}, {
"createRole": {
"roleName": "money_creator",
"permissions": ["can_add_asset_qty", "can_create_asset", "can_receive", "can_transfer"]
}
}, {
"createDomain": {
"domainId": "test",
"defaultRole": "user"
}
}, {
"createAsset": {
"assetName": "coin",
"domainId": "test",
"precision": 2
}
}, {
"createAccount": {
"accountName": "admin",
"domainId": "test",
"publicKey": "313a07e6384776ed95447710d15e59148473ccfc052a681317a72a69f2a49910"
}
}, {
"createAccount": {
"accountName": "test",
"domainId": "test",
"publicKey": "716fe505f69f18511a1b083915aa9ff73ef36e6688199f3959750db38b8f4bfc"
}
}, {
"appendRole": {
"accountId": "admin#test",
"roleName": "admin"
}
}, {
"appendRole": {
"accountId": "admin#test",
"roleName": "money_creator"
}
}],
"quorum": 1
}
}
}],
"txNumber": 1,
"height": "1",
"prevBlockHash": "0000000000000000000000000000000000000000000000000000000000000000"
}
}
}
I use the hyperledger image of docker, in MAC OS CATALINA.
I followed the tutorial according to this manual: https://iroha.readthedocs.io/en/latest/build/index.html
Thank you very much for the help.
Unfortunately, CLI is rather outdated – we are working on new solution for it, but meanwhile it is better to use one of the SDKs available – for Java, Python, JS or iOS (if you prefer mobile development).
All of them contain examples, so it should not be too tricky to use those. Although, if you encounter any issues, please contact us using one of the chats here.
This is due to outdated cli. A newer version that is developed will replace it, but is not yet ready.
The exact problem is that there was pagination metadata added for these queries in iroha, but the cli was not updated to set it properly. Protobuf transport allows cli to send a query without some fields that were added later, but iroha refuses to handle it.
You can use one of client libraries that are always kept up to date: https://iroha.readthedocs.io/en/latest/develop/libraries.html.
I recently developed a project on Amazon Alexa for Smart Home Skill API and We developed using Async Method. In Alexa there are Event Gateway to make post call Asynchronously and deffered response to keep event gateway open. I know that Action on Google has homegraph. Working of HomeGraph and EventGateway is it the same I was wondering?
I was also wondering how can I make the Execution Asynchronous for the Action on Google?
According to my understanding I'll be requiring to make a post call to Homegraph for that purpose.
Yes, you can make a POST to the home graph once the state is completely changed.
For certain types of devices, which may take a while to complete, you can return an execute response with a PENDING:
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": {
"commands": [{
"ids": ["123"],
"status": "PENDING",
"states": {
"on": false,
"online": true
}
}]
}
}
Later, once the status is correct, you can use the Report State API:
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"agentUserId": "1234",
"payload": {
"devices": {
"states": {
"123": {
"on": true
},
}
}
}
}