Tom Cools created CMIS-1108: ------------------------------- Summary: Connection to CMIS (Atom) with Port number in URL not working Key: CMIS-1108 URL: https://issues.apache.org/jira/browse/CMIS-1108 Project: Chemistry Issue Type: Bug Components: opencmis-client-bindings, opencmis-server Affects Versions: OpenCMIS 1.1.0 Environment: Run any OpenCMIS Docker container on a non-default port and try to connect to it. I tried with both Java client (through client-bindings) and the CMIS Workbench.
example: docker run -p 9000:8080 exoplatform/cmis-server * _default user/pass for this container:_ user1 / cm1sp@ssword * _documentation:_ [https://hub.docker.com/r/exoplatform/cmis-server] Reporter: Tom Cools Fix For: OpenCMIS 1.2.0 h2. Context We are using CMIS and I wanted to write an integration test for our project against a Docker container, which spawns the server on port 32806. * The URL is set on property org.apache.chemistry.opencmis.binding.atompub.url as is documented * org.apache.chemistry.opencmis.binding.spi.type is set to "atompub" * a session can be correctly established using SessionFactoryImpl h2. Problem As soon as we invoke any other action, let say SessionImpl.getRootFolder, the connection fails due to connection error. Looking at the URL that is being invoked, I notice that the PORT is no longer part of the URL. Further investigation has shown that the ATOM links which are returned do not contain the port anymore. This would mean that CMIS Server is not generating the links relative to HOST+PORT but only relative to HOST. This makes it impossible to use OpenCMIS on a different PORT without DNS/Proxy. It hinders easier local testing. h2. Stacktrace {noformat} Cannot access "https://localhost/cmis/atom11/test/id?id=%40root%40&filter=&includeAllowableActions=true&includeACL=false&includePolicyIds=false&includeRelationships=none&renditionFilter=cmis%3Anone": Connection refused: connectCannot access "https://localhost/cmis/atom11/test/id?id=%40root%40&filter=&includeAllowableActions=true&includeACL=false&includePolicyIds=false&includeRelationships=none&renditionFilter=cmis%3Anone": Connection refused: connectorg.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot access "https://localhost/cmis/atom11/test/id?id=%40root%40&filter=&includeAllowableActions=true&includeACL=false&includePolicyIds=false&includeRelationships=none&renditionFilter=cmis%3Anone": Connection refused: connect at org.apache.chemistry.opencmis.client.bindings.spi.http.DefaultHttpInvoker.invoke(DefaultHttpInvoker.java:232) at org.apache.chemistry.opencmis.client.bindings.spi.http.DefaultHttpInvoker.invokeGET(DefaultHttpInvoker.java:58) at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:697) at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:933) at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObject(ObjectServiceImpl.java:646) at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:532) at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getRootFolder(SessionImpl.java:799) at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getRootFolder(SessionImpl.java:792){noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)