Invalid value io.confluent.connect.s3.format.protobuf.ProtobufFormat for configuration format.class - amazon-s3

curl -i -X PUT -H "Accept:application/json" \
-H "Content-Type:application/json" http://localhost:8083/connectors/sink-s3-voluble/config \
-d '
{
"connector.class": "io.confluent.connect.s3.S3SinkConnector",
"key.converter":"io.confluent.connect.protobuf.ProtobufConverter",
"tasks.max": "1",
"topics": "cats",
"s3.region": "ap-south-1",
"s3.bucket.name": "testbucketkafka",
"flush.size": "65536",
"storage.class": "io.confluent.connect.s3.storage.S3Storage",
"schema.generator.class": "io.confluent.connect.storage.hive.schema.DefaultSchemaGenerator",
"schema.compatibility": "NONE",
"partitioner.class": "io.confluent.connect.storage.partitioner.DefaultPartitioner",
"transforms": "AddMetadata",
"transforms.AddMetadata.type": "org.apache.kafka.connect.transforms.InsertField$Value",
"transforms.AddMetadata.offset.field": "_offset",
"transforms.AddMetadata.partition.field": "_partition"
}
The error given is Connector configuration is invalid and contains the following 1 error(s):\nInvalid value io.confluent.connect.s3.format.protobuf.ProtobufFormat for configuration format.class: Class io.confluent.connect.s3.format.protobuf.ProtobufFormat could not be found.\nYou can also find the above list of errors at the endpoint /connector-plugins/{connectorType}/config/validate"}

The error is correct. There is no config.format=ProtobufFormat configuration
https://docs.confluent.io/kafka-connectors/s3-sink/current/configuration_options.html#connector
Set format.class to a supported value.

Related

Cannot create new Pipeline using Az DevOps Pipelines API 6.0-preview.1

I'm trying to create new Pipelines using this API endpoint:
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines?api-version=6.0-preview.1
This is the request I'm using:
curl -X POST \
'https://dev.azure.com/<myorg>/<myproj>/_apis/pipelines?api-version=6.0-preview.1' \
-H 'Authorization: Basic <b64string>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"configuration":{
"repository": {
"id": "<repo-guid>",
"name": "<repo-name>",
"type": "azureReposGit"
},
"path": "pipeline.yaml",
"type": "yaml"
},
"folder": "\\custompath\\",
"name": "<pipelinename>"
}
I keep getting the same error:
{
"$id": "1",
"innerException": null,
"message": "Value cannot be null.\r\nParameter name: repositoryName",
"typeName": "System.ArgumentNullException, mscorlib",
"typeKey": "ArgumentNullException",
"errorCode": 0,
"eventId": 0
}
It seems an issue with my payload, but documentation isn't very helpful about it
https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/create?view=azure-devops-rest-6.0
Current version o nodejs sdk doesn't support the Pipeline API yet. Can anyone help me?
I'm able to reproduce your issue on my side, and have reported this issue at website below:
https://developercommunity.visualstudio.com/content/problem/1101376/create-pipeline-rest-api-does-not-work.html
Product team has provided response that "A fix for this issue has been prepared. It should be released to everyone within the next 3 weeks."

Ansible- AWX login token API

I have installed Ansible-AWX and configured certain playbooks. I want to use the AWX API to run the ansible playbooks on a .net console application. However in order to do so I need a oauth token to login using the postman API. The problem is I am not able to generate the token. I have tried using the AWX cli and few other approaches still no positive results.
Any leads would be appreciated.
Give it a shot here: curl -ku username:password -H "Content-Type: application/json" -X POST -d '{"description":"Tower CLI", "application":null, "scope":"write"}' http:///api/v2/users/1/personal_tokens/ | jq -r .token
https://github.com/ansible/tower-cli/issues/478#issuecomment-370528556
$ curl -ku ryan:ryan -H "Content-Type: application/json" -X POST -d '{"description":"Tower CLI", "application":null, "scope":"read"}' https://awx.example.org/api/v2/users/1/personal_tokens/ | python -m json.tool
{
"application": null,
"created": "2018-03-05T19:06:56.224538Z",
"description": "Tower CLI",
"expires": "2018-03-06T05:06:56.223889Z",
"id": 4,
"modified": "2018-03-05T19:06:56.234208Z",
"refresh_token": null,
"related": {
"activity_stream": "/api/v2/tokens/4/activity_stream/",
"user": "/api/v2/users/1/"
},
"scope": "read",
"summary_fields": {
"user": {
"first_name": "",
"id": 1,
"last_name": "",
"username": "ryan"
}
},
"token": "ABy5N1fBiPujilEJjAUtmPlK8mTdGr",
"type": "o_auth2_access_token",
"url": "/api/v2/tokens/4/",
"user": 1
}

Can't access 8000 port after install Kong

Installed Kong with docker by official guide. Then add an API:
curl -i -X POST \
--url http://1.2.3.4:8001/apis/ \
--data 'name=test-api' \
--data 'hosts=1.2.3.4' \
--data 'upstream_url=http://1.2.3.4:3000'
Check API:
curl -i -X GET \
--url http://1.2.3.4:8001/apis/
{
"total": 1,
"data": [
{
"created_at": 1530076151932,
"strip_uri": true,
"id": "ab2ea516-ef44-4f00-a55f-4ed8bb0b69a0",
"hosts": [
"1.2.3.4"
],
"name": "test-api",
"http_if_terminated": false,
"https_only": false,
"retries": 5,
"preserve_host": false,
"upstream_connect_timeout": 60000,
"upstream_read_timeout": 60000,
"upstream_send_timeout": 60000,
"upstream_url": "http://1.2.3.4:3000"
}
]
}
However, can't get 8000 port:
curl -i -X GET \
--url http://1.2.3.4:8000/
--header 'Host: 1.2.3.4'
404 page not found
1.2.3.4 is the fake IP address.
From here got should use either request_host or request_path. But there isn't either of them in this case.
It's the newest version. What's wrong?

Legacy Firebase conditions not working with curl

This call:
curl -X POST \
-H "Authorization: key=AAAAx4uYEXU:...e8EEq9aCv-pGWXIfyCp_lUp28mY" \
-H "Content-Type: application/json" \
-d '{ "data": {
"score": "5x1",
"time": "15:10"
},
"condition": "'dogs' in topics || 'cats' in topics",
"content_available": true
}' \
"https://fcm.googleapis.com/fcm/send"
Causes this error:
Invalid "condition" field: only support 'topics' conditions
I copied the condition field straight from the documentation... how can I get this to work?

ICINGA2 API Not making host modification

i have problem with the API of ICINGA2.
i'm trying to add new variables with the POST call ,
i'm getting the required result,
But ICINGA2 didn't add the new var.
According to documentation:
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/icinga2-api
With the following API, i creates all our hosts in vienna :
curl -k -s -u root:icinga -H 'Accept: application/json' -X PUT 'https://localhost:5665/v1/objects/hosts/server.example.com' \
-d '{ "templates": [ "generic-host" ], "attrs": { "zone": "Vienna", "address": "180.33.1.123", "check_command": "hostalive", "vars.os" : "Linux", "vars.agent" : "ssh" } }' \
| python -m json.tool
While this part works as expected,
The problem is once host created, i need to add various vars for different servers.
for example
Adding of the variable: "vars.servicename" : "DHCP_Servers"
If i'm going back to the documentation, the below API that will need to be execute:
curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localhost:5665/v1/objects/hosts/server.example.com' \
-d '{ "templates": [ "generic-host" ], "attrs": { "zone": "Vienna", "address": "180.33.1.123", "check_command": "hostalive", "vars.os" : "Linux", "vars.agent" : "ssh", "vars.servicename" : "DHCP_Servers" } }' \
| python -m json.tool
When i ran the API , as expected i'm getting back:
{
"results": [
{
"code": 200.0,
"name": "server.example.com",
"status": "Attributes updated.",
"type": "Host"
}
]
}
But there is no changes that taking place on ICINGA/ host file.
Obviously the same user as in my inbox and the forums (https://monitoring-portal.org/index.php?thread/37160-adding-vars-with-api/&postID=234885#post234885) lately. Leaving this as a note here as it might help others to see why it does not work. That feature is just not implemented as it involves storing the applied changes, do a rollback, and re-apply. Not as simple as it sounds.
https://dev.icinga.org/issues/11501