Comments (16)
Hi,
That usually means that the UCRM module isn't done with it's database migration yet.
Have a look into the UNMS and UCRM log files (/config/unms/logs/unms.log / ucrm.log), the UCRM log should have something like "Start database migration." in it.
The UCRM database migration can take quite a while when doing a fresh install. How long did you wait?
from docker-unms.
I am also getting a similar error, have left the system for over an hour but it seems to keep looping on the same section, secondly no logs are being created in the log directory which I am assuming is related to the error that pops up in conjunction with the crm_db_version_view error, this is the part of the log that keeps repeating:
/var/run/postgresql:5432 - accepting connections
1000
/usr/src/ucrm/scripts/init_log.sh
/usr/src/ucrm/scripts/dirs.sh
{"message":"Creating directories.","channel":"dirs.sh","datetime":"2020-01-25T15:37:49+13:00","severity":"INFO","level":200}
{"message":"Done creating directories.","channel":"dirs.sh","datetime":"2020-01-25T15:37:50+13:00","severity":"INFO","level":200}
{"message":"Creating symbolic links.","channel":"dirs.sh","datetime":"2020-01-25T15:37:50+13:00","severity":"INFO","level":200}
{"message":"Creating symbolic link for /usr/src/ucrm/app/data.","channel":"dirs.sh","datetime":"2020-01-25T15:37:51+13:00","severity":"INFO","level":200}
{"message":"Creating symbolic link for /usr/src/ucrm/app/EmailQueue.","channel":"dirs.sh","datetime":"2020-01-25T15:37:52+13:00","severity":"INFO","level":200}
{"message":"Creating symbolic link for /usr/src/ucrm/app/logs.","channel":"dirs.sh","datetime":"2020-01-25T15:37:52+13:00","severity":"INFO","level":200}
{"message":"Creating symbolic link for /usr/src/ucrm/web/uploads.","channel":"dirs.sh","datetime":"2020-01-25T15:37:53+13:00","severity":"INFO","level":200}
{"message":"Creating symbolic links for /data/updates.","channel":"dirs.sh","datetime":"2020-01-25T15:37:53+13:00","severity":"INFO","level":200}
{"message":"Publishing current /usr/src/ucrm/app/config/version.yml.","channel":"dirs.sh","datetime":"2020-01-25T15:37:53+13:00","severity":"INFO","level":200}
{"message":"Done creating symbolic links.","channel":"dirs.sh","datetime":"2020-01-25T15:37:53+13:00","severity":"INFO","level":200}
/usr/src/ucrm/scripts/parameters.sh
{"message":"Replacing configuration parameters.","channel":"parameters.sh","datetime":"2020-01-25T15:37:54+13:00","severity":"INFO","level":200}
In Kernel.php line 765:
Unable to create the logs directory (/usr/src/ucrm/app/logs)
{"message":"Done replacing configuration parameters.","channel":"parameters.sh","datetime":"2020-01-25T15:37:54+13:00","severity":"INFO","level":200}
/usr/src/ucrm/scripts/cron_jobs_disable.sh
crontab /tmp/crontabs/server
/usr/src/ucrm/scripts/database_ready.sh
{"message":"Waiting for database.","channel":"database_ready.sh","datetime":"2020-01-25T15:37:55+13:00","severity":"INFO","level":200}
{"message":"Database ready.","channel":"database_ready.sh","datetime":"2020-01-25T15:37:55+13:00","severity":"INFO","level":200}
/usr/src/ucrm/scripts/database_create_extensions.sh
{"message":"Creating database extensions.","channel":"database_create_extensions.sh","datetime":"2020-01-25T15:37:55+13:00","severity":"INFO","level":200}
{"message":"Extension \"citext\" exists.","channel":"database_create_extensions.sh","datetime":"2020-01-25T15:37:57+13:00","severity":"INFO","level":200}
Checking CRM database schema version.
ERROR: relation "crm_db_version_view" does not exist at character 19
STATEMENT: SELECT value FROM crm_db_version_view
relation "crm_db_version_view" does not exist
Retrying in 10s
{"message":"Extension \"unaccent\" exists.","channel":"database_create_extensions.sh","datetime":"2020-01-25T15:37:58+13:00","severity":"INFO","level":200}
{"message":"Extension \"uuid-ossp\" exists.","channel":"database_create_extensions.sh","datetime":"2020-01-25T15:38:00+13:00","severity":"INFO","level":200}
{"message":"Finished creating database extensions.","channel":"database_create_extensions.sh","datetime":"2020-01-25T15:38:00+13:00","severity":"INFO","level":200}
/usr/src/ucrm/scripts/migrate.sh
{"message":"Start replace shared views.","channel":"migrate.sh","datetime":"2020-01-25T15:38:01+13:00","severity":"INFO","level":200}
In Kernel.php line 765:
Unable to create the logs directory (/usr/src/ucrm/app/logs)
Makefile:12: recipe for target 'server_with_migrate' failed
make: *** [server_with_migrate] Error 1
FATAL: role "root" does not exist
Should not this is trying to run on a raspberry pi 4, all other folders seem to create fine and get populated, have tried cleaning on the folder and starting again but just gets to the same place.
from docker-unms.
Hi,
Seems like UNMS is waiting for "crm_db_version_view" to be created by UCRM, however, UCRM fails to start because it can't create the logs directory, which is a symbolic link to "/data/log/ucrm/app/logs".
Can you check if that symbolic link is created in the container?
from docker-unms.
Yes it appears that it is created: logs -> /data/log/ucrm/app/logs
Inside the logs folder is just a prod.log file which is empty
from docker-unms.
Just to follow up, deleting the symbolic link at the right point gets past the error and a new log directory is created (one that's not a symbolic link) and now all I am getting is:
Checking CRM database schema version.
No data returned from the query.
Retrying in 10s
So I am assuming it may be migrating properly now? Will let it run a let you know.
from docker-unms.
So it has now started properly and seems to be working, though that error message about not being able to create the log directory has come back again.
In Kernel.php line 765:
Unable to create the logs directory (/usr/src/ucrm/app/logs)
from docker-unms.
The empty prod.log file is actually normal.
Because it seems to work without the symbolic link, it could have something to do with the data -> /config/unms/ucrm link or the /config mapping. You can try removing the container & image and recreate it without the /config mapping.
from docker-unms.
Sorry to come back to this discussion after such a long time. In fact, I did let the container run since we last talked and still experience the same issue.
If you want me to try something to get the container going, please let me know! Happy to reply back with the results
from docker-unms.
Hi, you can try to recreate the container, wipe the /config mapping and get a log of it's first startup.
from docker-unms.
I hope I understood you correctly to remove the volume mapped to /config and recreate the container?!
If so, nothing has changed, the startup is still the same with the same error messages
ERROR: relation "crm_db_version_view" does not exist at character 19,
STATEMENT: SELECT value FROM crm_db_version_view,
relation "crm_db_version_view" does not exist
from docker-unms.
Strange. If you take a look in the container, there should normally be two log files at /config/unms/logs (unms.log / ucrm.log). If they exist, check them for any errors (especially the ucrm.log, as ucrm seems to be unable to start).
Also, what device / system are you running this on?
from docker-unms.
Closed due to inactivity.
from docker-unms.
I know this issue is old and I haven't followed up in time (sorry @Nico640).
I was getting another error that basically spammed id: user unms not found
(so the UNMS user referenced in a few scripts never existed), so I created user unms with groupadd unms; useradd -d /home/app/unms -g unms unms
and the migration went through and UNMS is running.
I wonder if the unms user needs any other permissions or groups @Nico640 ?
from docker-unms.
Not sure why the user wouldn't get created. The UCRM service (/etc/services.d/ucrm/run) waits until the unms user exists, therefore the spamming. The NGINX service executes /entrypoint.sh, which is supposed to create the unms user if it doesn't exist.
If you want to test this or if it happens again, you could try to execute /entrypoint.sh manually and see if the user gets created.
I'm not sure under what circumstances this problem occurs as I haven't been able to reproduce this.
from docker-unms.
Finally got around testing this and I might found something that is an improvement here:
The user isn't created, because adduser
errors out since UID 1000 is already taken for the abc user on the container (boot2docker on a Mac Mini running through parallels). So adduser
says that UID 1000 is already taken.
I'm not sure if this is only a boot2docker standard, but I've seen this elsewhere, where my GID and UID are slightly off (UID 1000, GID 100). That's also how I setup the container, using docker-compose and setting PGID and PUID in the environmental variables for my docker user (as I do it for every container).
I did recreate the image from the dockerfile to give it a try, but that didn't work out for me either.
from docker-unms.
I removed the two environmental variables where I set the process GID and UID and things are working now
from docker-unms.
Related Issues (20)
- Open Ports for Postgresql HOT 1
- Core (sigsegv) on startup with QNAP and 2.3 series HOT 4
- Issue with upgrading older version of UISP (1.6.5 --> 2.3.57) HOT 5
- Update Docker Image for UISP 2.4.93 HOT 2
- Unable to do fresh install of 2.4.93 HOT 1
- Running with reverse proxy HOT 2
- clean install but infinite loop HOT 2
- s6-overlay-suexec: fatal: can only run as pid 1 on Container start. HOT 2
- How to get UNMS (UISP) to take a lets encrypt (or converted) .key/.crt using docker-compose, no Wiki info. HOT 8
- Changing ports doesn't seem to be working HOT 1
- UISP never starts. Container restarts HOT 2
- Update to 2.2.12 HOT 2
- Suggestion:
- Limit memory usage of container
- Connection refused while connecting to upstream, client HOT 2
- UISP container starts only after recreation, but than not and have to recreate container every time HOT 2
- Docker Compose Version HOT 1
- RabbitMQ not start HOT 13
- 1.3.11 no longer responding to requests. HOT 10
- Can't start on A1 Oracle instances because of outdated Node.js version HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-unms.