Solr Http error: Http request failed. Could not resolve host:host - symfony

It's my first time I'm trying to use SolrBundle in my symfony project istalled on xampp. Always when I try to use solr:index:populate I receive error mentioned in title of the post. What am I doing wrong? Many thanks for help in advance. Below my configuration
config.yml
fs_solr:
endpoints:
core0:
host: host
port: 8983
path: /solr/core0
core: corename
timeout: 5

Related

Kong route and upstream server path

I have the following configuration of service with route in Kong:
- name: test
host: test-service
port: 80
protocol: http
path: /endpoint/
routes:
- name: test_route
strip_path: true
preserve_host: true
paths:
- /login
I am trying to understand the following behaviour:
when I access http://localhost/login, I will end up with the http://localhost/endpoint in my browser
however, when I try to access http://localhost/login/test/page, nothing will change and I am still in my browser on http://localhost/login/test/page and the upstream server served my request properly
My expectation was that using http://localhost/login/test/page, my browser will have eventually http://localhost/endpoint/test/page. Apparently I misunderstood it.
I understood that in this case, Kong will use the upstream path as /endpoint/test/page, because I have strip_path: true.
However, how it can be changed in case I want to end up with http://localhost/endpoint/test/page in case I will access http://localhost/login/test/page in my browser?

How can I check if my server is alive with metricbeat, Is it possible?

I've been using elasticsearch, metricbeat and elastalert to watch my server. I have nginx intalled on it that is been used as a reverse proxy and I need to send an to it if nginx drop or return some error, I have already some alerts configured but how can I make a rule to send alert to nginx when it drop or return some error.
Thank a lot
Metricbeat is just for data about the system resources usage. What you need is installing filebeat and activating the nginx module. Then you can use the rule type any of elastalert and filter by fileset.module: nginx and fileset.name: error:
name: your rule name
index: filebeat-*
type: any
filter:
- term:
fileset.module: "nginx"
- term:
fileset.name: "error"
alert:
- "slack"
... # your slack config stuff
realert:
minutes: 1

Bonsai Elasticsearch Heroku unknown error 52

I'm getting unknown error:52 when trying to connect to my Bonsai Elasticsearch on heroku.
I use FOSElastica with Symfony. It has worked before, but suddenly it has stopped.
These are my settings:
fos_elastica:
clients:
default:
host: %elasticsearch.host%
port: %elasticsearch.port%
headers:
Authorization: "Basic %elasticsearch.token%"
Where the elasticsearch.token is generated using this:
php -r "Print base64_encode('your_auth_username' . ':' . 'your_auth_password');"
My host is of the format:
username:password#myhost.net
And my port is: 443 (80 doesn't work as wel).
No further logging is given ...
Try remove headers, it helped me.

Unrecognized options "scheme, cluster, url" under "lopi_pusher"

I'm using LopiPusherBundle for Getting following error while clearing the cache in symfony 2.7.26
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized options "scheme, cluster, url" under "lopi_pusher"
# app/config/config.yml
lopi_pusher:
scheme: http
host: api.pusherapp.com
port: 80
cluster: ap2
timeout: 30
debug: false
app_id: <app_id>
key: <key>
secret: <secret>
url: <scheme>://<key>:<secret>#<host>[:<port>]/apps/<app-id>
auth_service_id: my_channel_authenticator
Your installed version is smaller than 1.3 and these options are not available.
You can see this here https://github.com/laupiFrpar/LopiPusherBundle/blob/1.2.9/DependencyInjection/Configuration.php
Check your composer.json and make sure the correct version is there
You can just use
"laupifrpar/pusher-bundle": "*"
Dont forget to update your dependency after modifying composer.json using
composer update "laupifrpar/pusher-bundle"

Configuring URI prefix for REST webservice in dropwizard

I am developing a REST API using dropwizard. The resource can be accessed using https://<host>:port/item/1. As it can be seen there is no URI prefix. If I have to configure a URI prefix what needs to be done. Can it be configured in yaml configuration file?
Thanks!
Yes the URI prefix a.k.a root path can be configured in YAML. You could use the simple server factory configuration. It's simple, add these two lines in your YAML. I've used 'api' as the prefix. You can replace it with the URI prefix you want.
server:
rootPath: '/api/*'
A slightly more elaborate server configuration looks something like this,
server:
adminConnectors:
-
port: 18001
type: http
adminContextPath: /admin
applicationConnectors:
-
port: 18000
type: http
rootPath: /api/*
type: default
You can refer to this example https://github.com/dropwizard/dropwizard/blob/master/dropwizard-example/example.yml for server and other configuration details.
It's also a good idea to go through this if you are just getting started with dropwizard http://www.dropwizard.io/0.9.2/docs/getting-started.html

Resources