-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UISP not starting Symbolic link loop - database dir not found. #68
Comments
Hi, sounds like there's a problem with the /config mapping. How exactly did you re-install the container? Make sure you have the /config directory inside the container mapped to a location on your NAS and try to re-create the container (delete the container and re-create it with the same parameters) |
Here is another part of the log, when just starting up: $ sudo -i cleardocker run -p 8765:80 -p 4443:443 -p 2055:2055/udp -e TZ=Europe/Amsterdam -v /volume1/docker/UNMS:/config nico640/docker-unms:latest[s6-init] making user provided files available at /var/run/s6/etc...exited 0. GID/UIDUser uid: 911
|
Weird, can you open a shell in the container and check if for example /var/lib/siridb is a link or a directory? It should point to the /config/siridb directory. I suspect that the |
/var/lib/siridb is a link,
Here is the env and volume settings: Still getting:
In /volume1/docker/UNMS only /usercert and /cert directories are created. |
Please delete the contents of the /config volume and try out the image tag |
Hi @Nico640 , I did this but unfortunately no success Here is logging from issue-68 run with cleaned /config volume: ` ## RabbitMQ 3.7.14. Copyright (C) 2007-2019 Pivotal Software, Inc.########## Licensed under the MPL. See https://www.rabbitmq.com/ ########## Logs: /var/log/rabbitmq/[email protected]
Starting nginx... I then tried connecting to the container - creating a postgres folder in /config and after this running initdb ` GID/UIDUser uid: 911
|
The log of the first start seems to be missing the beginning, the interesting part is between Also, there was a syntax error in the script. I have updated the |
Hi @Nico640 I pulled it again - here's the part of the log you mentioned: ` GID/UIDUser uid: 911
|
I'm having a similar problem. I did notice that if |
You're saying /var/lib/siridb is a link to /config/siridb and /config/siridb is also a link to /config/siridb? I'm still not really sure how this is happening, if you look at the way the link is created (on the issue-68 branch):
The first two lines should make sure that /config/siridb is a directory. The directory is either moved from /var/lib/siridb (but only if /var/lib/siridb is a directory) or created. The only way I could see this happening is if for some reason, /config/siridb does not exist, but /var/lib/siridb is already a link to /config/siridb, which would presumably create a link from /config/siridb to /config/siridb. However, in every log I have seen so far, /config/siridb is already a symbolic link loop when the 30-prepare script runs: Interestingly, the line I have added more logging to the |
I've pulled it again. Running the container without the mapping works for me. (I guess you don't need to see the logs of that) I then stopped it an recreated the container with the mapping: Issue returned - beginning of log: ` GID/UID User uid: 911 [cont-init.d] 20-adduser: exited 0. The database cluster will be initialized with locales Data page checksums are disabled. creating directory /config/postgres ... ok ` |
I'm having similar issues running on a Synology DS918+. Running the |
@abjugard I was able to reproduce the postgres permission issue on a virtual Synology NAS. The directory created by initdb had permissions of 755 instead of 700 or 750, which is probably caused by the umask of 0077 on the NAS. I updated the @Raka74 The date for the two symbolic links is way in the past, which is odd. What happens if you manually delete the two links and restart the container? Will they be re-created with the same date? Also, please test the new image, as the postgres issue also seems to play a role here.
|
Had to delete the volume directory entirely, but after doing so and re-creating it, UISP is now running using tag issue-68! |
@gordallott Interesting, I thought that the reason behind this is an failed update or re-install, which caused these leftover symbolic links. Can you also try to start a container with the issue-68 tag, open a bash inside the container and delete the invalid links inside /config (there shouldn't be any link in /config, only directories)? This seems to be an edge case specifically with Synology DSM, but I haven't been able to reproduce it creating these invalid links with the issue-68 tag, but I only tested it in a VM running Synology DSM, as I don't own a Synology NAS. I suspect that the contents of /config somehow persist even when deleting the contents of the mapped directory and re-creating the container. Maybe the init script should delete all links in /config? However that kinda feels like a workaround as these links shouldn't exist in the first place. |
yup, that did it. I had to restart the container after deleting the two symlinks in /config and then it progressed through just fine, super weird. Maybe something permissions related? lots of permissions warnings in general, thanks for the tip! |
As far as I'm concerned you can close this issue - recreating the links solved the problem. |
Hi Nico640, Thanks for making UNMS available in a Docker image 👍
I've run this before on my NAS without problems but now after a re-install it looks like it will not start.
In the logging firstly I see a lot of these messages:
_mkdir: cannot create directory ‘/data’: Symbolic link loop
chown: cannot access '/data/ucrm/data/import/csv': Symbolic link loop
chmod: cannot access '/data/ucrm/data/import/csv': Symbolic link loop
{"message":"Creating /data/ucrm/data/ticketing/attachments.","channel":"dirs.sh","datetime":"2022-06-02T13:08:31+00:00","severity":"INFO","level":200}
mkdir: cannot create directory ‘/data’: Symbolic link loop
chown: cannot access '/data/ucrm/data/ticketing/attachments': Symbolic link loop
chmod: cannot access '/data/ucrm/data/ticketing/attachments': Symbolic link loop
{"message":"Creating /data/ucrm/data/mailing/attachments.","channel":"dirs.sh","datetime":"2022-06-02T13:08:31+00:00","severity":"INFO","level":200}
{"message":"Creating symbolic links for /data/updates.","channel":"dirs.sh","datetime":"2022-06-02T13:08:31+00:00","severity":"INFO","level":200}
nginx: [emerg] open() "/data/log/ucrm/nginx/suspended_service_access.log" failed (40: Symbolic link loop)
{"message":"Publishing current /usr/src/ucrm/app/config/version.yml.","channel":"dirs.sh","datetime":"2022-06-02T13:08:31+00:00","severity":"INFO","level":200}
cp: cannot remove '/data/updates/version.yml': Symbolic link loop
chown: cannot access '/data/updates': Symbolic link loop
chmod: cannot access '/data/updates': Symbolic link loop
{"message":"Done creating symbolic links.","channel":"dirs.sh","datetime":"2022-06-02T13:08:31+00:00","severity":"INFO","level":200}
/usr/src/ucrm/scripts/parameters.sh
That seems to be repeating.
After this I see:
[W 2022-06-02 13:08:32] Database directory not found, creating directory '/var/lib/siridb'.
[E 2022-06-02 13:08:32] Cannot create directory '/var/lib/siridb'.
{"message":"Replacing configuration parameters.","channel":"parameters.sh","datetime":"2022-06-02T13:08:32+00:00","severity":"INFO","level":200}
I hope you can help here?
The text was updated successfully, but these errors were encountered: