Ensim cannot exit post maintenance mode

June 27, 2009 on 6:12 pm | In ensim | No Comments

The error

Maintenance State is : 4

Upgrading complete, 1 domains skipped

If the start up shows that it has skipped any domains, it is sure that the services are not going to start.

The first thing to do is to take a new shell and tail the contents of /var/log/appliance/ensim_appliance.log or /var/log/messages

tail -f /var/log/appliance/ensim_appliance.log

In another shell restart epld.

/etc/init.d/epld restart

This will give your the exact error in the other shell.

The error which I received was

===============

Jun 27 06:35:46 ensim [13222]: UpgradeActiveVirtDomains: upgrading site76
Jun 27 06:35:46 ensim [13222]: Pickle File does not exist — created
Jun 27 06:35:46 ensim [13222]: mysql: Write service configuration failed
Jun 27 06:35:46 ensim [13222]:  – (ERROR:   1600000000000001) field ‘dbaseadmin’: This database user name is already in use. P
lease select another user name.

===============

Fix which I applied was just a try

================
In file
/etc/virtualhosting/mappings/mysql.usermap

added the entry given below (the name myonlytest is just any word)
myonlytest = site76

then copied mysql file from another site which is working fine
cp -pr /home/virtual/site77/info/current/mysql /home/virtual/site76/info/current/

I edited the contents as

—————
[DEFAULT]
dbaseadmin = myonlytest
version = 10.3.0-rhel.4ES.11
enabled = 1
dbasenum = 1
—————

================

Restarted epld. That fixed the issue. :)

Failed to add site to database. DBERR: error ‘ERROR: duplicate key violates unique constraint “domain_key” ‘ in ‘ INSERT INTO siteinfo ENSIM

March 6, 2009 on 9:30 am | In Pgsql, ensim | 3 Comments

Hello guys, You might have come accross the following error

Failed to add site to database. DBERR: error ‘ERROR: duplicate key violates unique constraint “domain_key” ‘ in ‘ INSERT INTO siteinfo (site_id, domain, admin_user, email) VALUES (8, ‘domain.com’, ‘xxxx’, ‘xxx@domain.com’)’

=========================

Here is the fix.

Login to server via backend.

su postgres

Take a backup of the database…

pg_dump appldb > appldb.dump.out

Now lets edit

psql

postgres=# \l

this will list all the databases. The Ensim database is “appldb”

postgres=# \c appldb
You are now connected to database “appldb”.
appldb=# \d

This will list all the tables in the database.

You can find the database siteinfo

appldb=# SELECT * FROM siteinfo WHERE domain=’domain.com’;

site_id | domain | email | admin_user
———+——————–+———————+————
35 |domain.com | test@yahoo.com | dommn
(1 row)
it will list the entry. Now to fix the issue, you need to delete that entry. Find the site_id for the domain. Here it is 35

DELETE FROM siteinfo WHERE site_id=35;

Now quit the database

appldb=# \q

bash-3.00$ exit

Restart services

/etc/rc.d/init.d/virtualhosting restart

/etc/rc.d/init.d/epld restart

Now try to add the domain from Control panel. :)