cancel
Showing results for 
Search instead for 
Did you mean: 

Error with the changing of the default ports from 8080 to 19180 and db port from 5432 to 19132--404

Sarabjeet
Champ in-the-making
Champ in-the-making

i downloaded alfresco community edition from this link:

https://www.alfresco.com/thank-you/thank-you-downloading-alfresco-community-edition

I have made changes in the docker-compose.yml file as following one of the post

1) -Dshare.port=19180,

2) In the share i added 

ports:

       -19180:9090

3) in postgres db 

ports:

       - 19132:8080,

I get 404 error is their any specific settings still needs to be done.

HTTP Status 404 – Not Found


Type Status Report

Message Not found

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

1 ACCEPTED ANSWER

abhinavmishra14
World-Class Innovator
World-Class Innovator

Correct, proxy service did not launch correctly. The error you saw is related to google docs, but i see alfresco service is running in your case already as per your log.

Proxy service failure could likely be due to memory limit but not exatly sure unless below given info can be verified.

Can you share what's there in your DockerFile and what is the nginx config?

Also try increasing the memory limit on proxy service and retry. 

proxy:
  build:
    dockerfile: ./Dockerfile
    context: ./configs-to-override/proxy
  mem_limit: 256m

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

13 REPLIES 13

abhinavmishra14
World-Class Innovator
World-Class Innovator

@Sarabjeet 

To change the host ports on ACS or Share you can update the ports section in the docker-compose.yml file. 

For postgres you can do something like:

postgres:
image: postgres:11.7
mem_limit: 512m
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG -p 19132
ports:
- 19132:19132


And update the db url for alfresco service definition under JAVA_OPTS as:

JAVA_OPTS: "
             -Ddb.url=jdbc:postgresql://postgres:19132/alfresco
           "

This post could be helpful, it has example of changing host port of share:

https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-docker-share-port-change/td-p/2...


To change both host and container ports of repository and share, you need to take help of DockerFile and docker-compose.yml together in order to update the tomcat connector ports which is shipped with 8080 by default.
Updating the 'ports' configuration in docker-compose.yml file is not enough.

Refer this post for more details on changing ports using docker-compose.yml and DockerFile:

https://javaworld-abhinav.blogspot.com/2020/07/change-alfresco-share-proxy-and-db.html

Please make sure that you have enough memory to run all the apps. Minimum 8gb is required. 

You can go through this blog to understand the docker based deployments: 

https://hub.alfresco.com/t5/alfresco-content-services-blog/deploying-and-running-alfresco-content-se...

To get basic idea of DockerFile, refer: 

https://docs.docker.com/engine/reference/builder/

To get basic idea of docker-compose.yml, refer: 

https://docs.docker.com/compose/

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

venur
Star Contributor
Star Contributor

I am having similar issue. I tested my docker compose on local ubuntu VM and it was working fine. Now planned to deploy changes in dev environment but i can not use port 8080 on my dev machine as it is already used by a different application.
I have installed docker and docker-compose already by following the same steps i did for local setup.

Machine Type/OS : Linux/Ubuntu
CPUs: 4
RAM: 8gb


I looked into google and found this post and followed the link given in the post

After making all the changes i started, but not able to access alfresco and share.

Am i missing something ?

Here is the docker compose:

services:
alfresco:
build:
dockerfile: ./Dockerfile
context: ./configs-to-override/alfresco
mem_limit: 1500m
environment:
JAVA_OPTS: "
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbcSmiley Tongueostgresql://postgres:5432/alfresco
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dshare.host=127.0.0.1
-Dshare.port=7080
-Dalfresco.host=localhost
-Dalfresco.port=7080
-Daos.baseUrlOverwrite=http://localhost:7080/alfresco/aos
-Dmessaging.broker.url=\"failoverSmiley Sadnio://activemq:61616)?timeout=3000&jms.useCompression=true\"
-Ddeployment.method=DOCKER_COMPOSE

-DlocalTransform.core-aio.url=http://transform-core-aio:8090/

-Dalfresco-pdf-renderer.url=http://transform-core-aio:8090/
-Djodconverter.url=http://transform-core-aio:8090/
-Dimg.url=http://transform-core-aio:8090/
-Dtika.url=http://transform-core-aio:8090/
-Dtransform.misc.url=http://transform-core-aio:8090/

-Dcsrf.filter.enabled=false
-Xms1500m -Xmx1500m
"

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:2.3.4
mem_limit: 1536m
environment:
JAVA_OPTS: " -Xms256m -Xmx1536m"
ports:
- 8090:8090

share:
build:
dockerfile: ./Dockerfile
context: ./configs-to-override/share
mem_limit: 1g
environment:
REPO_HOST: "alfresco"
REPO_PORT: "7080"
JAVA_OPTS: "
-Xms500m
-Xmx500m
-Dalfresco.host=localhost
-Dalfresco.port=7080
-Dalfresco.context=alfresco
-Dalfresco.protocol=http
"

postgres:
image: postgres:11.7
mem_limit: 512m
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG
ports:
- 5432:5432

solr6:
image: alfresco/alfresco-search-services:1.4.2.2
mem_limit: 2g
environment:
#Solr needs to know how to register itself with Alfresco
- SOLR_ALFRESCO_HOST=alfresco
- SOLR_ALFRESCO_PORT=7080
#Alfresco needs to know how to call solr
- SOLR_SOLR_HOST=solr6
- SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
#HTTP by default
- ALFRESCO_SECURE_COMMS=none
- "SOLR_JAVA_MEM=-Xms2g -Xmx2g"
ports:
- 8083:8983 #Browser port

activemq:
image: alfresco/alfresco-activemq:5.15.8
mem_limit: 1g
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP

proxy:
build:
dockerfile: ./Dockerfile
context: ./configs-to-override/proxy
mem_limit: 128m
depends_on:
- alfresco
ports:
- 7080:7080
links:
- alfresco
- share

kaynezhang
World-Class Innovator
World-Class Innovator

It seems there is nothing wrong with port settings in docker compose file. I am afraid you don't have enough memory.

venur
Star Contributor
Star Contributor

based on suggestion, i changed the type now its 16GB memory, 8 CPU.  But when i start docker it still not allowing to connect to Alfresco and share. Not sure what's missing