Solr 9 UI not loading but working with CLI - amazon-web-services

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.

Related

```curl: (52) Empty reply from server``` ERROR response from aws ECR

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

Testing Django API on a VPS with curl

I'm trying to access on my Django API using curl from my local terminal to a VSP
curl -H 'Accept: application/json; indent=4' -u admin:password http://127.0.0.1:8000/users/
So, I tried many things like,
replace admin:password to my actual vps root#password
replace admin:password to my actual database admin#password
replace http://127.0.0.1:8000 to my vps url
replace the port 8000 by 22, or 80, 8080
And by the way, I don't know is I have to change /users/ by /root/ or anything else.
I have tried many mix and nothing works.
Here what I'm testing : http://www.django-rest-framework.org/tutorial/quickstart/#testing-our-api
If important, my vps machine is Debian 9 (Stretch)
Think you for your help
This worked for me:
curl -H 'Accept: applicatin/json; indent=4' -u [superuser username]:[superuser password] http://YOURVPSIPADDRESS/users/
The admin:password should be the superuser username and password on your Django site not the username or password for your database or VPS. Ensure a superuser has been created for your Django site on your VPS.

Calling Webservice from NIFI with proxy

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

Check access restrictions in Zabbix agent configuration

I installed Zabbix 3.0.0rc1 from sources on AWS correctly and everything runs okay, but I wanted to run some manual commands to test connectivity with new zabbix agent in network. I used zabbix_get and it worked fine, but I saw something strange. Agent is installed on both machines zabbix.myservers and agent.myservers
I tried to run zabbix_get with DNS name, private and public IP address.
Attempt to get agent version from localhost using DNS name
root#ip-10-0-0-30:/home/ubuntu# zabbix_get -s zabbix.myservers -k agent.version
zabbix_get [30903]: Check access restrictions in Zabbix agent configuration
Attempt to get agent version from localhost using private IP address
root#ip-10-0-0-30:/home/ubuntu# zabbix_get -s 10.0.0.30 -k agent.version
zabbix_get [30907]: Check access restrictions in Zabbix agent configuration
Attempt to get agent version from localhost using localhost
root#ip-10-0-0-30:/home/ubuntu# zabbix_get -s localhost -k agent.version
3.0.0rc1
Attempt to get agent version from server using DNS name
root#ip-10-0-0-30:/home/ubuntu# zabbix_get -s agent.myservers -k agent.version
3.0.0rc1
Attempt to get agent version from server using private IP address
root#ip-10-0-0-30:/home/ubuntu# zabbix_get -s 10.0.0.31 -k agent.version
3.0.0rc1
Attempt to get agent version from server using public IP address (x.x.x.x is real public IP address)
root#ip-10-0-0-30:/home/ubuntu# zabbix_get -s x.x.x.x -k agent.version
zabbix_get [30913]: Check access restrictions in Zabbix agent configuration
My agentd.conf file is
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server
and I want to know how to edit configuration file for successfully run zabbix_get. Where is the problem?
Server=127.0.0.1
ServerActive=127.0.0.1
=> only 127.0.0.1 is allowed to ask for any metric from the agent.
Add IP of your connection there and then you will see response. It can be public ip (x.x.x.x), but it can be more complicated as well. Increase log level and check zabbix agent log, which IP is actually used.
Server=127.0.0.1,<ip of your connection>
zabbix-get new version works for me.
root#xxx:/# apt install zabbix-get
root#xxx:/# zabbix_get --version
zabbix_get (Zabbix) 4.4.10
root#xxx:/# zabbix_get -s 127.0.0.1 -k agent.version
4.4.7

PredictionIO unnable to get engine running on AWS

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