Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The file /path/to/BGPalerter/config.yml is not valid yml: unknown tag !<tag #218

Closed
alias-dmesg opened this issue Apr 27, 2020 · 3 comments
Labels
bug Something isn't working next release Implemented but will be released with the next release

Comments

@alias-dmesg
Copy link

Describe the bug
New BGPalerter installation on Ubuntu. Configuration done on first run. Crtl to exit and second run of the binary. Exception on second run of the binary.

Provide an example

vagrant@srv:~/BGPalerter$ ./bgpalerter-linux-x64
Impossible to load config.yml. A default configuration file has been generated.
BGPalerter, version: 1.24.0 environment: production
Loaded config: /home/vagrant/BGPalerter/config.yml
? The file prefixes.yml cannot be loaded. Do you want to auto-configure BGPalerter? Yes
? Which Autonomous System(s) you want to monitor? (comma-separated, e.g. 2914,3333) 3333
? Are there sub-prefixes delegated to other ASes? (e.g. sub-prefixes announced by customers) No
? Do you want to be notified when your AS is announcing a new prefix? Yes
Generating monitoring rule for 193.0.22.0/23
Generating monitoring rule for 193.0.10.0/23
Generating monitoring rule for 193.0.12.0/23
Generating monitoring rule for 2001:67c:2e8::/48
Generating monitoring rule for 193.0.20.0/23
Generating monitoring rule for 193.0.18.0/23
Generating monitoring rule for 193.0.0.0/21
Generating generic monitoring rule for AS 3333
Done!
Monitoring 193.0.0.0/21
Monitoring 193.0.22.0/23
Monitoring 193.0.18.0/23
Monitoring 193.0.20.0/23
Monitoring 193.0.12.0/23
Monitoring 193.0.10.0/23
Monitoring 2001:67c:2e8::/48
Monitoring AS 3333
^C

vagrant@srv:~/BGPalerter$ ./bgpalerter-linux-x64
pkg/prelude/bootstrap.js:1248
      throw error;
      ^

Error: The file /home/vagrant/BGPalerter/config.yml is not valid yml: unknown tag !<tag
    at Object.<anonymous> (/snapshot/build/src/env.js:116:11)
    at Module._compile (pkg/prelude/bootstrap.js:1324:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:993:10)
    at Module.load (internal/modules/cjs/loader.js:813:32)
    at Function.Module._load (internal/modules/cjs/loader.js:725:14)
    at Module.require (internal/modules/cjs/loader.js:850:19)
    at Module.require (pkg/prelude/bootstrap.js:1229:31)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/snapshot/build/src/consumer.js:8:35)
    at Module._compile (pkg/prelude/bootstrap.js:1324:22)

Expected behavior
bgpalerter should read config.yml and prefixes.yml and continue monitoring prefixes for our ASN. I use your ASN on first try with same results. For this report, I also tried 3333 with same results.

Are you using the binary or the source code?
I'm using binary for Linux

vagrant@srv:~/BGPalerter$ wget https://github.com/nttgin/BGPalerter/releases/download/v1.24.0/bgpalerter-linux-x64

My server is on Ubuntu 19.10

Your information
Alfred
Simula

@alias-dmesg alias-dmesg added the bug Something isn't working label Apr 27, 2020
@massimocandela
Copy link
Member

massimocandela commented Apr 27, 2020

Hello Alfred,

Thanks for reporting.
The issue doesn't look coming from the auto configuration wizard but from the config.yml file which is automatically downloaded from github.

Could you please attach config.yml?

edit: reading from your description, it looks like you didn't edit config.yml. If you did, please check it for correctness and especially wipe possible credentials before sharing!

@massimocandela
Copy link
Member

I was able to reproduce it. If the download of the default config file fails, BGPalerter tries to persist a basic config that is shipped with the application. This second step in some cases was not working properly. I fixed this in #222

It will go out with the next release. Thanks for reporting.

@massimocandela massimocandela added the next release Implemented but will be released with the next release label Apr 28, 2020
@massimocandela
Copy link
Member

massimocandela commented Apr 29, 2020

I forgot to mention: to solve your problem just delete config.yml, download this one and rename it to config.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next release Implemented but will be released with the next release
Projects
None yet
Development

No branches or pull requests

2 participants