4

I am in middle of installing Sites9 deployer on a Linux machine. I am using deployer-combined setup. With a State Store DB (installed already with PS script) I can succesfully work it out and my publishing happens succesfully. But when I try to use the same Broker DB info on setenv.sh for state store configuration, the deployer-combine does not install.

I get below errors:

2019-09-17 10:30:49,972 ERROR [main] SpringApplication - Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'entityManagerFactory' defined in class path resource 
[com/sdl/delivery/spring/configuration/StateStoreDBConfiguration.class]: 
Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0; nested exception is 
org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'dataSource' defined in class path resource 
[com/sdl/delivery/spring/configuration/StateStoreDBConfiguration.class]: 
Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested 
exception is com.sdl.delivery.configuration.ConfigurationException: 
Placeholder value is found. Please specify valid configuration for State Store database

What configuration option should be used in deployer-conf.xml for <State>.

I have below configuration at the moment:

deployer-conf:

 <State>
        <Storage Adapter="mssql" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver">
            <Property Name="host" Value="xx.xxx.xx.xxx"/>
            <Property Name="port" Value="1433"/>
            <Property Name="database" Value="Sites9_Broker"/>
            <Property Name="user" Value="xxxxxxx"/>
            <Property Name="password" Value="********"/>
            <Property Name="validationQuery" Value="SELECT 1"/>
        </Storage>
    </State>

cd_storage_conf:

<Storage Type="persistence" Id="defaultdb" dialect="MSSQL"
                     Class="com.tridion.storage.persistence.JPADAOFactory">
    <Pool Type="jdbc" Size="10" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120"/>
    <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
        <Property Name="serverName" Value="xx.xxx.xx.xxx" />
        <Property Name="portNumber" Value="1433" />
        <Property Name="databaseName" Value="Sites9_Broker" />
        <Property Name="user" Value="xxxxxxx" />
        <Property Name="password" Value="********"/>
    </DataSource>
</Storage>

I have looked at doc and it tells - If you installed your State Store database tables in the same database as the Content Data Store (which is what happens by default), you can consult the Storage element for the Content Data Store as found in the Storage Layer configuration file, cd_storage_conf.xml. Note that that Storage element has a different definition than the present one.

After tryin this, I still get the same error.

I have 2 questions:

  1. If I just use th Broker DB instead of State Store DB, whay it does not work? both the DBs has same tables?

  2. What configurational changes are needed to use deployer-combined without any State Store DB?

Thanks a lot in advance!

2
  • could you post some details on the error you get? you say the deployer-combined does not install. What error do you see? Commented Sep 17, 2019 at 9:01
  • Hey @HaraldHoffelinck - Thanks! Provided the brief log above. Do you want to have a look at full stack trace? Commented Sep 17, 2019 at 10:37

1 Answer 1

5

The bottom of your error states Placeholder value is found. Please specify valid configuration for State Store database.

This means that the state configuration (which you can find in the cd_deployer_conf.xml contains some placeholder value (${...}) instead of an actual value. This is the state store configuration block :

<State>
    <Storage Adapter="${dbadapter}" driver="${dbdriver}">
        <Property Name="host" Value="${dbhost}"/>
        <Property Name="port" Value="${dbport}"/>
        <Property Name="database" Value="${dbname}"/>
        <Property Name="user" Value="${dbuser}"/>
        <Property Name="password" Value="${dbpassword}"/>
        <Property Name="validationQuery" Value="${dbvalidationquery}"/>
    </Storage>
</State>

You could either make sure that either you replace these placeholder values with actual values, or that you set an environment value for each of these.

If you want to know the values to use (it should be possible to reuse the same DB as your regular Broker DB), you should check the examples (that are commented out in the same xml file) provided for oracle or sql server.

Edit :

After some further testing, it turns out the problem is due to one of the configuration values (in this case the password) having a $ character.

The reason for this is that the propertyvalues can be filled in using environment values, via the construct Value="${environment-variable-name}".

In the microservice code, there seems to be a check that fires an error if a $ character is found in the property value. Usually, this would mean the environment variable could not be resolved- in that case it makes sense to throw an error, but this also triggers the same error when a value actually contains a $ character.

Edit 2

Some more information regarding the construct ${contentqueuename-ContentQueue} This allows you to fill in a property value using an environment variable. the value after the - (in the example "ContentQueue") would be a fallback value in case the environment variable does not exist.

10
  • Thanks for the explanation but I have checked this already. There are no placeholder in deployer_conf in both the cases when I use state store db or broker db. The problem is when I use state store db info the installation works but with broker db it does not. Also note that this issue is not due to having $ in password as well. I assume that the issue is due to <storage> configuration in deployer_conf due to driver class name etc. I tried many ways but thats just not working and everytime the error it throws is placeholder. Clueless! Commented Sep 18, 2019 at 7:51
  • could you post the config files you have used (cd_deployer & cd_storage) - just make sure to remove any sensitive info like host names and passwords. Commented Sep 18, 2019 at 13:11
  • Updated my config blocks. Pleas check. Thanks for helping! Commented Sep 19, 2019 at 5:24
  • thanks for adding the config blocks. They look OK. However, i found that the only reason why the error you see gets triggered is because one of the config values contains a $ character. Can you verify that you don't have this character in your login or password? If you have, can you change this and see if that solves the problem? - I do realise that you say "Also note that this issue is not due to having $ in password as well", but can you check you don't have this character in any of your state store config settings? Commented Sep 19, 2019 at 14:03
  • Yes at first I ended up thinking same that it could be somehow due to $ in my password, which I had, but then I removed $ and tried again, still no luck! Do you think, as per doc link I shared above, we dont need to update any of deployer_conf properties inside <State> block? Commented Sep 19, 2019 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.