ERROR 403

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
hannesrr
Posts: 55
Joined: January 8th, 2013, 5:02 pm
Location: Lima, Perú, South America

ERROR 403

Post by hannesrr »

Dear Friends,

An error has occurred during synchronization and it has occurred since exactly yesterday 10/08, according to the logs.
Tablets and csweb are version 7.6.1., I have already verified. Everything has been working properly for the past month.
Since yesterday when trying to sync, the following error appears on tablets:


Reviewing the sync log of the tablet shows the following:
2021-08-11 01:27:37,060 INFO: Connect to server http://url.com/csweb/api/ as user USRAAAA
2021-08-11 01:27:37,060 INFO: Connect to server http://url.com/csweb/api/
2021-08-11 01:27:38,137 INFO: Server API version: 2
2021-08-11 01:27:38,137 INFO: Connection successful. Server id: wewerw-cafa-ghfg-8866-b455b56
2021-08-11 01:27:38,165 INFO: Syncing data: DB.csdbe direction PUT universe ""
2021-08-11 01:27:38,166 INFO: First time PUT with this server
2021-08-11 01:27:38,170 INFO: Total new/modified cases since last sync: 1
2021-08-11 01:27:38,393 ERROR: Error from server:
2021-08-11 01:27:38,394 ERROR:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
....
..
Access is forbidden to the requested page:
..
2021-08-11 01:27:40,474 ERROR: Error syncing data: 100101 Error 403
2021-08-11 01:27:41,248 INFO: Sync file: GET from: /FOLDER/AppSTAMINASupervisor.pen to: ../AppSTAMINA.pen root: /storage/emulated/0/Android/data/gov.census.cspro.csentry/files/csentry/Encuesta - FASE 2/Menu/
2021-08-11 01:27:41,265 INFO: Downloading file: /FOLDER/AppSTAMINASupervisor.pen to: /storage/emulated/0/Android/data/gov.census.cspro.csentry/files/csentry/Encuesta - FASE 2/AppSTAMINA.pen
2021-08-11 01:27:41,474 INFO: Sync file completed
2021-08-11 01:27:41,797 INFO: Disconnecting from server


Reviewing the server log shows the following:

ppp.WWW.tt.ee - - [11/Aug/2021:01:11:09 -0400] "GET /csweb/api/server HTTP/1.1" 401 77 "-" "CSPro sync client/7.6.1"
ppp.WWW.tt.ee - - [11/Aug/2021:01:11:22 -0400] "GET /csweb/api/dictionaries/DICSTAMINA_DICT/cases HTTP/1.1" 200 2 "-" "CSPro sync client/7.6.1"
ppp.WWW.tt.ee - - [11/Aug/2021:01:12:35 -0400] "POST /csweb/api/token HTTP/1.1" 200 171 "-" "CSPro sync client/7.6.1"
ppp.WWW.tt.ee - - [11/Aug/2021:01:12:36 -0400] "POST /csweb/api/dictionaries/DICSTAMINA_DICT/cases HTTP/1.1" 403 4939 "-" "CSPro sync client/7.6.1"
ppp.WWW.tt.ee - - [11/Aug/2021:01:12:38 -0400] "GET /csweb/api/files/FOLDER/AppSTAMINA.pen/content HTTP/1.1" 304 0 "-" "CSPro sync client/7.6.1"

I have reviewed the SSL certificate and it is active.

I thank you for helping me to know what I should review. Also, I would like to know if the SYNCDATA function requires access to some specific path to be able to validate it on the server side.

Regards,

Hannes Rodríguez
Lima, Perú
Hannes Rodriguez :geek:
Lima, Perú
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: ERROR 403

Post by savy »

Looking at the syncfile responses, your server seems to be configured fine. Syncdata does not require any special path. Please send us the complete log files to cspro@lists.census.gov.
hannesrr
Posts: 55
Joined: January 8th, 2013, 5:02 pm
Location: Lima, Perú, South America

Re: ERROR 403

Post by hannesrr »

Good morning.
I sent the sync file by mail, from: hannesrr@gmail.com
Hannes Rodriguez :geek:
Lima, Perú
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: ERROR 403

Post by savy »

are you sure you sent it to cspro@lists.census.gov ? We did not receive it.
hannesrr
Posts: 55
Joined: January 8th, 2013, 5:02 pm
Location: Lima, Perú, South America

Re: ERROR 403

Post by hannesrr »

Hello Savy,
Yes. I sent the email again. Please, could your confirm to me?
Email Sent
Email Sent
MAIL_LIST_CSPRO.png (34.07 KiB) Viewed 13174 times
Hannes Rodriguez :geek:
Lima, Perú
hannesrr
Posts: 55
Joined: January 8th, 2013, 5:02 pm
Location: Lima, Perú, South America

Re: ERROR 403 - UPDATE - SOLVED

Post by hannesrr »

I leave the reason for the error here to help others who may have this same case.

HOSTING SUPPORT.
I have checked Apache logs and found one triggered ModSecurity rule that can be related to this issue.
ModSecurity is a module of Apache, a web application firewall. It is used to block commonly known exploits by the use of regular expressions and rule sets. It is enabled on all our shared servers by default.
Its activity may cause such issues from time to time when requests sent to the server match with the ModSecurity rules. Sometimes such requests are false-positive.
HOSTING SUPPORT :
I have whitelisted this ModSecurity rule.

:D
Hannes Rodriguez :geek:
Lima, Perú
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: ERROR 403

Post by savy »

We did not receive the email. It is likely that our mail server may have blocked your email because of the attachment. Anyway, glad you figured out the problem and shared your solution
Post Reply