Skip to content
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

Reports can't start Dovecot/Postfix #3

Closed
Ry3nlNaToR opened this issue Mar 5, 2020 · 7 comments
Closed

Reports can't start Dovecot/Postfix #3

Ry3nlNaToR opened this issue Mar 5, 2020 · 7 comments
Assignees
Labels
bug Something isn't working fixed This issue has been resolved

Comments

@Ry3nlNaToR
Copy link

Hi the script seem to be reporting it couldn't start Dovecot and Postfix when it dose manage to start it.

Got this from logs

[ERROR] Could not start Postfix container. Please check docker logs (code: 103)
[ERROR] Could not start Dovecot container. Please check docker logs (code: 104)
docker inspect" requires at least 1 argument.

@asifbacchus
Copy link
Owner

Anything in your docker logs? Are the containers stopped? Can you start them manually without errors?

You can check logs with

docker logs containername

And you can manually start them with

cd /your/mailcow/directory
docker-compose start containername

Has the script run in the past or is this the first time you are running it? Also, have you manually named your containers or are you using the defaults?

Finally, could you please give me the exact command you are using to invoke the script?

@Ry3nlNaToR
Copy link
Author

Ry3nlNaToR commented Mar 5, 2020

The first time I've used this script to backup the script dose manage to stop and start the containers it just returns a false error saying it couldn't since the output is also mentioning docker inspect" requires at least 1 argument.

The issue is probably caused by this line

dockerResultState="$(docker inspect -f '{{ .State.Running }}' $containerName)"
that check if the container is running.

The command I used to run is /root/backup/backup.sh -m "/root/mailcow/mailcow.conf" all the containers are the default name.

The script dose manage backup and start and stop everything I could just add >/dev/null 2>&1 to cronjob line to hide the output.

@asifbacchus
Copy link
Owner

First of all, I would always run a cronjob with > /dev/null 2>&1 regardless, good call on that.

Give me a day to spin up the latest mailcow on a test server and have a look. I haven't updated in a few months so maybe something has changed in how the containers are named or something and that is causing the script to generate false errors.

Out of interest, if you run the script normally as root at the console do you get any errors? If you are only getting errors when running as a cronjob I have a whole different idea of why that could be happening -- let me know?

I'm glad it's at least getting your backups done! Thx for letting me know about this issue.

@asifbacchus
Copy link
Owner

Just an update -- I managed to duplicate the error you are finding and it is indeed only on newer versions of mailcow. I'll track the issue down, just wanted to give you a heads up, haven't forgotten about you, @Ry3nlNaToR :-)

@asifbacchus asifbacchus self-assigned this Mar 6, 2020
@asifbacchus asifbacchus added the bug Something isn't working label Mar 6, 2020
@asifbacchus
Copy link
Owner

Ok, I was wrong, it was actually just a sloppy mistake I never noticed before. I was checking names of only running containers and, obviously, postfix and dovecot would not be running after they were stopped! Should be resolved now.

commit: 04bc748

@asifbacchus
Copy link
Owner

New minor release Version 1.5.1 includes this fix. Just noting for anyone that finds this issue.

@Ry3nlNaToR please confirm this fixes your issue and I'll close this. Thanks again!

@asifbacchus asifbacchus added the fixed This issue has been resolved label Mar 6, 2020
@Ry3nlNaToR
Copy link
Author

Just tested error now gone.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed This issue has been resolved
Projects
None yet
Development

No branches or pull requests

2 participants