Hello,
I'm trying to deploy Kamailio on Kubernetes (AWS EKS with Network Load Balancer) but
I'm not able to register using TCP.
I'm using official Docker image 5.5.0-buster.
I did some tests with Docker Compose and it worked fine, but on K8S it does not :-(
Here are my logs:
Listening on
udp: 127.0.0.1:5060
udp: 172.31.4.29:5060
udp: 172.31.0.221:5060
tcp: 127.0.0.1:5060
tcp: 172.31.4.29:5060
tcp: 172.31.0.221:5060
Aliases:
tcp: ip-172-31-0-221.eu-central-1.compute.internal:5060
tcp:
172-31-4-29.kube-prometheus-stack-prometheus-node-exporter.infra-prometheus.svc.cluster.local:5060
tcp: localhost4.localdomain4:5060
tcp: localhost4:5060
tcp: localhost.localdomain:5060
tcp: localhost:5060
udp: ip-172-31-0-221.eu-central-1.compute.internal:5060
udp:
172-31-4-29.kube-prometheus-stack-kubelet.kube-system.svc.cluster.local:5060
udp: localhost4.localdomain4:5060
udp: localhost4:5060
udp: localhost.localdomain:5060
udp: localhost:5060
0(1) INFO: <core> [core/tcp_main.c:4983]: init_tcp(): using epoll_lt as the io
watch method (auto detected)
0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe
module is not loaded
0(1) INFO: rr [rr_mod.c:188]: mod_init(): outbound module not available
0(1) INFO: <core> [main.c:3030]: main(): processes (at least): 41 - shm size:
67108864 - pkg size: 8388608
0(1) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is
initially 212992
0(1) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is
finally 425984
0(1) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is
initially 212992
0(1) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is
finally 425984
0(1) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is
initially 212992
0(1) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is
finally 425984
29(35) INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/35
31(37) INFO: ctl [io_listener.c:213]: io_listen_loop(): io_listen_loop: using epoll_lt io
watch method (config)
35(41) INFO: <core> [core/parser/parse_fline.c:147]: parse_first_line(): method not
followed by SP
35(41) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line():
parse_first_line: bad message (offset: 0)
35(41) ERROR: <core> [core/parser/msg_parser.c:747]: parse_msg(): ERROR: parse_msg:
message=<>
35(41) ERROR: <core> [core/receive.c:374]: receive_msg(): core parsing of SIP
message failed (194.230.146.66:9055/2)
And my service:
apiVersion: v1
kind: Service
metadata:
name: kamailio-tcp
annotations:
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes:
preserve_client_ip.enabled=true
service.beta.kubernetes.io/aws-load-balancer-type: external
labels:
app.kubernetes.io/instance: test-sip
app.kubernetes.io/name: kamailio-tcp
app.kubernetes.io/version: 5.5.0-buster
spec:
type: LoadBalancer
externalTrafficPolicy: Local
ports:
- name: sip-tcp
nodePort: 30567
port: 5060
protocol: TCP
targetPort: 5060
selector:
app.kubernetes.io/instance: test-sip
app.kubernetes.io/name: kamailio
I have a Netwok Load Balancer create with a listener for TCP 5060 but when I try to
connect with Zoiper or Linphone, it does not work :-(
I used tcpdump on my pod and it received well some SIP commands.
Any ideas of what could be wrong here?
Thanks in advance!
Cedric