error 301 connecting to the server

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

error 301 connecting to the server

Post by AriSilva »

Everything was working fine, until my maintenance guy deleted everything from the server.
After reinstalling the csweb (we tried with versions 3.2 and 3.4), and uploading the database, which worked, the interviewers cannot synconnect with the server, the error message is error 301, cannot connect with the server.
Best
Ari
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: error 301 connecting to the server

Post by aaronw »

The http 301 response is saying the URL has moved. However, this isn't really the case. Something is just misconfigured, so it's not that helpful. It's really hard for me to say what is wrong with your configuration. When you say everything was deleted from your server, do you mean the computer was reformatted? Or the installation of CSWeb was deleted? Also, what software are you talking about when you say you tried version 3.2 and 3.4?
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: error 301 connecting to the server

Post by AriSilva »

1. The computer was not reformatted, we had some space problems and we decided to clean (delete the files) from the csweb base (we do have the backup, but we do not know how to restore it). Attached is a list of the databases we had there. Is there an easy way to restore those files?
2. Referring to 3.2 and 3.4 versions, that was a typo, it should be csweb 7.2 and 7.4.
Attachments
clvcombr_inani - phpMyAdmin 4.9.5.pdf
(186.86 KiB) Downloaded 164 times
Best
Ari
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: error 301 connecting to the server

Post by aaronw »

If you have a snapshot of your OS that might be the single best approach. Check with your maintenance guy. However, I assume the backup is just a copy of the CSWeb installation on the server?

My first approach would be to take a look at the set up script and see what exactly it does. It may be possible to point a new/old CSWeb installation to the database. However, it might delete the database if it already exists. I don't recall the behavior, so I wouldn't test this with your production database. I'll take a closer look at this, but I won't be able to till next week.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: error 301 connecting to the server

Post by AriSilva »

There is no problem in deleting the database since we have downloaded a backup in csdb format that we can always upload.
If you would be kind enough in having a closer look at that it would be helpful.
In any case, do you think it might solve the problem if we install csweb 7.5?
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: error 301 connecting to the server

Post by josh »

A 301 error is probably not a CSWeb problem or a database problem but more likely a problem with the Apache configuration. That is where I would start. Either that or when you reinstalled the CSWeb files you put them in the wrong directory. I doubt switching versions will change anything.
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: error 301 connecting to the server

Post by aaronw »

I did a bit of testing today. I created a new instance of CSWeb and uploaded a dictionary and some data. Then I renamed the CSWeb directory. I received 404 errors which I would expect.

You need to figure out why you're receiving this 301 message. It has a very specific purpose and I think if the CSWeb directory was missing you'd receive a 404 error. However, make sure this is correct. The redirect is typically configured through httaccess or httpd.conf, so verify they are not redirecting.

Next, I renamed the CSWeb directory and added another installation tried to set it up. However, I received an error that a dictionary (correctly already exists). I deleted the new installation and replaced it with the original installation and everything worked fine. You could fall back to the original (if that was backed up), however, a new installation may be a pain. Once you figured out the 301 message the most straightforward path may be to create a new installation of CSWeb and point it to a new database. Then have your enumerators resync.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: error 301 connecting to the server

Post by AriSilva »

Thank you Aaron.
After going back and forth trying several alternatives, such as reinstalling 7.2, 7.3, 7.4, etc., finally we decided to start from scratch with the 7.5 version, uploading the cspro databases from the csdb backups we had.
And, we had to update also the csentry version in the tablets that were in the field still being used to finalize the survey.
And it seemed to be working fine, until we discovered that cspro 7.5 has a bug (already reported) related to numeric fields with more than 9 digits long, and we sere using our Social Security Number (11 digits) as part of the identification key in the survey.
Well, to make it short, we are still in the process of filtering the new cases, merging them with the backup we have and try to figure out a way to convert the wrong SSN and recode them to the real ones.
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: error 301 connecting to the server

Post by josh »

We fixed that bug with the long id items in version 7.5.1 back in early December. If you are still seeing it with the latest version please send us an app we can use to reproduce the problem. Note that the fix was in CSPro (Android and Desktop), not in CSWeb.
Post Reply