Kibana 4.4.2 Environment variable in config file - ruby

Edit For anyone wanting updates, here is a link to the issue I created to hopefully get this added:
https://github.com/elastic/kibana/issues/6688
When I setup Elasticsearch I can have entries in the config file that reference environment variables (this is on RHEL - Linux):
var.name: ${ENV_VAR}/something
This works for Elasticsearch.
I want to do the same for Kibana:
logging.dest: ${ELK_HOME}/log/kibana.log
Problem is, in this case I get an error:
events.js:141
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open '${ELK_HOME}/log/kibana.log'
at Error (native)
Finished
Any ideas how I make the Kibana kibana.yml config file use environment variables?

Related

Use Apache Daffodil cmd interface

I am new to Apache Daffodil and am trying to follow the example provided: https://daffodil.apache.org/examples/
I am trying to parse the file, simpleCSV using the schema, csv.dfdl.xsd. Both files are in the same folder as the daffodil.bat folder.
In cmd, I run .\daffodil.bat parse --schema csv.dfdl.xsd simpleCSV.csv
I get the error:
[error] Schema Definition Error: Error loading schema due to org.xml.sax.SAXParseException; DaffodilXMLLoader: Unable to resolve schemaLocation='csv-base-format.dfdl.xsd'.
Schema context: file:/C:/Users/rinat/OneDrive/Desktop/WORK%20STUFF/apache-daffodil-3.4.0-bin/apache-daffodil-3.4.0-bin/bin/csv.dfdl.xsd Location in file:/C:/Users/rinat/OneDrive/Desktop/WORK STUFF/apache-daffodil-3.4.0-bin/apache-daffodil-3.4.0-bin/bin/csv.dfdl.xsd`
How do I resolve this?
You need to copy csv-base-format.dfdl.xsd (found in the same src/ directory as csv.dfdl.xsd) into the same directory as your csv.dfdl.xsd file. That file provides a number of default settings imported by csv.dfdl.xsd, so they must be in the same directory.

Vagrant - Deleting old boxes

C:\Users\user\Documents\Code\stores (master -> origin)
λ vagrant box remove --all
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: C:/Users/user/Documents/Code/stores/Vagrantfile
Line number: 0
Message: LoadError: cannot load such file -- C:/Users/user/Documents/Code/stores/vendor/laravel/homestead/scripts/homestead.rb
Hello, I am trying to delete some old boxes. the code no longer exists so vagrant is complaining with the above error. How can I resolve this?
I deleted all the files from C:\Users\user.vagrant.d\boxes

Invalid Yaml: mapping values are not allowed here

Can anyone help me to figure out the following error while deploying react app on AWS elastic beanstalk -
2019-08-01 04:37:21 ERROR The configuration file .ebextensions/nodecommand.
config in application version app-5466-190801_100700 contains invalid YAML or JS
ON. YAML exception: Invalid Yaml: mapping values are not allowed here
in "<reader>", line 3, column 16:
option_settings:
^
, JSON exception: Invalid JSON: Unexpected character (/) at position 0.. Update
the configuration file.
2019-08-01 04:37:21 ERROR Failed to deploy application.
Following is my nodecommand.config file -
option_settings:
aws: elasticbeanstalk:container:nodejs:
NodeCommand: "node server.compiled.js"
Update -
I followed this link to deploy React app on AWS elastic beanstalk and stuck on above error -
https://medium.com/#wlto/how-to-deploy-an-express-application-with-react-front-end-on-aws-elastic-beanstalk-880ff7245008
This is what's shown in the linked tutorial:
option_settings:
aws:elasticbeanstalk:container:nodejs:
NodeCommand: "node server.compiled.js"
This is the YAML in your question:
option_settings:
aws: elasticbeanstalk:container:nodejs:
NodeCommand: "node server.compiled.js"
Can you spot the difference?
Spoiler: You've put a space after aws:. This causes the YAML parser to assume aws: is a mapping key with the value "elasticbeanstalk:container:nodejs:". However, the next line, which also starts with a mapping key (NodeCommand), is indented more, which would only be allowed if the previous line was a mapping key without a value.
If you remove the space, it correctly parses aws:elasticbeanstalk:container:nodejs as a mapping key and the following line as its value.
I was not actually had the problem fixed. I found this document[1] that says because my environment is using Amazon Linux 2, the ebextensions is not recommended. (But some of my ebextensions are still working. I have no idea about that). Instead, Buildfile, Procfile, and platform hooks are recommended. Therefore, I created a Procfile with the following content to make the Node server run with the command node index.js.
Procfile
web: node index.js
[1] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html

Postgraphile - "Query Root must be provided" error message

We have an existing postgresql database with data and we are experimenting with postgraphile as a graphql API. We are running into an error that is leaving us scratching our head. the server runs fine but we get the following:
postgraphile -c postgres://username:password#localhost:5432/my_db
PostGraphile server listening on port 5000
‣ Connected to Postgres instance postgres://localhost:5432/my_db
‣ Introspected Postgres schema(s) public
‣ GraphQL endpoint served at http://localhost:5000/graphql
‣ GraphiQL endpoint served at http://localhost:5000/graphiql
* * *
An error occurred, it might be okay but it doesn't look like the error we were expecting... run with envvar 'DEBUG="graphile-build:warn"' to view the error
An error occurred, it might be okay but it doesn't look like the error we were expecting... run with envvar 'DEBUG="graphile-build:warn"' to view the error
Error: Query root type must be provided.
at assertValidSchema (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\node_modules\graphql\type\validate.js:78:11)
at Object.validate (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\node_modules\graphql\validation\validate.js:61:35)
at parseQuery (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\build\postgraphile\http\createPostGraphileHttpRequestHandler.js:208:48)
at Promise.all.paramsList.map (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\build\postgraphile\http\createPostGraphileHttpRequestHandler.js:469:63)
at Array.map (<anonymous>)
at requestHandler (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\build\postgraphile\http\createPostGraphileHttpRequestHandler.js:435:52)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
and when we navigate to localhost:500/graphiql we see a a "no schema available" in the documentation explorer.
is the query root the publicschema? or what are we missing?
Newer versions of PostGraphile have much more helpful error messages, often including a suggested solution. The "An error occurred" errors like those above now also contain a preview of the underlying error which helps with diagnosis.
There are instructions here on how to set the DEBUG environmental variable here: https://www.graphile.org/postgraphile/debugging/#debug-envvars
Here's how you might do it in Linux, macOS or Windows:
# Bash (Linux, macOS, etc)
export DEBUG="graphile-build:warn" postgraphile -c postgres://username:password#localhost:5432/my_db
# Windows Console
set DEBUG=graphile-build:warn & postgraphile -c postgres://username:password#localhost:5432/my_db
# Windows PowerShell
$env:DEBUG = "graphile-build:warn"; postgraphile -c postgres://username:password#localhost:5432/my_db

ProxyAuthentication fails while updating conda

I keep getting an error while updating conda:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/pkgs/r/noarch/repodata.json.bz2
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
ProxyError(MaxRetryError("HTTPSConnectionPool(host='repo.anaconda.com', port=443):
Max retries exceeded with url:
/pkgs/r/noarch/repodata.json.bz2 (
Caused by ProxyError(
'Cannot connect to proxy.',
OSError('Tunnel connection failed: 407 Proxy Authentication Required',)))",
),
)
A reportable application error has occurred. Conda has prepared the above report.
Upload did not complete.
I tried this in the .condarc file
proxy_servers:
http: http://proxy.corp.local:8080
https: https://proxy.corp.local:8080
and
proxy_servers:
http: http://user:pass#corp.com:8080
https: https://user:pass#corp.com:8080
ssl_verify: True
ssl_verify: False
Regards
Bjorn
I also got the same error message and it is solved after googling so much.
Steps for solving the problem is given below
Create a .condrac file using the conda config command in command prompt or use a text editor to create a text file. I used conda config for creating the .condrac file
You can add following line into the .condrac file located in your user home directory or home
directory
proxy_servers:
http: http://username:password#proxyIP/Proxy URL:port no
https: http://username:password#proxyIP/ProxyURL:port no
ssl_verify: True
Same file can be copied into your anaconda home directory.(C:\ProgramData\Anaconda3 in my case)
Then run > conda update conda command from your prompt
Then you will be getting the result like below. C:\Users\USER.DESKTOP-BQVL8L4>conda update conda
Solving environment: done
Rerun your installation command. This solution worked well for me. Please try and let me know.
Copy files libcrypto-1_1-x64.dll and libssl-1_1-x64.dll
from the directory ./Anaconda3/Library/bin/
to ./Anaconda3/DLLs.
This method solved the problem that I had

Resources