cancel
Showing results for 
Search instead for 
Did you mean: 

Share can't connect to Repository, but curl can...

fabrice7
Confirmed Champ
Confirmed Champ

Hi everyone,

I am using Alfresco 6.2 CE using Docker containers and my setup is the following:

imageNetwork architecture

Share can't connect to Repository and gives me this:

acs-share_1             | 2020-12-01 15:12:10,982  INFO  [webscripts.connector.RemoteClient] [http-nio-8080-exec-3] Exception calling (GET) https://ark-haproxy:9443/alfresco/s/api/admin/restrictions?guest=true
acs-share_1             |  org.apache.http.NoHttpResponseException: ark-haproxy:9443 failed to respond

Please note I configure Share to connect to Respository through the HAProxy.

If I exec into the Share container and run curl, no problem:

$ curl -kv 'https://ark-haproxy:9443/alfresco/s/api/admin/restrictions?guest=true'
* About to connect() to ark-haproxy port 9443 (#0)
*   Trying 172.24.0.8...
* Connected to ark-haproxy (172.24.0.8) port 9443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
*     subject: CN=ark-haproxy
*     start date: Dec 01 08:10:08 2020 GMT
*     expire date: Jul 23 08:10:08 2045 GMT
*     common name: ark-haproxy
*     issuer: CN=Local Alfresco CA
> GET /alfresco/s/api/admin/restrictions?guest=true HTTP/1.1
> User-Agent: curl/7.29.0
> Host: ark-haproxy:9443
> Accept: */*
> 
< HTTP/1.1 200 
< server: nginx/1.19.5
< date: Tue, 01 Dec 2020 15:14:09 GMT
< content-type: application/json;charset=UTF-8
< transfer-encoding: chunked
< cache-control: no-cache
< expires: Thu, 01 Jan 1970 00:00:00 GMT
< pragma: no-cache
< 
{
   "lastUpdate" : null,
   "users" : null,
   "documents" : null,
   "licenseMode" : "UNKNOWN",
   "readOnly" : false,
   "updated" : false,
   "licenseValidUntil" : null,
   "licenseHolder" : "",
   "level" : 0,
   "warnings": [],
   "errors": []
}
* Connection #0 to host ark-haproxy left intact

The JAVA_OPTS for Share is:

        -Xms500m
        -Xmx500m
        -Dshare.host=ark-haproxy
        -Dshare.port=9443
        -Dshare.protocol=https
        -Dalfresco.context=alfresco
        -Dhttp.proxyHost=ark-haproxy
        -Dhttp.proxyPort=9080
        -Dhttps.proxyHost=ark-haproxy
        -Dhttps.proxyPort=9443
        -Dalfresco.host=ark-haproxy
        -Dalfresco.port=9443
        -Dalfresco.protocol=https

Any idea?

Thanks a lot in advance for any help!

2 REPLIES 2

fabrice7
Confirmed Champ
Confirmed Champ

Anyone has any idea on what is going on?

BTW, I just realized my block diagram has an error. The ports HAProxy listens to are 9080 and 9443, not 10080 and 10443 as shown in the block diagram...