Closed hangocanh2303 closed 4 years ago
Mby some permission issue?
Mby some permission issue?
No, I changed permission of heplify-server folder to 777 and log file still not create
Does LogSys = true work?
Does LogSys = true work?
No, When I set LogSys = true, no log in /var/log/heplify-server.log
LogSys = true should write into syslog, normally under /var/log/syslog
LogSys = true should write into syslog, normally under /var/log/syslog @negbie No syslog folder in /var/log
Red Hat family distributions (including CentOS and Fedora) use /var/log/messages and /var/log/secure
Maybe there?
I use for almost everything Debian and there it's /var/log/syslog
Since this seems to be an CentOS specific issue maybe someone else could help you out here? Let tag this issue properly.
I use for almost everything Debian and there it's /var/log/syslog
@negbie /var/log/messages printed some log of heplify, I will check it later. But, I don't know why if syslog = false, heplify-server.log not create. It seem like centOS bug.
here is some log in /var/log/message Feb 14 20:14:54 /opt/heplify-server/heplify-server[27016]: server.go:83: start heplify-server 1.15 with config.HeplifyServer{HEPAddr:"0.0.0.0:9060", HEPTCPAddr:"", HEPTLSAddr:"0.0.0.0:9060", ESAddr:"", ESDiscovery:false, ESUser:"", ESPass:"", LokiURL:"", LokiBulk:200, LokiTimer:4, LokiBuffer:100000, LokiHEPFilter:[]int{}, ForceHEPPayload:[]int{}, PromAddr:"0.0.0.0:9096", PromTargetIP:"", PromTargetName:"", DBShema:"homer7", DBDriver:"postgres", DBAddr:"localhost:5432", DBUser:"homer_user", DBPass:"FT5QRbUOflpHMrWqXGUwu39r9cQ", DBDataTable:"homer_data", DBConfTable:"homer_config", DBBulk:200, DBTimer:4, DBBuffer:400000, DBWorker:32, DBRotate:true, DBPartLog:"2h", DBPartIsup:"6h", DBPartSip:"1h", DBPartQos:"6h", DBDropDays:14, DBDropDaysCall:0, DBDropDaysRegister:0, DBDropDaysDefault:0, DBDropOnStart:false, Dedup:false, DiscardMethod:[]string{"OPTIONS", "NOTIFY"}, AlegIDs:[]string{}, CustomHeader:[]string{}, SIPHeader:[]string{}, LogDbg:"hep,sql", LogLvl:"debug", LogStd:false, LogSys:true, Config:"/opt/heplify-server/heplify-server.toml", ConfigHTTPAddr:"", ConfigHTTPPW:"", Version:false} Feb 14 20:14:54 /opt/heplify-server/heplify-server[27016]: prometheus.go:38: expose metrics without or unbalanced targets Feb 14 20:14:54 /opt/heplify-server/heplify-server[27016]: rotator.go:331: start creating tables (2020-02-14 20:14:54.864650105 +0700 +07 m=+0.018368067) Feb 14 20:14:55 /opt/heplify-server/heplify-server[27016]: rotator.go:344: end creating tables (2020-02-14 20:14:55.544802807 +0700 +07 m=+0.698520771) Feb 14 20:14:55 /opt/heplify-server/heplify-server[27016]: postgres.go:62: postgres connection established
Looks good. Maybe you or someone else will find out why the normal log file can't be written on CentOS. For me it's currently to low prio so help is wanted.
My first thoughts are SELinux.
ls -Z /opt/heplify/heplify.log
Try to touch /opt/heplify/heplify.log
as root the target logfile (then chown appropriately for heplify user:group) and systemctl restart
heplify. See if that helps. If so, 99% certain it's SELinux perms.
Thank you. I hope this helps some other user!
I'm using CentOS Linux release 7.7.1908 (Core) I'm install heplify-server via this link: https://github.com/sipcapture/homer/wiki/homer-seven-setup#the-heplify-capture-agent Result: heplify-server start successfully but heplify-server.log file not create
Here is heplify-server.toml file: HEPAddr = "0.0.0.0:9060" HEPTCPAddr = "" HEPTLSAddr = "0.0.0.0:9060" ESAddr = "" ESDiscovery = false LokiURL = "" LokiBulk = 200 LokiTimer = 4 LokiBuffer = 100000 LokiHEPFilter = [] ForceHEPPayload = [] PromAddr = "0.0.0.0:9096" PromTargetIP = "" PromTargetName = "" DBShema = "homer7" DBDriver = "postgres" DBAddr = "localhost:5432" DBUser = "homer_user" DBPass = "FT5QRbUOflpHMrWqXGUwu39r9cQ" DBDataTable = "homer_data" DBConfTable = "homer_config" DBBulk = 200 DBTimer = 4 DBBuffer = 400000 DBWorker = 32 DBRotate = true DBPartLog = "2h" DBPartSip = "1h" DBPartQos = "6h" DBDropDays = 14 DBDropDaysCall = 0 DBDropDaysRegister = 0 DBDropDaysDefault = 0 DBDropOnStart = false Dedup = false DiscardMethod = ["OPTIONS","NOTIFY"] AlegIDs = [] CustomHeader = [] SIPHeader = [] LogDbg = "hep,sql" LogLvl = "info" LogStd = false LogSys = false Config = "./heplify-server.toml" ConfigHTTPAddr = ""