Hello,
I’m facing an issue with ERPNext’s AutoAttendance feature that was functioning properly until April 1st, when it stopped fetching check-ins from our ZKteco device. The setup had been working since February 18 without issues. The only system change made around the time the problem started was the installation of snapd for DNS setup, which I doubt is the reason the AutoAttendance is not working.
Despite verifying that the ERPNext server can reach the fingerprint machine, checking that IPs are correct, and confirming the API keys and secrets are accurate, I am encountering a persistent error in the logs/error file:
2024-04-29 21:25:27,042 ERROR Error during ERPNext API Call. 25 1708401079.0 machine1 None {‘_content’: b’<!doctype html>\n\n404 Not Found\n
Not Found
\n172.16.5.20 does not exist
\n’, ‘_content_consumed’: True, ‘_next’: None, ‘status_code’: 404, ‘headers’: {‘Server’: ‘nginx’, ‘Date’: ‘Mon, 29 Apr 2024 18:25:27 GMT’, ‘Content-Type’: ‘text/html; charset=utf-8’, ‘Content-Length’: ‘113’, ‘Connection’: ‘keep-alive’}, ‘raw’: <urllib3.response.HTTPResponse object at 0x7f38fc73a080>, ‘url’: ‘http://172.16.5.20/api/method/hrms.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field’, ‘encoding’: ‘utf-8’, ‘history’: , ‘reason’: ‘NOT FOUND’, ‘cookies’: <RequestsCookieJar>, ‘elapsed’: datetime.timedelta(microseconds=2998), ‘request’: <PreparedRequest [POST]>, ‘connection’: <requests.adapters.HTTPAdapter object at 0x7f38fc738e50>}2024-04-29 21:25:27,043 ERROR exception when calling pull_process_and_push_data function for device{“device_id”: “machine1”, “ip”: “172.16.5.20”, “punch_direction”: null, “clear_from_device_on_fetch”: false}
Traceback (most recent call last):
File “/root/biometric-attendance-sync-tool-master/erpnext_sync.py”, line 62, in main
pull_process_and_push_data(device, device_attendance_logs)
File “/root/biometric-attendance-sync-tool-master/erpnext_sync.py”, line 140, in pull_process_and_push_data
raise Exception(‘API Call to ERPNext Failed.’)
Exception: API Call to ERPNext Failed.
2024-04-29 21:26:27,131 ERROR Error during ERPNext API Call. 25 1708401079.0 machine1 None {‘_content’: b’<!doctype html>\n\n404 Not Found\n
Not Found
\n172.16.5.20 does not exist
\n’, ‘_content_consumed’: True, ‘_next’: None, ‘status_code’: 404, ‘headers’: {‘Server’: ‘nginx’, ‘Date’: ‘Mon, 29 Apr 2024 18:26:27 GMT’, ‘Content-Type’: ‘text/html; charset=utf-8’, ‘Content-Length’: ‘113’, ‘Connection’: ‘keep-alive’}, ‘raw’: <urllib3.response.HTTPResponse object at 0x7f38fc9760b0>, ‘url’: ‘http://172.16.5.20/api/method/hrms.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field’, ‘encoding’: ‘utf-8’, ‘history’: , ‘reason’: ‘NOT FOUND’, ‘cookies’: <RequestsCookieJar>, ‘elapsed’: datetime.timedelta(microseconds=3297), ‘request’: <PreparedRequest [POST]>, ‘connection’: <requests.adapters.HTTPAdapter object at 0x7f38fc975930>}2024-04-29 21:26:27,132 ERROR exception when calling pull_process_and_push_data function for device{“device_id”: “machine1”, “ip”: “172.16.5.20”, “punch_direction”: null, “clear_from_device_on_fetch”: false}
Traceback (most recent call last):
File “/root/biometric-attendance-sync-tool-master/erpnext_sync.py”, line 62, in main
pull_process_and_push_data(device, device_attendance_logs)
File “/root/biometric-attendance-sync-tool-master/erpnext_sync.py”, line 140, in pull_process_and_push_data
raise Exception(‘API Call to ERPNext Failed.’)
Exception: API Call to ERPNext Failed.
Here is the Shift Configuration:
Attempts to resolve the issue:
- Ensured network connectivity and IP configurations are correct for both ERPNext server and the ZKteco device.
- Re-verified the API keys and secrets.
- Restarted both ERPNext and the ZKteco device to rule out temporary connectivity or service issues.
I want to ask:
- Why would ERPNext suddenly fail to fetch employee checkins that was previously functioning?
- Any known issues with DNS changes or server updates that might affect Biometric Attendance Sync Tool?
I would greatly appreciate any advice or suggestions from the community.
Thank you in advance for your help!