Comments (7)
Do you get the same error if you send calls other than index
to the client?
from amazon-es-php.
Do you have an example. I found this code on elasticsearch-php and inserted it and it seemed to work:
$params = array();
$params = [
'index' => 'test',
'type' => 'test',
'id' => 1,
'client' => [
'future' => 'lazy'
]
];
$future = $client->get($params);
Also, why would index not work, could it possibly be an issue with elasticsearch? Sorry in advance for any newb questions, this is my first foray into elasticsearch and aws. I am also in the process of setting up my domain again. The above code seemed to work without a domain set up on aws (which is weird). I would expect your part of it to fail whenever credentials do not work. Anyway, that domain should be set up soon, so I can test again then.
EDIT: ok, I got a domain now. Tested both index and search calls off $client and both give a 500 error. I went back to that future = lazy code and it worked. I am still not sure what code from elasticsearch-php relies on the credentials and why I keep getting 500 error. It's also hard to get any results back telling me what part of my code may be wrong.
from amazon-es-php.
I just ran the following calls in the terminal to make sure I can read and write to my aws account and it works:
Last login: Mon Sep 11 11:15:16 on ttys004
$ curl -XPUT https://search-arc-bis-XXX.us-west-2.es.amazonaws.com/movies/movie/1 -d '{"director": "Burton, Tim", "genre": ["Comedy","Sci-Fi"], "year": 1996, "actor": ["Jack Nicholson","Pierce Brosnan","Sarah Jessica Parker"], "title": "Mars Attacks!"}'
{"_index":"movies","_type":"movie","_id":"1","_version":1,"result":"created","_shTTTodToToddsToTodTodToToToToTTTTTTTTTT
$ curl -XGET 'search-arc-bis-XXX.us-west-2.es.amazonaws.com/ms/_search?q=mars'
{"took":19,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0}
from amazon-es-php.
If sending an unsigned request with curl
succeeds, are you able to send a request successfully after removing the signing handler altogether? If so, then the error is likely in this library; if not, then the error could be in elasticsearch-php or in the Elasticsearch cluster.
Also, do you have any more debugging information about the 500 error encountered? Is the service returning any kind of message?
from amazon-es-php.
I attached what is coming back in the header for the 500 error. I need more clarification of "removing the signing handler altogether"? Does that mean taking out the .aws file? Because that is how I am getting authentication at the moment.
EDIT: is the curl just an api for CRUD? Doesn't seem like it has to do with credentials at all. I just ran a delete call and it worked, after I moved the .aws credentials. My .aws is similar to this:
[default]
aws_access_key_id = AKIAXXXXXXXUQ
aws_secret_access_key = I8EqGJ7dDu6fXXXXXX/kB
[bis]
aws_access_key_id = AKIAXXXXXXXUQ
aws_secret_access_key = I8EqGJ7dDu6fXXXXXX/kB
both are the same account. Do you have a recommended way of getting credentials with your tool?
from amazon-es-php.
Ah, didn't realize the 500 was coming from your application and not from your elasricsearch service endpoint. Could you take a look at your server logs to find more informations on the error response you're receiving from the elasticsearch endpoint? The original HTTP status code and error message would go a long way to solving the issue.
By "removing the signing handler altogether, I meant to comment out the call to setHandler on the ClientBuilder instance. curl is a library for sending HTTP requests that (as far as I know) does not perform any AWS SigV4 signing. The fact that you can successfully curl on the elasticsearch endpoint indicates that it is not using IAM authentication, so it would be helpful to see if you encounter any issues when using elasticsearch-php's default HTTP handler.
from amazon-es-php.
I cannot get any logs from nginx. I am also running this inside a docker container. I looked in a few places where the logs might be, but keeps telling me
tail: unrecognized file system type 0x794c7630... please report this to [email protected]. reverting to polling
Also commenting out setHandler does not give a 500 error, it just hangs not fully loading the page - Gateway Timeout. TIA for all your help.
from amazon-es-php.
Related Issues (16)
- compatible with ES 6.2.2 HOT 2
- Bug bad signing and 403
- Release new version - 0.2.4 HOT 2
- use of AWS ECS task iam role HOT 1
- Trailing slashes on hosts cause invalid uri exceptions HOT 1
- Create anonymous client HOT 1
- Unable to set Connect Timeout HOT 1
- Error retrieving credentials from the instance profile metadata server. (Client error: `GET http://169.254.169.254/latest/meta-data/iam/security-credentials/` resulted in a `404 Not Found` HOT 1
- Compatibility with Opensearch-php HOT 7
- Error with OpenSearch
- Integration directly into Opensearch-PHP HOT 3
- "No alive nodes found in your cluster" when checking for index existence HOT 4
- Exception on newest version of elasticsearch HOT 5
- Undefined index: host HOT 1
- ES 6.x Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-es-php.