kneodev / ksmppd

Kurt's SMPP Daemon (SMPP Server for Kannel)
Other
56 stars 38 forks source link

Can't get ESME status and Issues with ksmppd accessing database tables #139

Closed Nteka closed 3 years ago

Nteka commented 3 years ago

Hello!

I'm using ksmppd and I can't get the ESME status

Here are the results whenever I check for ESME status:

$ curl "http://localhost:14010/esme-status?password=ksmppdpass" Summary:

Unique known ESME's: 0 Total inbound processed:0 load: 0.00/0.00/0.00/sec Total outbound processed:0 load: 0.00/0.00/0.00/sec

May I know how are the ESME's defined; whether from configured SMSCs (depending on direction, i.e whether inbound or outbound), Users (in the 'smpp_user' table) or routes (from the 'smpp_route' table)

I'm using database for Authentication and Routing. I added both inbound and outbound routes in the 'smpp_route' table and I have set users in the 'smpp_user' table. When running the ksmppd the only warning I get is: WARNING: No 'database-version-table' specified, using default 'smpp_version' Can that be the issue? if it is how to go about it, as in the configuration groups database-version-table was not defined.

Additionaly, In the 'smpp_store' table I set routes based on the prefixes and whenever I send messages they do not seem to pick the SMSCs as set in the table, messages are just going randomly sometimes they pick the correct routes sometimes they don't and when DLRs are returned the same happens, so I guess the ksmppd does not have connection yet to the database tables.

NOTE: I have set all the tables in the kannel_smpp_demo database.

Below are logs when ksmppd runs:

2021-02-05 08:47:09 [3637] [0] INFO: Added logfile /tmp/ksmppd.log' with level0'. 2021-02-05 08:47:09 [3637] [0] INFO: SMPP ESME Default Max Open Acks set to 500 2021-02-05 08:47:09 [3637] [0] INFO: SMPP Wait ack behaviour 0 2021-02-05 08:47:09 [3637] [0] DEBUG: Blocking users for 300 seconds on 5 authentication failures 2021-02-05 08:47:09 [3637] [0] DEBUG: Initialize database type to MySQL 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: Connected to server at 127.0.0.1. 2021-02-05 08:47:09 [3637] [0] INFO: MYSQL: server version 8.0.22-0ubuntu0.20.04.3, client version 8.0.22. 2021-02-05 08:47:09 [3637] [0] WARNING: No 'database-version-table' specified, using default 'smpp_version' 2021-02-05 08:47:09 [3637] [0] DEBUG: Running database schema version 4 2021-02-05 08:47:09 [3637] [0] INFO: HTTP: Opening server at port 14010. 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 1 (fdset.c:poller) 2021-02-05 08:47:09 [3637] [1] DEBUG: Thread 1 (fdset.c:poller) maps to pid 3637. 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 2 (http.c:server_thread) 2021-02-05 08:47:09 [3637] [2] DEBUG: Thread 2 (http.c:server_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [2] DEBUG: HTTP: Including port 14010, fd 24 for polling in server thread 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 3 (smpp/libsmpp/smpp_http_server.c:smpp_http_server_request_handler) 2021-02-05 08:47:09 [3637] [0] INFO: Initializing database based routing 2021-02-05 08:47:09 [3637] [3] DEBUG: Thread 3 (smpp/libsmpp/smpp_http_server.c:smpp_http_server_request_handler) maps to pid 3637. 2021-02-05 08:47:09 [3637] [3] INFO: Starting HTTP Server thread on port 14010 2021-02-05 08:47:09 [3637] [0] INFO: Rebuilding database routes 2021-02-05 08:47:09 [3637] [0] DEBUG: No source-regex, allowing all toward ^(6800) 2021-02-05 08:47:09 [3637] [0] DEBUG: Added route direction = 2 <-> ksmppd3 for ^(6800) from via smppusera 2021-02-05 08:47:09 [3637] [0] DEBUG: No source-regex, allowing all toward ^(25568) 2021-02-05 08:47:09 [3637] [0] DEBUG: Added route direction = 2 <-> ksmppd20 for ^(25568) from via secondrytest 2021-02-05 08:47:09 [3637] [0] DEBUG: No source-regex, allowing all toward ^(25575) 2021-02-05 08:47:09 [3637] [0] DEBUG: Added route direction = 2 <-> ksmppd20 for ^(25575) from via secondrytest 2021-02-05 08:47:09 [3637] [0] DEBUG: No source-regex, allowing all toward ^(25576) 2021-02-05 08:47:09 [3637] [0] DEBUG: Added route direction = 2 <-> ProdServer for ^(25576) from via primarytest 2021-02-05 08:47:09 [3637] [0] DEBUG: Kannel ksmppd version svn-r5297M'. BuildOct 23 2020 15:34:27', compiler `9.3.0'. System Linux, release 5.4.0-62-generic, version #70-Ubuntu SMP Tue Jan 12 12:45:47 UTC 2021, machine x86_64. Hostname nteka, IP 127.0.1.1. Libxml version 2.9.10. Using OpenSSL 1.1.1f 31 Mar 2020. Compiled with MySQL 8.0.21, using MySQL 8.0.22. Using native malloc.

2021-02-05 08:47:09 [3637] [0] INFO: ---------------------------------------------- 2021-02-05 08:47:09 [3637] [0] INFO: KSMPPD kmppd version 1.0.1-55-gcfbbe52 starting 2021-02-05 08:47:09 [3637] [0] INFO: KSMPPD system platform amd64-ubuntu-20.04 2021-02-05 08:47:09 [3637] [0] INFO: ---------------------------------------------- 2021-02-05 08:47:09 [3637] [0] INFO: Starting SMPP server on port 2345 2021-02-05 08:47:09 [3637] [0] INFO: Successfully configured bearerbox 127.0.0.1:14001 KSMPPD 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 4 (smpp/libsmpp/smpp_bearerbox.c:smpp_bearerbox_inbound_thread) 2021-02-05 08:47:09 [3637] [4] DEBUG: Thread 4 (smpp/libsmpp/smpp_bearerbox.c:smpp_bearerbox_inbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [4] DEBUG: Bearerbox connection is dead, (re)connecting it 127.0.0.1:14001 KSMPPD 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 5 (smpp/libsmpp/smpp_bearerbox.c:smpp_bearerbox_outbound_thread) 2021-02-05 08:47:09 [3637] [5] DEBUG: Thread 5 (smpp/libsmpp/smpp_bearerbox.c:smpp_bearerbox_outbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [4] DEBUG: Connecting to <127.0.0.1> 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 6 (smpp/libsmpp/smpp_bearerbox.c:smpp_bearerbox_requeue_thread) 2021-02-05 08:47:09 [3637] [6] DEBUG: Thread 6 (smpp/libsmpp/smpp_bearerbox.c:smpp_bearerbox_requeue_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [4] INFO: Connected to bearerbox at 127.0.0.1 port 14001 using SSL. 2021-02-05 08:47:09 [3637] [6] INFO: Starting bearerbox requeue thread 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 7 (smpp/libsmpp/smpp_esme.c:smpp_esme_cleanup_thread) 2021-02-05 08:47:09 [3637] [0] DEBUG: Initializing SMPP Server queues 2021-02-05 08:47:09 [3637] [0] INFO: Starting simulation queue threads 2021-02-05 08:47:09 [3637] [7] DEBUG: Thread 7 (smpp/libsmpp/smpp_esme.c:smpp_esme_cleanup_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [7] DEBUG: ESME cleanup thread starting 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 8 (smpp/libsmpp/smpp_queues.c:smpp_queues_simulation_thread) 2021-02-05 08:47:09 [3637] [7] INFO: Current SMPP load is 0.000000/sec inbound 0.000000/sec outbound 2021-02-05 08:47:09 [3637] [8] DEBUG: Thread 8 (smpp/libsmpp/smpp_queues.c:smpp_queues_simulation_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [8] DEBUG: Starting simulation processor thread 2021-02-05 08:47:09 [3637] [4] INFO: Successfully connected and identified. 2021-02-05 08:47:09 [3637] [0] DEBUG: Staring 4 inbound queue threads 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 9 (smpp/libsmpp/smpp_queues.c:smpp_queues_inbound_thread) 2021-02-05 08:47:09 [3637] [9] DEBUG: Thread 9 (smpp/libsmpp/smpp_queues.c:smpp_queues_inbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [9] DEBUG: Starting inbound PDU processor thread 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 10 (smpp/libsmpp/smpp_queues.c:smpp_queues_inbound_thread) 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 11 (smpp/libsmpp/smpp_queues.c:smpp_queues_inbound_thread) 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 12 (smpp/libsmpp/smpp_queues.c:smpp_queues_inbound_thread) 2021-02-05 08:47:09 [3637] [0] DEBUG: Staring 4 outbound queue threads 2021-02-05 08:47:09 [3637] [12] DEBUG: Thread 12 (smpp/libsmpp/smpp_queues.c:smpp_queues_inbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 13 (smpp/libsmpp/smpp_queues.c:smpp_queues_outbound_thread) 2021-02-05 08:47:09 [3637] [12] DEBUG: Starting inbound PDU processor thread 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 14 (smpp/libsmpp/smpp_queues.c:smpp_queues_outbound_thread) 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 15 (smpp/libsmpp/smpp_queues.c:smpp_queues_outbound_thread) 2021-02-05 08:47:09 [3637] [13] DEBUG: Thread 13 (smpp/libsmpp/smpp_queues.c:smpp_queues_outbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [13] DEBUG: Starting outbound PDU processor thread 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 16 (smpp/libsmpp/smpp_queues.c:smpp_queues_outbound_thread) 2021-02-05 08:47:09 [3637] [15] DEBUG: Thread 15 (smpp/libsmpp/smpp_queues.c:smpp_queues_outbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [15] DEBUG: Starting outbound PDU processor thread 2021-02-05 08:47:09 [3637] [0] DEBUG: Started thread 17 (smpp/libsmpp/smpp_queues.c:smpp_queues_requeue_thread) 2021-02-05 08:47:09 [3637] [16] DEBUG: Thread 16 (smpp/libsmpp/smpp_queues.c:smpp_queues_outbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [16] DEBUG: Starting outbound PDU processor thread 2021-02-05 08:47:09 [3637] [14] DEBUG: Thread 14 (smpp/libsmpp/smpp_queues.c:smpp_queues_outbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [14] DEBUG: Starting outbound PDU processor thread 2021-02-05 08:47:09 [3637] [17] DEBUG: Thread 17 (smpp/libsmpp/smpp_queues.c:smpp_queues_requeue_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [17] DEBUG: Starting deliver_sm (and other?) requeue thread 2021-02-05 08:47:09 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:09 [3637] [10] DEBUG: Thread 10 (smpp/libsmpp/smpp_queues.c:smpp_queues_inbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [10] DEBUG: Starting inbound PDU processor thread 2021-02-05 08:47:09 [3637] [11] DEBUG: Thread 11 (smpp/libsmpp/smpp_queues.c:smpp_queues_inbound_thread) maps to pid 3637. 2021-02-05 08:47:09 [3637] [11] DEBUG: Starting inbound PDU processor thread 2021-02-05 08:47:10 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:11 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:12 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:13 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:14 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:15 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:16 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:17 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:18 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:19 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:20 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:21 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:22 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:23 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:24 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:25 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:26 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:27 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:28 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:29 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:30 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:31 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:32 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:33 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:34 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:35 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:36 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:37 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:38 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:39 [3637] [7] INFO: Current SMPP load is 0.000000/sec inbound 0.000000/sec outbound 2021-02-05 08:47:39 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:40 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:41 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:42 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:43 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:44 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:45 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:46 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:47 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:48 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:49 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:50 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:51 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:52 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:53 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:54 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:55 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:56 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:57 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:58 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:47:59 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:00 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:01 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:02 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:03 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:04 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:05 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:06 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:07 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:08 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check 2021-02-05 08:48:09 [3637] [7] INFO: Current SMPP load is 0.000000/sec inbound 0.000000/sec outbound 2021-02-05 08:48:09 [3637] [17] DEBUG: Load was 0.000000 for requeue (not busy), waiting before next check

donald-jackson commented 3 years ago

ESME's are those that are connected, from the status page you show it means there are no users connected.