I need to configure a NIFI flow that invokes a webservice. The curl command works fine from the cmd line of my nifi host
curl -U <user>:<password> -x <ip>:8080 -H 'SOAPACTION:"http://method"'-X POST -H 'Content-type: text/xml' -d #req.xml https://url -o result2.xml
Im trying to configure NIFI InvokeHTTP processor to make the call from within a nifi flow with following settings.
HTTP Method:POST
Remote URL: https://url
Proxy Host: <ip>
Proxy Port: 8080
Proxy Username: <user>
Proxy Password: <password>
SOAPAction: method (Dynamic Properties)
But it keeps running in the Failure queue.
how do i configure my InvokeHTTP according to the curl command which works ok?
We updated the version of the InvokeHTTP component from 1.3.0 to the newest
Related
Recently updated the solr version from 8.4.1 to 9.0.0 on EC2 Linux AMI 2.
I'm getting the result when i'm using the cli using the localhost domain-> curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://localhost:8983/solr/core_name/select?q=(fieldname%3A\fieldvalue%20)&start=0".
But when I try to use the EC2's elastic IP it says the connection refused. It was working well with the previous version. I configured it locally before trying in EC2, it worked fine in local but not on EC2.Not sure what's missing.
Scrrenshot of browser response
Solr Status
Solr status screenshot
Uncommented and changed the SOLR_JETTY_HOST from 127.0.0.1 to 0.0.0.0 in solr.in.sh file. Deleted everything and reindexed the core after updating the jetty host.
I tried setup ALLINONE in my local, followed the documentation https://apim.docs.wso2.com/en/latest/learn/api-security/api-authentication/secure-apis-using-mutual-ssl/
it worked, but what will be the curl command for request because the document talks about testing only through postman
You can use the following curl commands when you want to use the header-based approach.
curl -X GET -H "X-WSO2-CLIENT-CERTIFICATE: (Base64 encoded public cert)" "https://localhost:8243/mock/v1" -v
curl -X GET -H "X-WSO2-CLIENT-CERTIFICATE: (Base64 encoded public cert)" "http://localhost:8280/mock/v1" -v
In order to work this, you need to add the following configuration to the deployment.toml in wso2am-3.2.0/repository/conf location.
[apimgt.mutual_ssl]
enable_client_validation = false
You can use the following curl commands if you are using the cert and key.
curl -k --cert int.ext.wso2.com.crt --key int.ext.wso2.com.key -X GET "https://localhost:8243/mock/v1" -v
I am trying to make a curl request to get ECR Authorization token instead of using aws cli.
I referred https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_GetAuthorizationToken.html
And to generate signature, I referred this : https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
curl -v --location --request POST 'https://ecr.us-east-1.amazonaws.com:443' -H 'Accept-Encoding: identity' -H 'Content-Length: 1590' -H 'X-Amz-Target: AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken' -H 'X-Amz-Date: 20151129T221940Z' -H 'User-Agent: aws-cli/1.17.14 Python/2.7.5 Linux/3.10.0-957.1.3.el7.x86_64 botocore/1.14.14' -H 'Content-Type: application/x-amz-json-1.1' -H 'Authorization: AUTHPARAMS {AWS4-HMAC-SHA256 Credential=AKIA*******/20200514/ap-south-1/ecr/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=ffe96d25bba760d7502993a1dbf0*********************}'
Response returned after few minutes is :
* Empty reply from server
* Connection #0 to host ecr.ap-south-1.amazonaws.com left intact
curl: (52) Empty reply from server
I basically want to use this token in making a curl request to return ECR image tags:
curl -i -s -H "Authorization: Basic TOKEN" https://90********.dkr.ecr.ap-south-1.amazonaws.com/v2/image-name/tags/list
If i can request the image tags using above command without Token generation....please provide the answer.
this error means that you are receiving a 502 response error, bad gateway. I had a similar when tried to run a curl command via ssh inside an instance hosted on EC2, so I figured out that I had deployed my image with the port mappings incorrectly. I would recommend you to check the following:
Check if your security group allows traffic on port 433
Check if you have deployed your container with the port mappings correctly to ECR, like this:
suppose you have an image called list
To run in your local machine you should execute the following command
docker run -d -p 80:433 list
make sure you have mapped these ports correctly on your Dockerfile, then tag your image
docker tag list 90********.dkr.ecr.ap-south-1.amazonaws.com/v2/image-name/tags/list
and push to ECR
docker push 90********.dkr.ecr.ap-south-1.amazonaws.com/v2/image-name/tags/list
once you have your image pushed to ECR you can run it
docker run -d -p 80:433 90********.dkr.ecr.ap-south-1.amazonaws.com/v2/image-name/tags/list
and then you can curl your image
curl http://ecr-image/your/path
pilot discovery has exposed http service, but there is no documents on it. How can I do query like listing all registered services through pilot api?
I just found the related document and code:
Debug Interface:
https://github.com/istio/istio/tree/master/pilot/pkg/proxy/envoy/v2
PILOT=istio-pilot.istio-system:9093
# What is sent to envoy
# Listeners and routes
curl $PILOT/debug/adsz
# Endpoints
curl $PILOT/debug/edsz
# Clusters
curl $PILOT/debug/cdsz
# General metrics
curl $PILOT/metrics
# All services/external services from all registries
curl $PILOT/debug/registryz
# All endpoints
curl $PILOT/debug/endpointz[?brief=1]
# All configs.
curl $PILOT/debug/configz
List all endpoints:
/v1/registration
https://github.com/istio/istio/blob/master/pilot/pkg/proxy/envoy/discovery.go#L141
pprof
/debug/pprof/
healthz
/ready
mux.HandleFunc("/debug/edsz", s.edsz)
mux.HandleFunc("/debug/adsz", s.adsz)
mux.HandleFunc("/debug/cdsz", cdsz)
mux.HandleFunc("/debug/syncz", Syncz)
mux.HandleFunc("/debug/registryz", s.registryz)
mux.HandleFunc("/debug/endpointz", s.endpointz)
mux.HandleFunc("/debug/endpointShardz", s.endpointShardz)
mux.HandleFunc("/debug/workloadz", s.workloadz)
mux.HandleFunc("/debug/configz", s.configz)
mux.HandleFunc("/debug/authenticationz", s.authenticationz)
mux.HandleFunc("/debug/config_dump", s.ConfigDump)
mux.HandleFunc("/debug/push_status", s.PushStatusHandler)
i used it like this and it worked . tested on istio 1.7
connect to istiod:
kubectl exec -ti < istiod-pod-name > -c discovery -n istio-system -- /bin/bash
run pilot-discovery command:
pilot-discovery request get metrics | grep citadel
Im trying to deploy my classification engine following the tutorial on AWS.
In localhost, you deploy Event Server in port 7070 and then an engine in port 8000, but in AWS you have Event Server running, and "pio deploy" tries to deploy the engine in 0.0.0.0:8000, or if I try to make an inquiry to my DNS:7070 I get:
curl -H "Content-Type: application/json" -d '{ "attr0":2, "attr1":0, "attr2":0 }' http://MYDNS:8000/queries.json
curl: (7) Failed to connect to MYDNS port 8000: Connection refused
How is the way to get a correct deployment of the engines and make an inquiry using AWS ?
Thanks for any help :)
Looks like your question is answered on google groups: https://groups.google.com/forum/#!topic/predictionio-user/13dveknEVJw