I have the following yml:
mongo:
version: 2.6.9
repo: http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/RPMS/
maxconns: 40
standalonedb_host: myhost0001.ab-xy.aws.com
standalonedb_port: 8399
standalonedb: "{{standalonedb_host}}:{{standalonedb_port}}"
I get a syntax error though, on the standalonedb_host line. What am I doing wrong?
edit: Oddly enough, if I de-indent the standalonedb vars, the errors go away. If I add spaces again, the error returns.
The issue is that you have a key/value pair nested under a key/value pair ie standalonedb_host: myhost0001.ab-xy.aws.com (and the rest of the standalonedb_* config) is nested under maxconns: 40.
Depending on your configuration, either of the following should fix the issue:
Remove the nesting:
mongo:
version: 2.6.9
repo: http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/RPMS/
maxconns: 40
standalonedb_host: myhost0001.ab-xy.aws.com
standalonedb_port: 8399
standalonedb: "{{standalonedb_host}}:{{standalonedb_port}}"
Remove the value in maxconns so the standalonedb_*-related hash becomes the value of the maxconns key:
mongo:
version: 2.6.9
repo: http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/RPMS/
maxconns:
standalonedb_host: myhost0001.ab-xy.aws.com
standalonedb_port: 8399
standalonedb: "{{standalonedb_host}}:{{standalonedb_port}}"
Related
I'm using Resilience4j and I need to ignore some exceptions when using Retry. One of the exceptions is the: org.springframework.web.reactive.function.client.WebClientResponseException$BadRequest
resilience4j.retry:
instances:
testA:
maxAttempts: 5
waitDuration: 100ms
ignoreExceptions:
- org.springframework.web.reactive.function.client.WebClientResponseException$BadRequest
- java.net.ConnectException
- java.lang.ArithmeticException
But I am not able to run the application because of the character $, the error occurs:
Missing property (BadRequest) for Groovy template expansion. Defined
keys [parent, inspectClassesForKotlinIC, projects ...
How can I use/escape this character inside application.yml file? The exception I need to ignore is the Bad Request, its full name contains the $. If I remove the $ character the application runs normally, but I can't remove it because it's part of the exception's full name.
I used what #injecteer suggested and it worked.
I have been trying to make use of the keyword needs (following the doc) to control the order of installation of the releases.
Here is my helmfile:
helmDefaults:
createNamespace: false
timeout: 600
helmBinary: /usr/local/bin/helm
releases:
- name: dev-sjs-pg
chart: ../helm_charts/sjs-pg
- name: dev-sjs
chart: ../helm_charts/sjs
needs: ['dev-sjs-pgg']
Regarding versions:
helmfile version v0.139.9
helm version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"clean", GoVersion:"go1.15.11"}
When I run helmfile sync , both releases are installed simultaneously. In particular, there is no error due to my spelling error (dev-sjs-pgg instead of dev-sjs-pg). It is like needs is just not read.
Could you help me understanding what I am doing wrong please ?
I tried to reproduce this. When executing helmfile --log-level=debug sync I see in the debug log:
processing 2 groups of releases in this order:
GROUP RELEASES
1 dev-sjs-pg
2 dev-sjs
I also see these are deployed one after another (just a few seconds difference because I am deploying a fast nginx chart):
I try to follow the Laradock getting started tutorial on windows: http://laradock.io/getting-started/
I have the following tools:
Docker version: 20.10.5, build 55c4c88
git version: 2.30.2.windows.1
Windows 10 20H2(19042.867)
I get stuck on the step when trying to start the: docker-compose up -d nginx mysql
Then I get these error:
ERROR: The Compose file '.\docker-compose.yml' is invalid because:
services.proxy.expose is invalid: should be of the format 'PORT[/PROTOCOL]'
services.proxy2.expose is invalid: should be of the format 'PORT[/PROTOCOL]'
services.proxy.ports contains an invalid type, it should be a number, or an object
services.proxy2.ports contains an invalid type, it should be a number, or an object
...
services.sqs.ports contains an invalid type, it should be a number, or an object
services.sqs.ports contains an invalid type, it should be a number, or an object
services.traefik.ports value [':', ':', ':'] has non-unique elements
Only change I done to the repo is to add the env file and this line:
# Point to the path of your applications code on your host
APP_CODE_PATH_HOST=../project-z/
I also created the folder project-z
I saw this text quote but didn´t understand it:
Depending on the host’s operating system you may need to change the
value given to COMPOSE_FILE. When you are running Laradock on Mac OS
the correct file separator to use is :. When running Laradock from a
Windows environment multiple files must be separated with ;.
But think it might be related to my issue and I need to update something to make it work on Windows.
Any idea what could be wrong? Since it almost out of the box I assume it´s something with my Windows environment
I found the solution directly after posted this question.
It was very easy I forgot to add the "." before env when created the file.
I found the solution here: https://github.com/laradock/laradock/issues/1437
So I am trying to learn CircleCI and been following the getting started tutorial: https://circleci.com/docs/2.0/getting-started/
config.yml:
version: 2
jobs:
one:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A first hello"
- run: sleep 25
two:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A more familiar hi"
- run: sleep 15
workflows:
version: 2
one_and_two:
jobs:
- one
- two
This returns
Error: Unable to parse YAML
mapping values are not allowed here
in 'string', line 2, column 6:
jobs:
^
I don't understand the problem. From the documentation, it appears that it is the correct indentation level. So what is the source of this error, exactly?
The documentation shows clearly that version and jobs must be on the same indentation level. If you indent jobs more, you make it part of the scalar 2.
This would be valid YAML:
version: 2
jobs
and equalivalent to:
version: 2 jobs
However, the : after jobs makes it invalid since YAML does not allow implicit keys to be multi-line (version: would be a proper implicit key).
To fix the error, simply do not indent jobs more than version.
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