I am trying to run ptp4l as service on Centos 7 in Layer-2 mode, but once
service starts it logs messages:

 

Jan 24 16:57:06 localhost.localdomain systemd[1]: Started Precision Time
Protocol (PTP) service.

Jan 24 16:57:06 localhost.localdomain ptp4l[3169]: [105018.566] selected
/dev/ptp0 as PTP clock

Jan 24 16:57:06 localhost.localdomain ptp4l[3169]: ptp4l[105018.566]:
selected /dev/ptp0 as PTP clock

Jan 24 16:57:06 localhost.localdomain ptp4l[3169]: ptp4l[105018.567]: socket
failed: Permission denied

Jan 24 16:57:06 localhost.localdomain ptp4l[3169]: ptp4l[105018.567]: port
1: INITIALIZING to FAULTY on FAULT_DETECTED (FT_...IFIED)

Jan 24 16:57:06 localhost.localdomain ptp4l[3169]: ptp4l[105018.567]: port
0: INITIALIZING to LISTENING on INIT_COMPLETE

Jan 24 16:57:06 localhost.localdomain ptp4l[3169]: [105018.567] socket
failed: Permission denied

Jan 24 16:57:06 localhost.localdomain ptp4l[3169]: [105018.567] port 1:
INITIALIZING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)

Jan 24 16:57:06 localhost.localdomain ptp4l[3169]: [105018.567] port 0:
INITIALIZING to LISTENING on INIT_COMPLETE

 

If started as command it works with no issues.

>From earlier posts it is clear that it is issue of rights to open a raw
socket. I tried giving /usr/bin/ptp4l capabilities mentioned in prior posts,
but with no luck:

 

setcap cap_sys_time,cap_net_raw,cap_net_bind_service,cap_dac_override=eip
/usr/sbin/ptp4l

 

Any suggestions what need to done in order to start service with layer 2
mode? 

 

Goran Pregrad

 

_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to