Two bloomreach local

Hi, currently I have two projects from bloomreach

  1. Project A run with tomcat and apache24 serveless also is in intellij
  2. Project B run from command line “mvn -P cargo.run -Drepo.path=storage/storage”
    I also want to add the project B, was start from the “Create the Project - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS”, basically I run the mvn command architype suggest by bloomreach tutorial

I would like to run Project A and Project B at the same time but everytime I tried I get from Project B " ERROR: transport error 202: bind failed: Address" and I know its because Project A is already using the port 8443, 8081

Im not sure if I need to remove the target directory which is created after I run in Project B “mvn -P cargo.run -Drepo.path=storage/storage” this target has been generated inside myproject/target. That target contains a tomcat9x and there I should change the tomcat port in server.xml, but if I do mvn clean install that target is remove, so Im not sure about how to approach this to get the two projects run locally at the same time.

Thanks in advance

You need to run it on a different port. see here:

Thank you for your help

  1. bloomreach local 1 → http://localhost:8081/cms/?1
  2. bloomreach local 2 → http://127.0.0.1:9080/cms/?1

I applied from the link you suggest on local 2, so I change/update the pom (plugin/propertis and profile)and also conf/context.xml

When I go to 2. local2 channel management → click on channel I cannot see my channels anymore

log:
Cannot get channels: Channel Manager is not available since there is not HstRequestContext

Hi,
You’ll have to work the HST hosts configuration, to tell channels are there at 127.0.0.1 as well, see Hosts Configuration - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS

I guess it comes down to copying /hst:myproject/hst:hosts/dev-localhost and /hst:platform/hst:hosts/dev-localhost to 127.0.0.1 and modifying the port configs.

Cheers, Jeroen

Hi, yesterday I applied from the link you suggest on local 2, so I change/update the pom (plugin/properties and profile)and also conf/context.xml

Now when Im trying to run I’m getting

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] ‘profiles.profile.id’ must be unique but found duplicate profile with id cargo.run @ line 451, column 11

Yesterday run fine but today not

I added (yesterday) in the pom


But again yesterday I was able to run the two local bloomreach

Did you add a new profile or adjust the existing profile? If it worked yesterday, I would think that you must’ve made some change in between that broke the pom. I’d have to see the whole pom to be able to tell though.

ok, please find the pom

<?xml version="1.0" encoding="UTF-8"?> 4.0.0 org.onehippo.cms7 hippo-cms7-release 13.4.22

bloomreach
bloomreach
org.example
bloomreach
0.1.0-SNAPSHOT
pom

- - - -
<!--***START temporary override of versions*** -->
<!-- ***END temporary override of versions*** -->

<essentials.version>13.4.22</essentials.version>
<jsp-api.version>2.2</jsp-api.version>
<taglibs.version>1.2.5</taglibs.version>

<development-module-deploy-dir>shared/lib</development-module-deploy-dir>

<hippo.cms.locales>nl,de,fr,es,zh</hippo.cms.locales>
<buildNumber>${maven.build.timestamp}</buildNumber>
hippo Hippo maven 2 repository. https://maven.bloomreach.com/repository/maven2/ javax.servlet.jsp jsp-api ${jsp-api.version} provided
  <!-- other predefined runtime scope versioned dependencies -->
  <dependency>
    <groupId>org.apache.taglibs</groupId>
    <artifactId>taglibs-standard-spec</artifactId>
    <version>${taglibs.version}</version>
    <scope>runtime</scope>
  </dependency>

  <dependency>
    <groupId>org.apache.taglibs</groupId>
    <artifactId>taglibs-standard-impl</artifactId>
    <version>${taglibs.version}</version>
    <scope>runtime</scope>
  </dependency>

  <!-- other predefined compile scope versioned dependencies -->
  <dependency>
    <groupId>org.freemarker</groupId>
    <artifactId>freemarker</artifactId>
    <version>${freemarker.version}</version>
  </dependency>

</dependencies>
package org.eclipse.m2e lifecycle-mapping 1.0.0 org.codehaus.mojo build-helper-maven-plugin regex-property [0.0,) org.apache.maven.plugins maven-jar-plugin true ${buildNumber}
<profile>
  <id>default</id>
  <activation>
    <activeByDefault>true</activeByDefault>
    <property>
      <name>jrebel</name>
    </property>
  </activation>
  <modules>
    <module>cms-dependencies</module>
    <module>repository-data</module>
    <module>cms</module>
    <module>site</module>
    <module>essentials</module>
  </modules>
</profile>

<profile>
  <id>docker.build</id>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>${project.artifactId}-cms</artifactId>
      <version>${project.version}</version>
      <type>war</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>${project.artifactId}-webapp</artifactId>
      <version>${project.version}</version>
      <type>war</type>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</profile>

<profile>
  <id>docker.run</id>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>${project.artifactId}-essentials</artifactId>
      <version>${project.version}</version>
      <type>war</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>${project.artifactId}-repository-data-development</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>${project.artifactId}-repository-data-site-development</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</profile>

<profile>
  <id>mysql</id>
</profile>

<profile>
  <id>docker.mysql</id>
  <properties>
    <docker.db.bind.1>${project.basedir}/target/mysql-data:/var/lib/mysql</docker.db.bind.1>
    <docker.db.bind.2>${project.basedir}/db-bootstrap:/docker-entrypoint-initdb.d</docker.db.bind.2>

    <docker.brxm.envRun.MYSQL_DB_HOST>${docker.container.db.net.bloomreach-network.ip}</docker.brxm.envRun.MYSQL_DB_HOST>
  </properties>
</profile>

<profile>
  <id>postgres</id>
</profile>

<profile>
  <id>docker.postgres</id>
  <properties>
    <docker.db.bind.1>${project.basedir}/target/postgres-data:/var/lib/postgresql/data</docker.db.bind.1>
    <docker.db.bind.2>${project.basedir}/db-bootstrap:/docker-entrypoint-initdb.d</docker.db.bind.2>

    <docker.brxm.envRun.POSTGRES_DB_HOST>${docker.container.db.net.bloomreach-network.ip}</docker.brxm.envRun.POSTGRES_DB_HOST>
  </properties>
</profile>

<profile>
  <id>cargo.run</id>
  <properties>
    <!-- Already defined in the cms project POM. Override here for your project, if necessary -->
    <!-- <repo.bootstrap>true</repo.bootstrap> -->
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <configuration>
          <configuration>
		  <properties>
          <!-- SNIP -->
          <cargo.servlet.port>9080</cargo.servlet.port>
          <cargo.rmi.port>9205</cargo.rmi.port>
          <cargo.tomcat.ajp.port>9009</cargo.tomcat.ajp.port>
          <!-- SNIP -->
			</properties>
            <configfiles>
              <configfile>
                <file>${project.basedir}/conf/context.xml</file>
                <todir>conf/</todir>
                <tofile>context.xml</tofile>
              </configfile>
              <configfile>
                <file>${project.basedir}/conf/catalina-logging.properties</file>
                <todir>conf/</todir>
                <tofile>logging.properties</tofile>
              </configfile>
            </configfiles>
            <files>
              <file>
                <file>${project.basedir}/repository-data/development/target/bloomreach-repository-data-development-${project.version}.jar</file>
                <todir>${development-module-deploy-dir}</todir>
              </file>
              <file>
                <file>${project.basedir}/repository-data/site-development/target/bloomreach-repository-data-site-development-${project.version}.jar</file>
                <todir>${development-module-deploy-dir}</todir>
              </file>
            </files>
          </configuration>
          <deployables>
            <deployable>
              <type>war</type>
              <properties>
                <context>/cms</context>
              </properties>
              <location>${project.basedir}/cms/target/cms</location>
            </deployable>
            <deployable>
              <location>${project.basedir}/site/webapp/target/site</location>
              <type>war</type>
              <properties>
                <context>/site</context>
              </properties>
            </deployable>
            <deployable>
              <location>${project.basedir}/essentials/target/essentials</location>
              <type>war</type>
              <properties>
                <context>/essentials</context>
              </properties>
            </deployable>
          </deployables>
          <container>
            <systemProperties>
              <log4j.configurationFile>${project.basedir}/conf/log4j2-dev.xml</log4j.configurationFile>
              <!-- enables auto export and web files watch: -->
              <project.basedir>${project.basedir}</project.basedir>
              <send.usage.statistics.to.hippo>true</send.usage.statistics.to.hippo>
            </systemProperties>
          </container>
        </configuration>
      </plugin>
    </plugins>
  </build>
</profile>

<profile>
  <!-- additional profile to combine with cargo:run to *not* bootstrap the development modules:
       $ mvn -P cargo.run,without-development-data -->
  <id>without-development-data</id>
  <properties>
    <development-module-deploy-dir>temp</development-module-deploy-dir>

    <!-- Comment out Dockerfile instruction that copies development modules to an image -->
    <docker.brxm.copy.dev.libs.cmd>#</docker.brxm.copy.dev.libs.cmd>
  </properties>
</profile>

<profile>
  <id>dist</id>
  <dependencies>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <defaultGoal>validate</defaultGoal>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>distro-assembly</id>
            <phase>validate</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>${project.basedir}/src/main/assembly/distribution.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</profile>

<profile>

  <id>dist-with-development-data</id>
  <dependencies>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <defaultGoal>validate</defaultGoal>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>distro-assembly-with-development-data</id>
            <phase>validate</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>${project.basedir}/src/main/assembly/distribution-with-development-data.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</profile>
  <profile>
  <id>cargo.run</id>
  <!-- SNIP -->
  <properties>
    <es.tcpPort>9500</es.tcpPort>
    <!-- SNIP -->
    <es.httpPort>9400</es.httpPort>
    <!-- SNIP -->
  </properties>
</profile>
---

ok, i spot the existing profile in line 209 docker.run , then i added in the bottom again another pofile copy for the example. so the issue is solve, I remove the one from the bottom and add the property in line 209, thank you Jasper

Hi Jeroen and Jasper

Come back to my question (before the pom problem which is already solve)

im not sure I did the dev-localhost configure well, so I am sharing some screenshoot, so you can guide me here

channel 2 - demo
cms console
hst:host

hst:site

hst:platform - I did not touch this

where i can find the port configs?

Thanks in advance

On

/hst:bloomreach/hst:hosts/dev-localhost

add a property

hst:defaultport = 9080

Hi Jasper,

Thank you for your explanation, my lab is currently broken :frowning: so I raise another ticket here (Hippo-plugin-selections' has a missing dependency 'hippo-cms') and I’m waiting for the answer, when I solve this I come back to you

Regards
Sara

Hi Jasper,
Thank you for your help, i added defaultport in dev-localhost. We can close this ticket