getodk / aggregate

ODK Aggregate is a Java server that stores, analyzes, and presents survey data collected using ODK Collect. Contribute and make the world a better place! ✨🗄✨
https://docs.opendatakit.org/aggregate-intro/
Other
74 stars 227 forks source link

Initial login fails when no internet connection #485

Open zwets opened 4 years ago

zwets commented 4 years ago

Right after installing a 2.0.5 instance, when the server has no internet connection, it is impossible to login.

Meanwhile, the log is spammed with stack traces:

16-Mar-2020 15:53:19.060 WARNING [http-nio-10.103.0.40-14512-exec-72] org.opendatakit.aggregate.server.PreferenceServiceImpl.getLatestAvailableVersion Getting latest available version                                                        
16-Mar-2020 15:53:19.060 SEVERE [http-nio-10.103.0.40-14512-exec-72] org.opendatakit.aggregate.server.PreferenceServiceImpl.getLatestAvailableVersion Can't get latest available version                                                       
 java.net.UnknownHostException: api.github.com                                                                                                                                                                                                 
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)                                                                                                                                                                  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)                                                                                                                                                                          
        at java.net.Socket.connect(Socket.java:607)
   ... long stacktrace omitted ...

16-Mar-2020 15:59:23.151 WARNING [http-nio-10.103.0.40-14512-exec-78] org.opendatakit.aggregate.server.PreferenceServiceImpl.getLatestAvailableVersion Getting latest available version                                                        
16-Mar-2020 16:01:34.223 SEVERE [http-nio-10.103.0.40-14512-exec-78] org.opendatakit.aggregate.server.PreferenceServiceImpl.getLatestAvailableVersion Can't get latest available version
 java.net.ConnectException: Connection timed out (Connection timed out)                                                                                                                                                                        
        at java.net.PlainSocketImpl.socketConnect(Native Method)                                                                                                                                                                                       at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)                                                                                                                                                        
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)                                                                                                                                                         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)                                                                                                                                                          
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)                                                                                                                                                                                  at java.net.Socket.connect(Socket.java:607)
... more long stack trace omitted ...

Access to the application should not depend on the ability to resolve api.github.com or other internet functionality. It should be possible to run Aggregate within a LAN that is not connected to internet (in fact, some of our teams come in with their devices to synchronise them in-house).