-
Notifications
You must be signed in to change notification settings - Fork 17
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
java.net.ConnectException Connection refused #1
Comments
Hi Kamzata. Thanks for reporting the issue. First, can you give some information on your zimbra setup (run 'zmcontrol -v' as the zimbra user) ? Do you run the script directly from the zimbra server ? Does "zmprov -l gaa" command launched as the zimbra user gives you anything ? I don't understand why you need to change all Don't hesitate to provide as much information as you can. It will be easier for me to spot the problem here. Thanks. |
zimbra@myserver:/$ zmcontrol -v Yes, I run script directly on zimbra server. zimbra@myserver:/$ zmprov -l gaa Yes, it output list of all email address About substitution, if I leave ` and I run the script it return me an error like: "Error in line 165... don't expect EOF" |
Ok. I see the issue. It only appears when the script is launched by the zimbra user. When launching as root, there's no issue. The last commit (1ab5f7c) corrects this issue. Thanks for reporting the issue and sorry for the inconvenience. |
Thank you for reply. No, even launching script by root nothing change, it show me same problems. |
Ok, strange because the issue was on the part which is only run when the script is directly run using the zimbra user. Can you confirm it's working now ? Thanks. |
This is the output with the latest version you commit: root@myserver:/# zimbashckup.sh -v |
I tried only backup function, I haven't tried restore backups yet |
Hi again. So now we don't have the bash error and I see more clearly the problem you have. Apparently, you are running a multiple server configuration, and the issue is you can't reach the REST API on those servers (the error messages on Zimbra tools are quite wrong and "Connection refused" simply means zmmailbox cant reach the REST API). As the zimbra user, list all servers with the command If the ping command is answering something like "ping: unknown host...", then try adding the ip and host combination to your /etc/hosts file and then try the following command : This is the kind of command used my the script, so if it's succeed, there's a big chance of the script succeeding. By the way, I'm reopening this issue. Thanks. |
zimbra@myserver:/$ zmprov gas I have only one server on the same machines: mail.myserver.com |
Ok, strange, because zmmailbox uses this value to find the REST API server to query to. Could you try explicitely add the server to the last command I gave by adding "-h http://192.168.1.53" like If this works, maybe there's some misconfiguration on your zimbra instance. Thanks. |
zimbra@myserver:/$ zmmailbox -u http://192.168.1.53 -z -m [email protected] getAllFolders
|
Ok, so when the URL is set, it works. Could you run the following command : It will fail, but you will see some debug "SOAP RECEIVE" and "SOAP SEND", could you paste these parts ? Thanks. |
zimbra@myserver:/$ zmmailbox -d -z -m [email protected] /soap:Envelope======== SOAP RECEIVE ========= /soap:Envelope======== SOAP RECEIVE ========= /soap:Envelope======== SOAP RECEIVE ========= /soap:Envelope======== SOAP RECEIVE ========= /soap:Envelope======== SOAP RECEIVE ========= |
Here we are :). Even though the XML markup was eaten by github, I can see some problems. You see those 3 lines ? : Actually, those 3 lines should contain "mail.myserver.com" instead of "mail.forlini.it" and "mail.domain4.com". I think you imported the Zimbra you have in production to a virtual machine to perform some tests, and it seems Zimbra kept some "old" configuration settings. You have 2 ways to correct this :
Thanks. |
Sorry, I forget to mask my server name so I edited previous post. I haven't imported but yes, I'm running Zimbra on a OpenVZ CT. Anyway... Hit, my fault! I added entry "mail.domain4.com" on my /etc/hosts file just to try if it works and... it works! Now I'm trying to do "more clean way" that you suggest. Thank you |
How restore backups works? |
Hi. Something like It's scheduled to include a restore functionnality in zimbashckup, but I haven't the time to write it. But I will add a section in the README file about restoring backups. Thanks. |
I just added a section on the README file. |
Great! I'll try to restore backups. |
Hi, |
I run Zimbra on Ubuntu 12.04. Command is execute on the same Zimbra server
zimbra@myserver:/$ bashzimbashckup.sh -v
ERROR: zclient.IO_ERROR (Unable to get REST resource from http://mail.domain1.tld/home/[email protected]/_zimbra?fmt=tar: Connection refused) (cause: java.net.ConnectException Connection refused)
ERROR : Unable to backup folder /_zimbra, skipping
ERROR: zclient.IO_ERROR (Unable to get REST resource from http://mail.domain2.tld/home/[email protected]/_zimbra?fmt=tar: Connection refused) (cause: java.net.ConnectException Connection refused)
ERROR : Unable to backup folder /_zimbra, skipping
ERROR: zclient.IO_ERROR (Unable to get REST resource from http://mail.domain3.tld/home/[email protected]/_zimbra?fmt=tar: Connection refused) (cause: java.net.ConnectException Connection refused)
ERROR : Unable to backup folder /_zimbra, skipping
....
Further, I had to convert all ` with ' in the entire script.
The text was updated successfully, but these errors were encountered: