Hi Adam, There are a couple of tasks I would suggest. First, ensure that you are passing the authorization header in the HTTP request. The SSLContextService allows you to verify the external service public certificate, but if that service requires an authorization token, you will still need to provide it via a header.
Second, PostHTTP is an older processor, and I would recommend using InvokeHTTP as it is a more modern and robust processor and supports all the HTTP operations. Andy LoPresto [email protected] [email protected] PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > On Oct 14, 2018, at 00:30, Adam Preston <[email protected]> wrote: > > Hi Everyone > > I am using the PostHTTP processor to POST up some XML I transformed. I have > even configured the SSL Context and everything. > > > Problem is I am getting this in the logs: > > 2018-10-12 22:59:18,669 INFO [NiFi Web Server-73] > o.a.n.c.s.StandardProcessScheduler Starting > PostHTTP[id=2c63900a-99b7-3c1d-50cd-5530e0fba5e0] > 2018-10-12 22:59:18,675 INFO [Timer-Driven Process Thread-5] > o.a.n.c.s.TimerDrivenSchedulingAgent Scheduled > PostHTTP[id=2c63900a-99b7-3c1d-50cd-5530e0fba5e0] to run with 1 threads > 2018-10-12 22:59:18,772 INFO [Flow Service Tasks Thread-1] > o.a.nifi.controller.StandardFlowService Saved flow controller > org.apache.nifi.controller.FlowController@74c6dbf2 // Another save pending = > false > 2018-10-12 22:59:20,415 ERROR [Timer-Driven Process Thread-4] > o.a.nifi.processors.standard.PostHTTP > PostHTTP[id=2c63900a-99b7-3c1d-50cd-5530e0fba5e0] Failed to Post > StandardFlowFileRecord[uuid=1f8c6159-5212-4170-9bfe-563339a04566,claim=StandardContentClaim > [resourceClaim=StandardResourceClaim[id=1539385102154-2, container=default, > section=2], offset=0, > length=2694469],offset=0,name=23134109039036,size=2694469] to > https://myserver.org/api/26/dataValueSets: response code was 302:Found > > > I am able to do with with this curl command just fine: > curl -H 'Authorization: Basic YWRhbTcwNGE6VGhlYmlnMzZkNSQ=' -H "Content-Type: > application/xml" "https://myserver.org/api/26/dataValueSets" --data > @output.xml > > Any thoughts on how I can diagnose this one. > > Thanks > > > Sent from Outlook
