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

cancel
Showing results for 
Search instead for 
Did you mean: 
Sarabjeet
Member II

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

Jump to solution

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 Solution

Accepted Solutions
abhinavmishra14
Advanced

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

Jump to solution

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 solution in original post

13 Replies
abhinavmishra14
Advanced

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

Jump to solution

@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
Established Member

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

Jump to solution

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
Advanced

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

Jump to solution

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

 

venur
Established Member

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

Jump to solution

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 

kaynezhang
Advanced

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

Jump to solution

Alfresco did not startup correctly,could you paste your tomcat log here ?

abhinavmishra14
Advanced

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

Jump to solution

As suggested, it will great if you can provide startup log or do the following debugging steps and see if anything comes out

Start the containers and then check the resources using following command:

docker stats

This will tell how much memory each container is is consuming. Upper limit is already defined in the compose file.

Try this command and see whether all containers are up:

docker ps

This will tell whether acs, share and all required containers are up and running. I see you already have enough memory to work with. Sometimes we need to tweak the memory limits which is predefined in docker-compose file if any containers does't launch correctly. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
venur
Established Member

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

Jump to solution

seems like proxy service is not running?

Here is the output of docker ps

CONTAINER ID        IMAGE                                        COMMAND                  CREATED              STATUS              PORTS                                                                                                NAMES
8366be07ef4c        acs-docker_alfresco                          "catalina.sh run -se…"   About a minute ago   Up About a minute   7000/tcp, 8080/tcp                                                                                   acs-docker_alfresco_1
a7e700a2a1e7        acs-docker_share                             "/usr/local/tomcat/s…"   About a minute ago   Up About a minute   7000/tcp, 8000/tcp, 8080/tcp                                                                         acs-docker_share_1
d93e526b1262        alfresco/alfresco-transform-core-aio:2.3.2   "/bin/sh -c 'java $J…"   About a minute ago   Up About a minute   0.0.0.0:8090->8090/tcp                                                                               acs-docker_transform-core-aio_1
3d33c9437169        alfresco/alfresco-search-services:1.4.2.2    "/bin/sh -c '$DIST_D…"   About a minute ago   Up About a minute   8983/tcp, 10001/tcp, 0.0.0.0:8083->8983/tcp                                                          acs-docker_solr6_1
0cf1e2570778        postgres:11.7                                "docker-entrypoint.s…"   About a minute ago   Up About a minute   5432/tcp, 0.0.0.0:5432->5432/tcp                                                                     acs-docker_postgres_1
bd39c4fd688a        alfresco/alfresco-activemq:5.15.8            "/bin/sh -c '${ACTIV…"   About a minute ago   Up About a minute   0.0.0.0:5672->5672/tcp, 0.0.0.0:8161->8161/tcp, 0.0.0.0:61613->61613/tcp, 0.0.0.0:61616->61616/tcp   acs-docker_activemq_1

docker stats output

CONTAINER ID        NAME                              CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
8366be07ef4c        acs-docker_alfresco_1             1.31%               1.147GiB / 1.465GiB   78.33%              5.01MB / 9.93MB     169MB / 238kB       129
a7e700a2a1e7        acs-docker_share_1                0.30%               420.5MiB / 1GiB       41.06%              189kB / 2.79MB      117MB / 98.3kB      47
d93e526b1262        acs-docker_transform-core-aio_1   0.14%               273MiB / 1.5GiB       17.78%              57.7kB / 295kB      217MB / 250kB       42
3d33c9437169        acs-docker_solr6_1                0.86%               677.9MiB / 2GiB       33.10%              4.54MB / 881kB      65.6MB / 5.4MB      116
0cf1e2570778        acs-docker_postgres_1             0.60%               58.15MiB / 512MiB     11.36%              5.33MB / 3.78MB     43.2MB / 77.2MB     18
bd39c4fd688a        acs-docker_activemq_1             0.45%               193.2MiB / 1GiB       18.87%              36kB / 34.8kB       67.3MB / 3.67MB     50

Log, not allowing me to post full log here. Tried posting multiple times but my comment is not showing, even with insert code option

There is one error in log: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'googleDocsImportFormats'

 

abhinavmishra14
Advanced

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

Jump to solution

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)
EddieMay
Alfresco Employee

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

Jump to solution

@venur 

Here is the log output you tried to include:

alfresco_1            | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'googleDocsImportFormats' defined in file [/usr/local/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/googledocs/drive/google-customResponse-context.xml]: Cannot resolve reference to bean 'GoogleDocsService' while setting bean property 'googledocsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GoogleDocsService' defined in file [/usr/local/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/googledocs/drive/googledocs-context.xml]: Cannot resolve reference to bean 'googledocsService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'googledocsService' defined in file [/usr/local/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/googledocs/drive/googledocs-context.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException alfresco_1 | at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:314) alfresco_1 | at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110) alfresco_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1674) alfresco_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1426) alfresco_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) alfresco_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) alfresco_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) alfresco_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
alfresco_1            |  2020-08-25 14:09:10,709  INFO  [management.subsystems
alfresco_1            |  2020-08-25 14:09:27,318  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 14 Web Scripts (+0 failed), 103 URLs
alfresco_1            |  2020-08-25 14:09:27,318  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 0 Package Description Documents (+0 failed) 
alfresco_1            |  2020-08-25 14:09:27,318  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 0 Schema Description Documents (+0 failed) 
alfresco_1            |  2020-08-25 14:09:27,322  INFO  [extensions.webscripts.AbstractRuntimeContainer] [localhost-startStop-1] Initialised Public Api Web Script Container (in 2857.9922ms)
alfresco_1            |  2020-08-25 14:09:27,401  INFO  [extensions.webscripts.DeclarativeRegistry] [asynchronouslyRefreshedCacheThreadPool1] Registered 14 Web Scripts (+0 failed), 103 URLs
alfresco_1            |  2020-08-25 14:09:27,401  INFO  [extensions.webscripts.DeclarativeRegistry] [asynchronouslyRefreshedCacheThreadPool1] Registered 0 Package Description Documents (+0 failed) 
alfresco_1            |  2020-08-25 14:09:27,401  INFO  [extensions.webscripts.DeclarativeRegistry] [asynchronouslyRefreshedCacheThreadPool1] Registered 0 Schema Description Documents (+0 failed) 
alfresco_1            |  2020-08-25 14:09:27,611  WARN  [scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] clientAuth does not appear to be set for Tomcat. clientAuth must be set to 'want' for X509 Authentication
alfresco_1            |  2020-08-25 14:09:27,611  WARN  [scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] Attempting to set clientAuth=want through JMX...
alfresco_1            |  2020-08-25 14:09:27,637  WARN  [scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] Unable to set clientAuth=want through JMX.
alfresco_1            |  25-Aug-2020 14:09:33.409 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/alfresco] has finished in [132,354] ms
alfresco_1            | 25-Aug-2020 14:09:33.411 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/api-explorer]
alfresco_1            | 25-Aug-2020 14:09:33.541 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
alfresco_1            | 25-Aug-2020 14:09:34.417 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/api-explorer] has finished in [1,006] ms
alfresco_1            | 25-Aug-2020 14:09:34.418 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
alfresco_1            | 25-Aug-2020 14:09:34.423 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'debug' to '100' did not find a matching property.
alfresco_1            | 25-Aug-2020 14:09:34.531 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
alfresco_1            | 25-Aug-2020 14:09:34.535 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [116] ms
alfresco_1            | 25-Aug-2020 14:09:34.540 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-7080"]
alfresco_1            | 25-Aug-2020 14:09:34.568 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-7009"]
alfresco_1            | 25-Aug-2020 14:09:34.572 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 139431 ms
alfresco_1            | 2020-08-25 14:10:00,668  INFO  [management.subsystems.ChildApplicationContextFactory] [http-nio-7080-exec-2] Starting 'Transformers' subsystem, ID: [Transformers, default]
alfresco_1            |  2020-08-25 14:10:01,230  INFO  [management.subsystems.ChildApplicationContextFactory] [http-nio-7080-exec-2] Startup of 'Transformers' subsystem, ID: [Transformers, default] complete

Not sure why this ending up in spam? Apologies.

Regards,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!