CyCoreSystems / asterisk-k8s-demo

Demo of scalable Asterisk on Kubernetes
Apache License 2.0
158 stars 72 forks source link

Pod asterisk & kamailio CrashLoopBackOff #10

Closed atsip76 closed 4 years ago

atsip76 commented 4 years ago

Good afternoon! Tell me what is my mistake. POD kamailio CrashLoopBackOff: ERROR: bad config file (3 errors): parse error in config file /data/kamailio/local.k, line 4, column 36: ip address, interface name or hostname expected POD asterisk CrashLoopBackOff container config: ERROR failed to render defaults: template: t: 14: 25: executing "t" at <.Network>: error calling Network: invalid response Tell me what is the problem? Thank.

Ulexus commented 4 years ago

This sounds like the network detection is failing. Under what environment (cloud provider or baremetal) are you running this kubernetes cluster? What have you set for your CLOUD variable?

atsip76 commented 4 years ago

Thanks for the help. The problem is caused by the creation of a private cluster.

Martin-Hogge commented 4 years ago

Hi, I'm facing the same issue. Kamalio container is failing with

0(1) CRITICAL: <core> [core/cfg.y:3507]: yyerror_at(): parse error in config file /data/kamailio/local.k, line 4, column 1-6: syntax error
0(1) CRITICAL: <core> [core/cfg.y:3507]: yyerror_at(): parse error in config file /data/kamailio/local.k, line 4, column 1-6: hostname expected
0(1) CRITICAL: <core> [core/cfg.y:3507]: yyerror_at(): parse error in config file /data/kamailio/local.k, line 4, column 11-16: syntax error
0(1) CRITICAL: <core> [core/cfg.y:3507]: yyerror_at(): parse error in config file /data/kamailio/local.k, line 4, column 11-16: ip address, interface name or hostname expected
0(1) CRITICAL: <core> [core/cfg.y:3507]: yyerror_at(): parse error in config file /data/kamailio/local.k, line 4, column 18-26:

I'm running kubernetes on premise with Rancher Kubernetes Engine (RKE).

@Ulexus Could you help me about the CLOUD variable you're speaking of ? I saw it is set to gcp by default but I have no idea what are the possible values neither I can find any documentation about it.

@atsip76 Could you explain to me what did you mean by

The problem is caused by the creation of a private cluster.

And what was the solution you came up with ?

Thanks.

juansalvatella commented 4 years ago

You can find all the possible values of the CLOUD variable here: https://github.com/CyCoreSystems/netdiscover#supported-providers

Martin-Hogge commented 4 years ago

Thank you. And what are the options in case I'm not using one of the cloud providers ? My Kubernetes cluster is setup on-premise (nodes are VM hosted on OVH).

Ulexus commented 4 years ago

Just set CLOUD="" It will use a public service (jsonip.io, run by CyCore Systems) to determine the public IP information.

Ulexus commented 4 years ago

If you have more esoteric needs, you can also write your own generator for local.k, and I'd be happy to add support for OVH if I could make any sense of their documentation.

Martin-Hogge commented 4 years ago

Thanks for your help ! Setting CLOUD="" solved this issue. But I'm still having some problems to get my Asterisk instance running. To not polluate this closed thread I've created another post at : https://github.com/CyCoreSystems/asterisk-k8s-demo/issues/15