Expand my Community achievements bar.

Join us for Adobe Campaign Community Q&A Coffee Break on Thursday, March 7th at 8am PT with Eric Perrin, Gael Mouello, Chakravarthy Kalva, Bruce Swann and Sandra Hausmann.
SOLVED

createdb issue when deploy on Debian 11 with command line

Avatar

Level 1

Hi, there,

 

I'm trying to deploy server side on Debian 11 with command line.

And I'm following the commands and steps in the acc docker project on github: https://github.com/adobe/acc_docker

 

I'm facing a strange issue when running nlserver config -createdb with a precreated empty db (as shown in the Dockerfile of the acc_docker project), it will shows db exists and cannot be update/init/reset.

Command:

nlserver config -instance:acc1 -force -createdb -cnx:[postgresql:neolane_user:neolane_db/neolane_pwd@localhost:5432,timezone=America/New_York,unicodeData=true,usetimestamptz=true,NChar=true,unicodeData=1] -internalpwd:neo -packages:[nms:core,nms:campaign,nms:amp,nms:mrm,nms:interaction,nms:social,nms:messageCenterControl,nms:paper,nms:mobile,nms:phone,nms:mobileApp,ncm:content,nms:survey,nms:neolap,nms:response,nms:federatedDataAccess,nms:campaignOptimization,nms:purl,nms:coupon,nms:centralLocal,crm:connectors,nms:webAnalytics,nms:aemIntegration,nms:aamIntegration]

 

Response:

17:46:56 > Application server for Adobe Campaign Classic (7.3.3 build 9359@c636bf3 of 03/06/2023)
17:46:56 > Starting 1 connection(s) on pool 'default acc1' (PostgreSQL, server='localhost:5432', login='neolane_user:neolane_db')
17:46:57 >>> CFG-600002 The database already exists for the neolane_db2 instance. Installation has been stopped to avoid overwriting. (iRc=-53)

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Daniel you need a different command if you already have created the DB, please see below.

 

 

The config command

The config command lets you manage server configuration, including the reconfiguration of the database connection.

Use the config command of the nlserver executable file with the -setdblogin parameter.

nlserver config -setdblogin:<[dbms:]account[:database][/password]@server>
nlserver config -setdblogin:PostgreSQL:<accountName>:test6@dbserver
  • In the case of an Oracle database, you must not specify the account. The syntax will be as follows:

nlserver config -setdblogin:Oracle:test6@dbserver

Declare a database

You can associate an existing database with an instance from the command line by using the following syntax:

nlserver config -setdblogin:[rbdms:]account[:database][/password]@server

The following values are possible for the [rdbms] parameter:

  • postgresql: for PostgreSQL,
  • oracle: for Oracle,
  • mssql: for Microsoft SQL Server,
  • DB2: for the DB2 engine.

The following command configures the demo instance with the SQL type server known as base6, linked to the campaign account and its password on the dbsrv server:

 nlserver config -setdblogin:db:campaign:myBase/password@dbServer -instance:demo

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi Daniel you need a different command if you already have created the DB, please see below.

 

 

The config command

The config command lets you manage server configuration, including the reconfiguration of the database connection.

Use the config command of the nlserver executable file with the -setdblogin parameter.

nlserver config -setdblogin:<[dbms:]account[:database][/password]@server>
nlserver config -setdblogin:PostgreSQL:<accountName>:test6@dbserver
  • In the case of an Oracle database, you must not specify the account. The syntax will be as follows:

nlserver config -setdblogin:Oracle:test6@dbserver

Declare a database

You can associate an existing database with an instance from the command line by using the following syntax:

nlserver config -setdblogin:[rbdms:]account[:database][/password]@server

The following values are possible for the [rdbms] parameter:

  • postgresql: for PostgreSQL,
  • oracle: for Oracle,
  • mssql: for Microsoft SQL Server,
  • DB2: for the DB2 engine.

The following command configures the demo instance with the SQL type server known as base6, linked to the campaign account and its password on the dbsrv server:

 nlserver config -setdblogin:db:campaign:myBase/password@dbServer -instance:demo

Avatar

Level 1

Hi, David,

 

Thanks for your reply.

The database is totally empty, the commands comes from the docker project in my post.

And I have also tried to use setdblogin to set the configuration, but seems there is no comand to re-build the database structure and will get SQL error when trying to start the web with command "nlserver start web".

 

I have tried to use the createdb command with an not existing database name too but get database not exists error (I'm sure the database "neolane_db2" not exists on the db server):

root@Daniel-Surface:/usr/local/neolane/nl6/conf# nlserver config -instance:acc2 -createdb -cnx:[postgresql:neolane_user:neolane_db2/neolane_pwd@localhost:5432,timezone=America/New_York,unicodeData=true,usetimestamptz=true,NChar=true,unicodeData=1] -internalpwd:neo -packages:[nms:core,nms:campaign,nms:amp,nms:mrm,nms:interaction,nms:social,nms:messageCenterControl,nms:paper,nms:mobile,nms:phone,nms:mobileApp,ncm:content,nms:survey,nms:neolap,nms:response,nms:federatedDataAccess,nms:campaignOptimization,nms:purl,nms:coupon,nms:centralLocal,crm:connectors,nms:webAnalytics,nms:aemIntegration,nms:aamIntegration]
11:50:33 > Application server for Adobe Campaign Classic (7.3.3 build 9359@c636bf3 of 03/06/2023)
11:50:34 > Enumerating the file entities...
11:50:35 > Generating schemas...
11:50:36 > Starting 1 connection(s) on pool 'default acc2' (PostgreSQL, server='localhost:5432', login='neolane_user:neolane_db2')
11:50:36 >>> PGS-220000 PostgreSQL error: FATAL: database "neolane_db2" does not exist
. (iRc=-2006)
11:50:36 >>> WDB-200000 Unable to connect to database 'localhost:5432' of type 'PostgreSql' with login 'neolane_user:neolane_db2' (iRc=-2006)
11:50:36 >>> Failed to install the packages. (iRc=-53)

 

Regards,

Daniel

 

Avatar

Community Advisor

Hi Daniel, can you check the database is running? can you login using the settings below, can you check the port is open, basically just try and login first to stablish you can connect to the database manually.

 

# Environment variables required for PostgreSQL 
# ---------------------------------------------
ENV PG_DB_NAME_VAR neolane_db
ENV PG_USER_VAR neolane_user 
ENV PG_PASSWORD_VAR neolane_pwd

# Environment variables required for Campaign 
# -------------------------------------------
ENV INSTANCE acc1
ENV CAMPAIGN_ADMIN_PASSWORD_VAR neo 
ENV CAMPAIGN_INTERNAL_PASSWORD_VAR neo 

Avatar

Community Advisor

Hello @daniel-lu ,

what are you trying to do? Update password? 

you can do so by

nlserver config -setdblogin:<[dbms:]account[:database][/password]@server>

 

nlserver config -setdblogin:PostgreSQL:<accountName>:test6@dbserver

 check other commands at 
https://experienceleague.adobe.com/docs/campaign-classic/using/monitoring-campaign-classic/productio...

 

Marcel

Avatar

Administrator

Hi @daniel-lu,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. 
Thanks!



Sukrity Wadhwa