SEMS Inactive Status

Hi!

I have sems installed on an individual server and not starting up. Not sure where I have configured wrong. The version is 1.12.

I have enabled and started the sems service, but its on the inactive state.

Any assistance appreciated. :slight_smile:

SEMS Status
==================================================
root@debian:~# systemctl status sems
● sems.service - SEMS for YETI project
Loaded: loaded (/lib/systemd/system/sems.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2023-05-01 18:17:47 BST; 3s ago
Docs: https://yeti-switch.org/docs/
Process: 3376 ExecStart=/usr/sbin/sems -f /etc/sems/sems.conf (code=exited, status=0/SUCCESS)
Main PID: 3376 (code=exited, status=0/SUCCESS)
CPU: 77ms

May 01 18:17:47 debian sems[3376]: [3425/AmThread.cpp:98] INFO: Thread yeti-cdr-wr 140150915880704 is ending
May 01 18:17:47 debian sems[3376]: [3419/AmThread.cpp:98] INFO: Thread async_redis 140150922196736 is ending
May 01 18:17:47 debian sems[3376]: [3420/AmThread.cpp:98] INFO: Thread async_redis 140150921144064 is ending
May 01 18:17:47 debian sems[3376]: [3427/yeti:yeti.cpp:382] INFO: yeti-worker finished
May 01 18:17:47 debian sems[3376]: [3427/AmThread.cpp:98] INFO: Thread yeti-worker 140150913775360 is ending
May 01 18:17:47 debian sems[3376]: [3376/yeti:SqlRouter.cpp:88] INFO: SqlRouter instance[0x55aaa1a53dc8] destroyed
May 01 18:17:47 debian sems[3376]: [3376/AmEventQueueProcessor.cpp:145] INFO: requesting worker to stop.
May 01 18:17:47 debian sems[3376]: [3428/AmThread.cpp:98] INFO: Thread event-queue 140150912722688 is ending
May 01 18:17:47 debian sems[3376]: [3376/sems.cpp:941] INFO: Exiting (success)
May 01 18:17:47 debian systemd[1]: sems.service: Succeeded.
root@debian:~#

sems.conf
========================================================
cat /etc/sems/sems.conf
general {
stderr = no
syslog_loglevel = 2
syslog_facility = LOCAL0

node_id = 8

shutdown_mode {
    code = 508
    reason = "Yeti node in shutdown mode"
    allow_uac = true
}

media_processor_threads = 4
rtp_receiver_threads = 4
session_processor_threads = 20
sip_udp_server_threads = 2
sip_tcp_server_threads = 2

dead_rtp_time=30

default_bl_ttl=0

symmetric_rtp_mode = packets
symmetric_rtp_packets = 20

}

signaling-interfaces {
interface internal {
default-media-interface = internal
ip4 {
sip-udp {
address = 192.168.1.58
port = 5060
use-raw-sockets = off
}
sip-tcp {
address = 192.168.1.58
port = 5060
connect-timeout = 2000
static-client-port = on
idle-timeout=900000
use-raw-sockets = off
}
}
}
}

media-interfaces {
interface internal {
ip4 {
rtp {
address = 192.168.1.58
low-port = 16384
high-port = 32767
dscp = 46
use-raw-sockets = off
}
}
}
}

modules {
module “di_log” {}
module “mp3” {}
module “opus” {}
module “wav” {}
module “gsm” {}
module “ilbc” {}
module “adpcm” {}
module “l16” {}
module “g722” {}

module "registrar_client" {}
module "sctp_bus" {}
module "session_timer" {}
module "jsonrpc" {
    listen{
        address = 127.0.0.1
        port = 7080
    }
    server_threads = 1
}

module "http_client" {}

module-global "uac_auth" {}
module "options_prober" {}

module "radius_client" {}

module "yeti" {
    pop_id = 1
    lega_cdr_headers {
        header(p-charge-info, string)
        header(diversion, array)
    }

    auth {
        realm = yeti-switch
    }

    msg_logger_dir = /var/spool/sems/dump
    audio_recorder_dir = /var/spool/sems/records
    audio_recorder_compress = true

    db_refresh_interval = 5
    ip_auth_reject_if_no_matched = true

    routing {
        schema = switch20
        function = route_release
        init = init
        master_pool {
            host = 192.168.1.51
            port = 5432
            name = yeti
            user = yeti
            pass = yeti
            size = 4
            check_interval = 10
            max_exceptions = 0
            statement_timeout=3000
        }
        failover_to_slave = false
        slave_pool {
            host = 127.0.0.1
            port = 5432
            name = yeti
            user = yeti
            pass = somepassword
            size = 4
            check_interval = 10
            max_exceptions = 0
            statement_timeout=3000
        }
    }
    cdr {
        dir = /var/spool/sems/cdrs
        completed_dir = /var/spool/sems/cdrs/completed
        pool_size = 2
        schema = switch
        function = writecdr
        master {
            host = 192.168.1.53
            port = 5432
            name = cdr
            user = cdr
            pass = cdr
        }
        failover_to_slave = false
        slave {
            host = 127.0.0.1
            port = 5433
            name = cdr
            user = cdr
            pass = somepassword
        }
        failover_requeue = true
        failover_to_file = false
        serialize_dynamic_fields = true
        batch_size = 1
        batch_timeout = 5000
    }
    resources {
        reject_on_error = false
        write {
            host = 127.0.0.1
            port = 6379
            size = 2
            timeout = 500
        }
        read {
            host = 127.0.0.1
            port = 6379
            size = 2
            timeout = 1000
        }
    }
    registrations {
        check_interval = 5000
    }
    registrar {
        enabled = true
        expires_min = 600
        expires_max = 7200
        expires_default = 1200
        redis {
            host = 192.168.1.55
            port = 6379
        }
    }
    rpc {
        calls_show_limit = 10000
    }
    core_options_handling = yes
}

}

routing {
application = yeti
}

Many Thanks!

  1. Could you format your post properly?
  2. There are no enough logs. Provide more logs where ERROR message visible.

Hi,

I have amended the post as requested.

Not sure why the sems status is on Inactive (dead) state when it should be on active.
Also with regards to the error logs, I get the following lines from “sems -E -D3”

[3901/3901] [yeti:CodecsGroup.cpp:80] ERROR: Ignoring unknown payload: G729/8000
[3901/3901] [yeti:CodecsGroup.cpp:80] ERROR: Ignoring unknown payload: speex/8000
[3901/3901] [yeti:CodecsGroup.cpp:80] ERROR: Ignoring unknown payload: G723/8000
[3901/3960] [yeti:resources/RedisConnPool.cpp:68] ERROR: [0x55eff8bd0158] failed conn for read redis pool <host = 127.0.0.1:6379>
[3901/3961] [yeti:resources/RedisConnPool.cpp:68] ERROR: [0x55eff8bcff40] failed conn for write redis pool <host = 127.0.0.1:6379>
[3901/3945] [yeti:RedisConnection.cpp:138] ERROR: redis reg_subscription[0x55eff8ce53d0] 192.168.1.55:6379: Connection refused
[3901/3944] [yeti:RedisConnection.cpp:138] ERROR: redis reg[0x55eff8cb2870] 192.168.1.55:6379: Connection refused
[3901/3951] [yeti:resources/ResourceCache.cpp:306] ERROR: get connection can’t get connection from write redis pool. retry every 1s
[3901/3951] [yeti:resources/ResourceCache.cpp:99] ERROR: can’t init resources. stop

Thanks

Hi!

I was able to solve this and now its on active status. However when I check the logs, I can still see the below error.

[4973/4973] [sip/udp_trsp.cpp:124] ERROR: bind: Address already in use
[4973/4973] [SipCtrlInterface.cpp:115] ERROR: Could not bind SIP/UDP socket to 127.0.0.1:5061

Config as follows

signaling-interfaces {
interface internal {
default-media-interface = internal
ip4 {
sip-udp {
address = 127.0.0.1
port = 5061
use-raw-sockets = off
}
sip-tcp {
address = 127.0.0.1
port = 5060
connect-timeout = 2000
static-client-port = on
idle-timeout=900000
use-raw-sockets = off
}
}
}
}

media-interfaces {
interface internal {
ip4 {
rtp {
address = 127.0.0.1
low-port = 16384
high-port = 32767
dscp = 46
use-raw-sockets = off
}
}
}
}

==============================
netstat -lpn | grep sems
tcp 0 0 127.0.0.1:5060 0.0.0.0:* LISTEN 4907/sems
tcp 0 0 127.0.0.1:7080 0.0.0.0:* LISTEN 4907/sems
sctp 127.0.0.1:10101 LISTEN 4907/sems
udp 0 0 127.0.0.1:5061 0.0.0.0:* 4907/sems
root@debian:~#