Captive portal flow Android 11 - raspberry-pi

With the update to Android 11 this wonderful captive portal solution stopped working: https://github.com/ConnectBox/simple-offline-captive-portal
The problem is that on my Pixel3 with Android 11 the captive portal page will not close after clicking the OK button. It just remains open and the wifi is not accepted.
After looking into the requests I am really lost why that happens as I do not see any difference between Android 10 and Android 11:
Android 10
"POST /generate_204 HTTP/1.1" 200 7520 "http://connectivitycheck.gstatic.com/generate_204" "Mozilla/5.0 (Linux; Android 10; Pixel 3 Build/QP1A.190711.020.C3; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.90 Mobile Safari/537.36"
"GET /generate_204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36"
...(several GET requests) ...
"GET /generate_204 HTTP/1.1" 204 0 "-" "Dalvik/2.1.0 (Linux; U; Android 10; Pixel 3 Build/QP1A.190711.020.C3)"
....
Android 11
"POST /generate_204 HTTP/1.1" 200 7584 "http://connectivitycheck.gstatic.com/generate_204" "Mozilla/5.0 (Linux; Android 11; Pixel 3 Build/RP1A.201005.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.75 Mobile Safari/537.36"
"GET /generate_204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36"
"GET /gen_204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36"
Android 10 works like a charm - Android 11 stopped working after the OK button.
Any help - experience how to get captive portals with Android 11 working - ideas how to debug this are welcome.
I already tried logging HTTP and DNS traffic on the raspberry the captive portal is running on but nothing that seems to be leading to that error.

I think the Problem is the App Android System WebView.
For me it was needed to update after the Systemupdate, because there were many Apps which crashed, including the Captive Portal.

Related

Why does discord keep sending requests to my server weirdly

I am doing a simple imaging service (related to a game called Transformice), which would listen to requests, then load and grab XML of "maps" from the game, generate the image and then serve that image to the client. This project is open sourced so you may find the code here
It works fine so far when I request an image from the browser, but when I tried to load the same thing in discord, it sends lots of requests to me in an unexpected way.
I did some loggings so it's easier to understand what's actually happening.
[INFO][SERVER|MAIN] GET /map/589352/preview <200> (User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36)
[INFO][SERVER|MAIN] GET /map/589352/preview <-> (User-Agent: Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com))
[INFO][SERVER|MAIN] GET /map/999999/preview <200> (User-Agent: Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com))
[INFO][SERVER|MAIN] GET /map/999999/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/999999/preview <200> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/123455/preview <-> (User-Agent: Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com))
[INFO][SERVER|MAIN] GET /map/999999/preview <200> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/696969/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/777777/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/424242/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/696969/preview <200> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/777777/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/777777/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/777777/preview <200> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/424242/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/777777/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/424242/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/777777/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/424242/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/777777/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/424242/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/42069/preview <-> (User-Agent: Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com))
[INFO][SERVER|MAIN] GET /map/777777/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/424242/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/777777/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/424242/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
[INFO][SERVER|MAIN] GET /map/69420/preview <-> (User-Agent: Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com))
[INFO][SERVER|MAIN] GET /map/999999/preview <-> (User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0)
First I requested from browser (the first log) and it worked fine, after I tried to load the same thing in discord, few worked but then it kept doing this - requesting the same resource infinitely. Because of this there are some delays and sometimes it doesn't load the map at all.
What I wanted to know is the exact reason for this behaviour and a way to handle this kinds of stuff.
Regarding the Discordbot/2.0 user agent:
This is Discord loading the HTML file in an effort to find certain metadata inside the <head> tag, like OpenGraph and Twitter Cards, that it needs for building an embed preview when a link to one of your webpages gets posted.
However, once the data has been scraped, it gets cached inside Discord's servers for some time, which is why you'll only see one request per a unique URL from this user agent. (See this thesis for a bit more info about the requests themselves.)
I'm not sure what could be causing the large amount of requests from the Macintosh user agent, though. Maybe it could be something with content types and the way you handle request responses in your app/handler.js?

CORS Error on POST with no content

I have a controller-style REST web service endpoint which will work from the browser if I POST non-empty content, but when the content is empty, the browser returns:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 403. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Here is a request with content that works:
POST /my/controller/resource HTTP/1.1
Host: localhost:8083
Connection: keep-alive
Content-Length: 1
accept: application/json
Origin: null
Authorization: Bearer JWT
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Content-Type: application/json
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
Access-Control-Allow-Origin: null
Access-Control-Allow-Credentials: true
Content-Language: en-US
Date: Thu, 15 Feb 2018 13:44:53 GMT
And here is a request without content that does not work
POST /my/controller/resource HTTP/1.1
Host: localhost:8083
Connection: keep-alive
Content-Length: 0
accept: application/json
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Authorization: Bearer JWT
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
HTTP/1.1 403 Forbidden
Server: Apache-Coyote/1.1
Content-Type: text/plain
Content-Length: 0
Date: Thu, 15 Feb 2018 13:42:16 GMT
Can anyone shed some light on why the request without content is not working - and what I might do to correct this?
This doesn't appear to be a CORS error - the server is set up to not allow a zero-content-length POST request. That's what's throwing the 403 error response.

SRVE0777E: Exception thrown by application class 'org.apache.jasper..runtime.pageContextImpl.handlePageException:701'

After successfully uploading project on bluemix I got this error
SRVE0777E: Exception thrown by application class
'org.apache.jasper..runtime.pageContextImpl.handlePageException:701'
on eclipse and on URL page I got Exception thrown by application
class
'org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection:284'
javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: "java.sql.SQLException: No suitable driver found for
jdbc:db2://75.126.155.153:50000/SQLDB" at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Query
I have updated my version of jar file to db2jcc4.jar from db2jcc.jar but still facing the below issue .Please find full stack trace below:
{
Checking application - bluemixproject
Generating application archive - bluemixproject
Pushing application - bluemixproject
Application successfully pushed
Starting application - bluemixproject
Updated app with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78 ({"state"=>"STOPPED"})
Stopped app instance (index 0) with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78
Stopping app instance (index 0) with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78
Got staging request for app with id a6dc6027-eb2e-499a-83b9-641e15e9dd78
Updated app with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78 ({"state"=>"STARTED"})
-----> Downloaded app package (5.3M)
-----> Downloaded app buildpack cache (4.0K)
-----> Liberty Buildpack Version: v1.20.1-20150729-1255
-----> Retrieving IBM 1.7.1_sr3fp10-20150708 JRE (ibm-java-jre-7.1-3.10-pxa6470_27sr3fp10-20150708_01-cloud.tgz) ... (0.0s)
Expanding JRE to .java ... (0.9s)
-----> Retrieving App Management 1.7.0_20150729-1104 (app-mgmt_v1.7-20150729-1104.zip) ... (0.0s)
Expanding App Management to .app-management (1.0s)
-----> Retrieving com.ibm.ws.liberty-2015.6.0.0-201507291255.tar.gz ... (0.0s)
Installing archive ... (0.9s)
-----> Retrieving com.ibm.ws.liberty.ext-2015.6.0.0-201507291255.tar.gz ... (0.0s)
Installing archive ... (0.7s)
-----> Retrieving and installing client jar(s) from com.ibm.ws.icap.clientJars.db2.zip (0.0s)
-----> Warning: Liberty feature set is not specified. Using the default feature set: ["jsf-2.0", "jsp-2.2", "servlet-3.0", "ejbLite-3.1", "cdi-1.0", "jpa-2.0", "jdbc-4.0", "jndi-1.0", "managedBeans-1.0", "jaxrs-1.1"]. For the best results, explicitly set the features via the JBP_CONFIG_LIBERTY environment variable or deploy the application as a server directory or packaged server with a custom server.xml file.
-----> Auto-configuration is creating config for service instance 'SQL Database-fl' of type 'SQLDB'
-----> Liberty buildpack is done creating the droplet
-----> Uploading droplet (194M)
Starting app instance (index 0) with guid a6dc6027-eb2e-499a-83b9-641e15e9dd78
Launching defaultServer (WebSphere Application Server 2015.6.0.0/wlp-1.0.9.cl50620150610-1749) on IBM J9 VM, version pxa6470_27sr3fp10-20150708_01 (SR3 FP10) (en_US)
[AUDIT ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT ] CWWKG0028A: Processing included configuration resource: /home/vcap/app/wlp/usr/servers/defaultServer/runtime-vars.xml
[INFO ] CWWKE0002I: The kernel started after 4.594 seconds
[INFO ] CWWKF0007I: Feature update started.
[INFO ] CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host * (IPv6) port 61432.
[INFO ] CWSCX0122I: Register management Bean provider: com.ibm.ws.cloudoe.management.client.provider.dump.JavaDumpBeanProvider#fc8940ad.
[INFO ] CWSCX0122I: Register management Bean provider: com.ibm.ws.cloudoe.management.client.provider.logging.LibertyLoggingBeanProvider#b72bc7f3.
[INFO ] SRVE0169I: Loading Web Module: com.ibm.ws.cloudoe.management.client.liberty.connector.
[INFO ] SRVE0250I: Web Module com.ibm.ws.cloudoe.management.client.liberty.connector has been bound to default_host.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://18sfpg6jl5m:61432/IBMMGMTRest/
[INFO ] CWWKZ0018I: Starting application myapp.
[INFO ] SRVE0250I: Web Module bluemixproject has been bound to default_host.
[INFO ] SRVE0169I: Loading Web Module: bluemixproject.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://18sfpg6jl5m:61432/
[AUDIT ] CWWKZ0001I: Application myapp started in 0.802 seconds.
[AUDIT ] CWWKF0012I: The server installed the following features: [json-1.0, jpa-2.0, icap:managementConnector-1.0, beanValidation-1.0, jdbc-4.0, managedBeans-1.0, cloudAutowiring-1.0, jsf-2.0, jsp-2.2, servlet-3.0, jaxrs-1.1, jndi-1.0, appState-1.0, ejbLite-3.1, cdi-1.0].
[INFO ] CWWKF0008I: Feature update completed in 5.356 seconds.
[AUDIT ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.
[INFO ] SESN8501I: The session manager did not find a persistent storage location; HttpSession objects will be stored in the local application server's memory.
[INFO ] SESN0176I: A new session context will be created for application key default_host/
[INFO ] JSPG8502I: The value of the JSP attribute jdkSourceLevel is "15".
[INFO ] SRVE0242I: [myapp] [/] [/loginpage.jsp]: Initialization successful.
fscproj.mybluemix.net - [05/08/2015:08:28:48 +0000] "GET / HTTP/1.1" 200 0 3835 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.46:12949 x_forwarded_for:"122.248.183.22" vcap_request_id:91bbda0f-c95d-4e3a-43cd-a26eb6745303 response_time:1.722074055 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:50 +0000] "GET /styles/layout.css HTTP/1.1" 200 0 8777 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.46:35466 x_forwarded_for:"122.248.183.22" vcap_request_id:dcad0bc3-790f-44f1-5bb9-0febaed00734 response_time:0.013548015 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /images/ibm.jpg HTTP/1.1" 200 0 92824 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.43:17662 x_forwarded_for:"122.248.183.22" vcap_request_id:fb136519-b55f-4bff-7c42-95bccaf618c8 response_time:0.013932824 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /images/logo.jpg HTTP/1.1" 200 0 7347 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.46:15591 x_forwarded_for:"122.248.183.22" vcap_request_id:f494b027-53da-4c2b-6011-f751e1d58d0a response_time:0.014634660 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /styles/navi.css HTTP/1.1" 200 0 3229 "http://fscproj.mybluemix.net/styles/layout.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.46:26003 x_forwarded_for:"122.248.183.22" vcap_request_id:fd46d2d1-db2b-4828-74f4-842b2c3ad729 response_time:0.006212971 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /styles/forms.css HTTP/1.1" 200 0 1986 "http://fscproj.mybluemix.net/styles/layout.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.42:50968 x_forwarded_for:"122.248.183.22" vcap_request_id:98690564-68c0-4a80-5fad-21d929b3486b response_time:0.005961185 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /styles/tables.css HTTP/1.1" 200 0 924 "http://fscproj.mybluemix.net/styles/layout.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.42:60561 x_forwarded_for:"122.248.183.22" vcap_request_id:cf75f2ff-2fd8-42fa-620f-5977ea24bc79 response_time:0.010175099 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
fscproj.mybluemix.net - [05/08/2015:08:28:51 +0000] "GET /styles/featured_slide.css HTTP/1.1" 200 0 2400 "http://fscproj.mybluemix.net/styles/layout.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.43:24397 x_forwarded_for:"122.248.183.22" vcap_request_id:cd0aa784-5e4d-41f2-73bd-ae68f7f30e8c response_time:0.018511510 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
[INFO ] SRVE0242I: [myapp] [/] [loginclass]: Initialization successful.
Searching through VCAP keys
Key is: sqldb
Service found: SQL Database-fl
Connecting to the database
Finished
fscproj.mybluemix.net - [05/08/2015:08:29:00 +0000] "GET /loginclass?empid=23232I&password=ggggg&SUBMIT=login HTTP/1.1" 302 0 0 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.43:13856 x_forwarded_for:"122.248.183.22" vcap_request_id:66350d6c-fc15-4521-69dd-b343cc98ef03 response_time:0.744243093 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78
[INFO ] SRVE0242I: [myapp] [/] [/empdetails.jsp]: Initialization successful.
at [internal classes]
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
com.ibm.websphere.servlet.error.ServletErrorReport: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc:db2://75.126.155.153:50000/SQLDB"
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:284)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:701)
... 2 more
at com.ibm._jsp._empdetails._jspService(_empdetails.java:204)
Caused by: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc:db2://75.126.155.153:50000/SQLDB"
at [internal classes]
at com.ibm._jsp._empdetails._jspx_meth_s_query_0(_empdetails.java:259)
at com.ibm._jsp._empdetails._jspService(_empdetails.java:154)
[ERROR ] SRVE0777E: Exception thrown by application class 'org.apache.jasper.runtime.PageContextImpl.handlePageException:701'
at [internal classes]
fscproj.mybluemix.net - [05/08/2015:08:29:01 +0000] "GET /empdetails.jsp HTTP/1.1" 500 0 2052 "http://fscproj.mybluemix.net/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0" 75.126.70.43:26112 x_forwarded_for:"122.248.183.22" vcap_request_id:9e5e91ab-43df-4da9-4f47-f57d195ec76b response_time:0.899565979 app_id:a6dc6027-eb2e-499a-83b9-641e15e9dd78}

Timeout exception when trying to download any remote index in Archiva 2.2.0

Archiva 2.2.0. is up and running on a VM (CentOS 6.6).
The VM can access the internet behind a proxy.
For example, GET repo1.maven.org works well:
...
<body>
<div id="top"></div>
<div id="container">
<p>Browsing for this directory has been disabled.</p>
<p>View this directory's contents on http://search.maven.org instead.</p>
<p>Find out more about The Central Repository.</p>
<div id="footer-spacer"></div>
</div>
<div id="footer">
About Central | Terms of Service
</div>
</body>
...
Two remote repositories are configured, both with the same proxy.
But unfortunately, I always get the same connection timeout exception. See below the exception for one of the configured remote repository (Central).
From archiva.log:
2015-06-01 10:24:55,286 [taskScheduler#indexDownloadRemote-1] INFO org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask$DownloadListener [] - error of transfer file nexus-maven-repository-index.properties: Connect to repo1.maven.org:80 timed out
org.apache.maven.wagon.TransferFailedException: Connect to repo1.maven.org:80 timed out
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:892) ~[wagon-http-2.5.jar:2.5]
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116) [wagon-provider-api-2.5.jar:2.5]
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88) [wagon-provider-api-2.5.jar:2.5]
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61) [wagon-provider-api-2.5.jar:2.5]
at org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask$WagonResourceFetcher.retrieve(DownloadRemoteIndexTask.java:351) [archiva-scheduler-indexing-2.2.0.jar:?]
at org.apache.maven.index.updater.DefaultIndexUpdater.downloadIndexProperties(DefaultIndexUpdater.java:459) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.maven.index.updater.DefaultIndexUpdater.access$000(DefaultIndexUpdater.java:76) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.maven.index.updater.DefaultIndexUpdater$IndexAdaptor.setProperties(DefaultIndexUpdater.java:589) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:814) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:136) [indexer-core-5.1.1.jar:5.1.1]
at org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask.run(DownloadRemoteIndexTask.java:186) [archiva-scheduler-indexing-2.2.0.jar:?]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [?:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_65]
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to repo1.maven.org:80 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119) ~[httpclient-4.3.6.jar:4.3.6]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) ~[httpclient-4.3.6.jar:4.3.6]
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304) ~[httpclient-4.3.6.jar:4.3.6]
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) ~[httpclient-4.3.6.jar:4.3.6]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) ~[httpclient-4.3.6.jar:4.3.6]
From request-*.log:
IP - - [01/juin/2015:08:47:55 +0000] "GET /restServices/archivaServices/remoteRepositoriesService/checkRemoteConnectivity/central?_=1433145022958 HTTP/1.1" 200 5 "http://$$$$$$$$$$/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36"
IP - - [01/juin/2015:08:46:54 +0000] "GET /restServices/archivaServices/remoteRepositoriesService/checkRemoteConnectivity/repo.jenkins-ci.org?_=1433145022952 HTTP/1.1" 200 5 "http://$$$$$$$$$$/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36"
Am I missing something?
Thanks!
You need to configure https://repo.maven.apache.org/maven2
and setup an https proxy.
Because even if you http://repo.maven.apache.org/maven2 there is a redirection https protocol.
That should work.
HTH
Olivier

iPhone "Cannot Play Movie - The server is not correctly configured"

Everything I read on this error says I need to make sure that the server is accepting byte ranges. However, it appears it is. When I hit the mp4 directly in Chrome these are the headers:
Initial response headers:
Accept-Ranges:bytes
Connection:keep-alive
Content-Encoding:gzip
Content-Length:11268167
Content-Type:video/mp4
Date:Mon, 14 May 2012 23:33:53 GMT
ETag:W/"46044b-afe121-4c0076fd1068e"
Last-Modified:Mon, 14 May 2012 23:28:00 GMT
Server:Apache
Vary:Accept-Encoding
X-Cnection:close
Request after that response is received (the bytes range request below looks odd):
Accept-Encoding:identity;q=1, *;q=0
Range:bytes=0-
Referer:http://www.zebra.com/content/dam/zebra/videos/en-us/mobile/Manual-Calibration-ZT210_640X360-A.mp4
User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
Final response:
Connection:keep-alive, Transfer-Encoding
Content-Type:video/mp4
Date:Mon, 14 May 2012 23:33:53 GMT
ETag:W/"46044b-afe121-4c0076fd1068e"
Last-Modified:Mon, 14 May 2012 23:28:00 GMT
Server:Apache
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Cnection:close
Here is a link to the mp4 file: http://www.zebra.com/content/dam/zebra/videos/en-us/mobile/Manual-Calibration-ZT210_640X360-A.mp4