Unexpected redirection attempt to different host

Hi,
My ODK application is running fine in local server Tomcat and are able to upload & download forms data &list from mobile and tablets. I further ask Network to provide static LAN IP (http://12.1.1.60") and tested the app and don't find any issue in downloading and uploading data forms from mobile. i do testing for a month its run fine.

But when i ask my Network department to provide me public/live IP so i can able to access my application outside the LAN network from field. due to security they publish my Static IP to LIVE IP; it means from outside local network i used public IP then it will be automatically translated to static IP. i test on browser and its working fine.

So when i configure ODK on mobile with Live IP address (dummy use in example) i.e. http://"200.1.121.130:8080/ODKAggregate/". I am able to access the from list and downloaded forms successfully from outside local network but when i uploaded the filled form from mobile is getting error " Error "Form1_Xee Unexpected redirection attempt to different host :http://10.1....../Submission",
"please note i am using same xml form which i used for data collection which is done on static LAN IP, not a single change made in xls form"

Please help what to configure as i am tried every possibility but seems overlooked somethings.

When you installed Aggregate, you specified a FQDN (fully qualified domain name). You must use that address (and port) when connecting to Aggregate. The form download/upload (but not the form listing) relies on the FQDN so you'll get errors like you describe.

The easiest way to change the FQDN is to re-run the Aggregate installer and put in the new FQDN. Another option is to manually edit security.server.hostname and security.server.port in security.properties (it's in webapps/ODKAggregate/WEB-INF/lib/ODKAggregate-settings.jar). How to change the odkaggregate ip address has a bit more on this.

Thanks for prompt reply.
as advised below, i manually update security.properties and put back carefully as advised but still getting same issue.

Could you please advised little detail as i accommodated all the steps which you mention in the your response but still facing same error.

i

If you are getting the same error, then it's likely that the change wasn't made correctly.

One thing you could try is run the installer again with the FQDN and when you get the ODKAggregate.war, rename it to ODKAggregateTest and then go to FQDN:8080/ODKAggregateTest and see if that works.

thanks for your support.
I reinstall the aggregate server from scratch and now the application is working fine on LIVE server.

1 Like