sipcapture / heplify-server

HEP Capture Server for HOMER
https://sipcapture.org
GNU Affero General Public License v3.0
184 stars 85 forks source link

The Homer server uses 9060 to receive hepagent message on UDP 9060 port, but which port for TCP? #481

Closed pengweichu closed 3 years ago

pengweichu commented 3 years ago

The Homer server uses 9060 to receive hepagent message on UDP 9060 port, but which port for TCP?

adubovikov commented 3 years ago

https://github.com/sipcapture/heplify-server/blob/3294c40c4e56bcfecfe621b5f5c4d8fcfbeb92b9/example/homer7_config/heplify-server.toml#L2

adubovikov commented 3 years ago

@pengweichu add a new star here: https://github.com/sipcapture/homer/stargazers

pengweichu commented 3 years ago

https://github.com/sipcapture/heplify-server/blob/3294c40c4e56bcfecfe621b5f5c4d8fcfbeb92b9/example/homer7_config/heplify-server.toml#L2

pengweichu commented 3 years ago

I've set up the 9061 for TCP, and restarted Linux server, and start the homer service, but the 9061 still not opened.

Below is the heplify-server.toml

HEPAddr               = "0.0.0.0:9060"
HEPTCPAddr            = "0.0.0.0:9061"
HEPTLSAddr            = "0.0.0.0:9060"
HEPWSAddr             = "0.0.0.0:3000"

After saved it, then perform below: reboot now

After reboot, perform below, but the 9060 and 9061 both are not listened:

root@ip-17:/home/admin# systemctl start heplify-server.service
root@ip-17:/home/admin# lsof -i:9061
root@ip-17:/home/admin# lsof -i:9060
root@ip-17:/home/admin# lsof -i:9080
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
homer-app 578 root    8u  IPv6  17769      0t0  TCP *:9080 (LISTEN)
adubovikov commented 3 years ago

lsof -p 578

pengweichu commented 3 years ago

lsof -p 578

root@ip-172:/home/admin# lsof -p 578
COMMAND   PID USER   FD      TYPE             DEVICE SIZE/OFF   NODE NAME
homer-app 578 root  cwd       DIR              202,1     4096 658706 /usr/local/homer
homer-app 578 root  rtd       DIR              202,1     4096      2 /
homer-app 578 root  txt       REG              202,1 18194432 284986 /usr/local/bin/homer-app
homer-app 578 root    0r      CHR                1,3      0t0   6614 /dev/null
homer-app 578 root    1u     unix 0xffff8adab6546000      0t0  17741 type=STREAM
homer-app 578 root    2u     unix 0xffff8adab6546000      0t0  17741 type=STREAM
homer-app 578 root    3u     IPv4              27403      0t0    TCP localhost:55834->localhost:postgresql (ESTABLISHED)
homer-app 578 root    4u  a_inode               0,11        0   6609 [eventpoll]
homer-app 578 root    5r     FIFO               0,10      0t0  17749 pipe
homer-app 578 root    6w     FIFO               0,10      0t0  17749 pipe
homer-app 578 root    7u     IPv4              27404      0t0    TCP localhost:55836->localhost:postgresql (ESTABLISHED)
homer-app 578 root    8u     IPv6              17769      0t0    TCP *:9080 (LISTEN)

Below is my heplify-server.toml, must I change it as the examples?

HEPAddr = "0.0.0.0:9060" HEPTCPAddr = "0.0.0.0:9061" HEPTLSAddr = "0.0.0.0:9060" HEPWSAddr = "0.0.0.0:3000" ESAddr = "" ESDiscovery = true LokiURL = "" LokiBulk = 200 LokiTimer = 4 LokiBuffer = 100000 LokiHEPFilter = [1,5,100] ForceHEPPayload = [] PromAddr = "0.0.0.0:9096" PromTargetIP = "" PromTargetName = "" DBShema = "homer7" DBDriver = "postgres" DBAddr = "localhost:5432" DBUser = "homer_user" DBPass = "sYazGXSEmmG2TAjOgNRVtehcgY" DBDataTable = "homer_data" DBConfTable = "homer_config" DBBulk = 200 DBTimer = 4 DBBuffer = 400000 DBWorker = 8 DBRotate = true DBPartLog = "2h" DBPartSip = "1h" DBPartQos = "6h" DBDropDays = 14 DBDropDaysCall = 0 DBDropDaysRegister = 0 DBDropDaysDefault = 0 DBDropOnStart = false DBUsageProtection = true DBUsageScheme = "percentage" DBPercentageUsage = "80%" DBMaxSize = "30MB" Dedup = false DiscardMethod = [] AlegIDs = ["X-Session-Id"] ForceALegID = true CustomHeader = ["X-CID","X-Session-Id"] SIPHeader = [] LogDbg = "" LogLvl = "info" LogStd = false LogSys = false Config = "./heplify-server.toml" ConfigHTTPAddr = ""

Examples:

-------------------------------------

ESAddr = "http://127.0.0.1:9200"

DBShema = "homer7"

DBDriver = "postgres"

LokiURL = "http://localhost:3100/api/prom/push"

LokiHEPFilter = [1,5,100]

PromAddr = "0.0.0.0:8899"

PromTargetIP = "10.1.2.111,10.1.2.4,10.1.2.5,10.1.2.6,10.12.44.222"

PromTargetName = "sbc_access,sbc_core,kamailio,asterisk,pstn_gateway"

AlegIDs = ["X-CID","X-Session-Id","P-Charging-Vector,icid-value=\"?(.*?)(?:\"|;|$)","X-BroadWorks-Correlation-Info"]

DiscardMethod = ["OPTIONS","NOTIFY"]

CustomHeader = ["X-Session-Id","X-CustomerIP","X-Billing"]

SIPHeader = ["callid","callid_aleg","method","ruri_user","ruri_domain","from_user","from_domain","from_tag","to_user","to_domain","to_tag","via","contact_user"]

LogDbg = "hep,sql,loki"

LogLvl = "warning"

ConfigHTTPAddr = "0.0.0.0:9876"

-------------------------------------

To hot reload PromTargetIP and PromTargetName run:

killall -HUP heplify-server

adubovikov commented 3 years ago

looks like the wrong path to you heplify toml. Please use the param

pengweichu commented 3 years ago

looks like the wrong path to you heplify toml.

In my server only one heplify toml file:

root@ip-17:/home/admin# find / -name heplify-server.toml
/etc/heplify-server.toml
root@ip-172:/home/admin# 

Please use the param

Sorry, which param do you mean?

adubovikov commented 3 years ago

-config Change value of Config. (default ./heplify-server.toml)

pengweichu commented 3 years ago

Sorry for too many questions... I just follow this to install,

cd /usr/src
wget https://github.com/sipcapture/homer-installer/raw/master/homer_installer.sh
chmod +x homer_installer.sh
./homer_installer.sh

then edited the /etc/heplify-server.toml - in the system only this file. Don't know how to use the config param to specify the toml file. I have also tried change the config file path from ./heplify-server.toml to /etc/heplify-server.toml in heplify-server.toml, and restarted, still not lucky.

adubovikov commented 3 years ago

run heplify-server manually (foreground) and check the debug log. Sorry, but this is your system :-)

pengweichu commented 3 years ago

heplify-server

Get it solved, that is because the libluajit dev is not installed, seems the install script doesn't determine this dependency.

apt install libluajit-5.1-dev