Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » KIMT not working (KIMT does not work 'Error setting IMAP service on KMS')
  •  
perfectmacsolutions

Messages: 14
Karma: 0
Send a private message to this user
Hello all,

I am trying to migrate mail accounts using KIMT.
Kerio 8.0.2 is running on CentOS 6.4 64 bits

When I start the migration process this is the output of the KIMT debug log.
Bye the way: IMAP is running on KMS.

====
LogManager initialized successfully; reportFileName='/Users/administrator/Library/Logs/KimtLogs/0 4222013_153559/report.txt', debugFileName='/Users/administrator/Library/Logs/KimtLogs/04 222013_153559/debug.log'
[2953850880] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/MeAPI.cpp:131 (testImap): KMS test on IMAP server - cannot connect.
Testing IMAP server: mail.alta.nl
IMAP server connection tested successfully.
Source ImapServer greeting: * OK IMAP4rev1 Server DeskNow ready
[2953850880] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/MeAPI.cpp:205 (testKms): Testing KMS on 192.168.67.33
[2953850880] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/MeAPI.cpp:217 (testKms): TinyDB test passed.
[2953850880] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/MeAPI.cpp:221 (testKms): KMS version: Kerio Connect 8.0.2 build 1117(CentOS release 6.4 (Final), x86)
[2697631040] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/Migrator.cpp:220 (prepareMigration): KMS version: Kerio Connect 8.0.2 build 1117(CentOS release 6.4 (Final), x86)
[2697631040] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/Migrator.cpp:242 (prepareMigration): Error setting IMAP service on KMS.
[2697631040] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/Migrator.cpp:173 (start): Unable to prepare migration environment.
KMS version: Kerio Connect 8.0.2 build 1117(CentOS release 6.4 (Final), x86)
Error setting IMAP service on KMS.
====
  •  
Pavel Špalek (Kerio)

Messages: 287
Karma: 37
Send a private message to this user
KIMT saves the setting of IMAP service (port numbers etc.) and rebinds to different port number. Sometimes this operation fails. Try to enter different port with the target (Connect) IP address (e.g. 127.0.0.1:8143). If this doesn't help, send us config log from the time of migration.

Pavel Špalek
developer - Kerio Connect
  •  
perfectmacsolutions

Messages: 14
Karma: 0
Send a private message to this user
Hello Pavel,

I tried to use another port (4143) but no luck.
Surely I turned off iptables and check if I could telnet to 143 and 4143.

This is the debug log:

LogManager initialized successfully; reportFileName='/Users/administrator/Library/Logs/KimtLogs/0 4222013_164209/report.txt', debugFileName='/Users/administrator/Library/Logs/KimtLogs/04 222013_164209/debug.log'
[2953850880] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/MeAPI.cpp:131 (testImap): KMS test on IMAP server - cannot connect.
Testing IMAP server: mail.alta.nl
IMAP server connection tested successfully.
Source ImapServer greeting: * OK IMAP4rev1 Server DeskNow ready
[2953850880] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/MeAPI.cpp:205 (testKms): Testing KMS on 192.168.67.33
[2953850880] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/MeAPI.cpp:217 (testKms): TinyDB test passed.
[2953850880] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/MeAPI.cpp:221 (testKms): KMS version: Kerio Connect 8.0.2 build 1117(CentOS release 6.4 (Final), x86)
[2697631040] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/Migrator.cpp:220 (prepareMigration): KMS version: Kerio Connect 8.0.2 build 1117(CentOS release 6.4 (Final), x86)
[2697631040] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/Migrator.cpp:242 (prepareMigration): Error setting IMAP service on KMS.
[2697631040] In /Volumes/temp/Builds/KMS-1117_darwin/repository/mailserver/M igrationTool/Imap/engine/Migrator.cpp:173 (start): Unable to prepare migration environment.
  •  
Pavel Špalek (Kerio)

Messages: 287
Karma: 37
Send a private message to this user
Sorry, I meant server (Connect) config log. There should be visible the change that fails. You can also check error/warning log.

Pavel Špalek
developer - Kerio Connect
  •  
perfectmacsolutions

Messages: 14
Karma: 0
Send a private message to this user
Hello Pavel,


It looks like there is some problem binding the IMAP service.
If I manually stop the service and start it again within about 3 seconds it fails to bind and as a result won't start.

This is the config log:

=====
[22/Apr/2013 17:15:51] administrator<_at_>alta.nl - Update Service {listeners={{name="IMAP", address="0.0.0.0", port="143"}, {name="IMAP", address="192.168.67.33", port="8143"}}, name="IMAP"}
[22/Apr/2013 17:16:04] administrator<_at_>alta.nl - Start service IMAP
[22/Apr/2013 17:18:46] Last message repeated 3 times
[22/Apr/2013 17:18:46] administrator - Session opened for host 192.168.67.45
[22/Apr/2013 17:18:46] administrator - Session closed for host 192.168.67.45
[22/Apr/2013 17:19:27] administrator - Session opened for host 192.168.67.45
[22/Apr/2013 17:19:27] administrator - insert IpAccessList set Name='KemtListe9b66a', Value='0.0.0.0/0.0.0.0', Enabled='1'
[22/Apr/2013 17:19:27] administrator - update Cluster set BackendModeEnabled='1', BackendMasterPassword=xxxxxx BackendAcl='KemtListe9b66a'
[22/Apr/2013 17:19:27] administrator - update MessageStore set EnableFolderCache='1'
[22/Apr/2013 17:19:27] administrator - update MessageStore set EnableIndexWriteCache='1'
[22/Apr/2013 17:19:27] administrator - update Security set Mode='0'
[22/Apr/2013 17:19:29] administrator - Stop service IMAP
[22/Apr/2013 17:19:30] administrator - delete from ServicePorts where Service='IMAP'
[22/Apr/2013 17:19:30] administrator - insert ServicePorts set Service='IMAP', IPAddress='0.0.0.0', Port='8143'
[22/Apr/2013 17:19:30] administrator - Start service IMAP

======

This is the debug log IMAP:

=====
22/Apr/2013 17:16:04][4702] Service IMAP started on port 143, listens on all interfaces
[22/Apr/2013 17:16:04][4702] Service IMAP started on port 8143, listens on IP address 192.168.67.33
[22/Apr/2013 17:16:09][4702] Service service-imap waiting for sockets update.
[22/Apr/2013 17:16:10][4702] Service service-imap sockets updated.
[22/Apr/2013 17:16:10][4702] Service IMAP stopped
[22/Apr/2013 17:16:20][4702] Service IMAP stopped
[22/Apr/2013 17:16:20][4702] Service IMAP started on port 143, listens on all interfaces
[22/Apr/2013 17:16:20][4702] Service IMAP started on port 8143, listens on IP address 192.168.67.33
[22/Apr/2013 17:19:27][4840] Service service-imap waiting for sockets update.
[22/Apr/2013 17:19:29][4840] Service service-imap sockets updated.
[22/Apr/2013 17:19:29][4840] Service IMAP stopped

=====

This is the error log:

=====
22/Apr/2013 17:16:11] socklib.cpp: Bind to port 143 failed: (98) Unknown error 98
[22/Apr/2013 17:16:11] ProtocolServiceDerives.cpp: Cannot start service IMAP on port 143, unable to bind service to all IP addresses
[22/Apr/2013 17:16:11] ProtocolService.cpp: Service IMAP failed to start
[22/Apr/2013 17:19:30] socklib.cpp: Bind to port 8143 failed: (98) Unknown error 98
[22/Apr/2013 17:19:30] ProtocolServiceDerives.cpp: Cannot start service IMAP on port 8143, unable to bind service to all IP addresses
[22/Apr/2013 17:19:30] ProtocolService.cpp: Service IMAP failed to start
=====
  •  
perfectmacsolutions

Messages: 14
Karma: 0
Send a private message to this user
Forgotten to mention: if I wait a few seconds longer, the service will bind and starts fine.
  •  
perfectmacsolutions

Messages: 14
Karma: 0
Send a private message to this user
Hello Pavel,

Today I haved placed the old and new server side-by-side and for some unkown reason kimt does work fine now.
So thanks for your support!
  •  
Pavel Špalek (Kerio)

Messages: 287
Karma: 37
Send a private message to this user
You're welcome. Just for the future reference: there is a problem on Linux with fast binding/unbinding service. Changing the target port should help.

Pavel Špalek
developer - Kerio Connect
  •  
jimpan

Messages: 6
Karma: 0
Send a private message to this user
I am having issues very similar to this. I have a hosting account on windows server 2008. Installation of Kerio very straight forward.

Initially I used KIMT to migrate some accounts from Mail Enable mail server which is on the same box. What I did was change the port numbers of SMTP and IMAP on target KMS and the migration worked like a charm.

For some reason I now cannot make this utility work. The reason I want to redo the migration was because I forgot to switch off the autostart services of the old mail enable server which somehow made some emails go back to the old mail server so I just wanted to migrate some accounts again.

The utility works fine and the account that I am trying ot migrate gets the green tick. But then nothing happens. Basically says it has not upgraded any emails. I have changed the port on iMAP to so many different port numbers and the thing will just no work any more.

I uninstalled and reinstalled KIMT. Even restarted server several times. It is now just becoming very frustrating.

Any help would be greatly appreciated.

Here is the log file. Also attached a couple of images

LogManager initialized successfully; reportFileName='C:/Users/ADMINI~1/AppData/Local/Temp/2/KimtL ogs/12172013_015503/report.txt', debugFileName='C:/Users/ADMINI~1/AppData/Local/Temp/2/KimtLo gs/12172013_015503/debug.log'
[4416] In engine\MeAPI.cpp:127 (kerio::migration::testImap): KMS test on source server - KMS was detected on server melb-eye.com.au.
Testing IMAP server: melb-eye.com.au
IMAP server connection tested successfully.
KMS test on source server - KMS was detected on server melb-eye.com.au.
Source ImapServer greeting: * OK IMAP4rev1 server ready at 12/17/13 01:55:19

[3560] In engine\MeAPI.cpp:205 (kerio::migration::testKms): Testing KMS on localhost
[3560] In engine\MeAPI.cpp:217 (kerio::migration::testKms): TinyDB test passed.
[3560] In engine\MeAPI.cpp:221 (kerio::migration::testKms): KMS version: Kerio Connect 8.2.1 build 2096(Windows Server 2008 R2, x86_64)
[4748] In engine\Migrator.cpp:219 (kerio::migration::Migrator::prepareMigration): KMS version: Kerio Connect 8.2.1 build 2096(Windows Server 2008 R2, x86_64)
[4748] In engine\Migrator.cpp:241 (kerio::migration::Migrator::prepareMigration): Error setting IMAP service on KMS.
[4748] In engine\Migrator.cpp:172 (kerio::migration::Migrator::start): Unable to prepare migration environment.


Regards,
Jim
  •  
Pavel Špalek (Kerio)

Messages: 287
Karma: 37
Send a private message to this user
KIMT should stop the IMAP service and start it again on port 26 (according to the screenshot), but this operation fails. Isn't there any other server running on port 26? These configuration requests are logged in Config log (on Connect), so please post it here. Check also Warning and Error log.

Pavel Špalek
developer - Kerio Connect
  •  
jimpan

Messages: 6
Karma: 0
Send a private message to this user
Thanks for responding. As far as I know port 26 was not being used by aything else. I also changed it to port 27 but problem still the same. Strange thing is I used port 26 for SMTP and port 144 for IMAP the first time I ever used the migration tool and worked.

Curious to know what the following entry means in ERROR LOG
Bind to port 26 failed: (10048) Only one usage of each socket address (protocol/network address/port) is normally permitted.

I am quite confident that port 26 is not being used by anything.

I just tried again doing on port 26 and then port 27. Here are the log entries.

DEBUG LOG

[17/Dec/2013 21:41:57][4924] Service service-smtp waiting for sockets update.
[17/Dec/2013 21:41:59][4924] Service service-smtp sockets updated.
[17/Dec/2013 21:41:59][4924] Service SMTP stopped
[17/Dec/2013 21:41:59][4924] Service SMTP started on port 26, listens on all interfaces
[17/Dec/2013 21:42:13][4100] Service service-imap waiting for sockets update.
[17/Dec/2013 21:42:13][4100] Service service-imap sockets updated.
[17/Dec/2013 21:42:13][4100] Service IMAP stopped
[17/Dec/2013 21:42:13][4100] Service IMAP started on port 144, listens on all interfaces
[17/Dec/2013 21:43:46][1340] Service service-imap waiting for sockets update.
[17/Dec/2013 21:43:47][1340] Service service-imap sockets updated.
[17/Dec/2013 21:43:47][1340] Service IMAP stopped
[17/Dec/2013 21:43:49][1456] Service IMAP stopped
[17/Dec/2013 21:43:51][1340] Service IMAP started on port 144, listens on all interfaces
[17/Dec/2013 21:44:55][4924] Service service-smtp waiting for sockets update.
[17/Dec/2013 21:44:57][4924] Service service-smtp sockets updated.
[17/Dec/2013 21:44:57][4924] Service SMTP stopped
[17/Dec/2013 21:45:24][4100] Service SMTP started on port 27, listens on all interfaces
[17/Dec/2013 21:46:25][3216] Service service-imap waiting for sockets update.
[17/Dec/2013 21:46:26][3216] Service service-imap sockets updated.
[17/Dec/2013 21:46:26][3216] Service IMAP stopped
[17/Dec/2013 21:46:27][1456] Service IMAP stopped
[17/Dec/2013 21:46:28][3216] Service IMAP started on port 144, listens on all interfaces


ERROR LOG

[17/Dec/2013 21:43:47] socklib.cpp: Bind to port 26 failed: (10048) Only one usage of each socket address (protocol/network address/port) is normally permitted.
[17/Dec/2013 21:43:47] ProtocolServiceDerives.cpp: Cannot start service IMAP on port 26, unable to bind service to all IP addresses
[17/Dec/2013 21:43:47] ProtocolService.cpp: Service IMAP failed to start
[17/Dec/2013 21:43:51] ProtocolService.cpp: Service IMAP not running
[17/Dec/2013 21:46:26] socklib.cpp: Bind to port 27 failed: (10048) Only one usage of each socket address (protocol/network address/port) is normally permitted.
[17/Dec/2013 21:46:26] ProtocolServiceDerives.cpp: Cannot start service IMAP on port 27, unable to bind service to all IP addresses
[17/Dec/2013 21:46:26] ProtocolService.cpp: Service IMAP failed to start
[17/Dec/2013 21:46:28] ProtocolService.cpp: Service IMAP not running

Regards,
Jim
  •  
Pavel Špalek (Kerio)

Messages: 287
Karma: 37
Send a private message to this user
It seems that you have IMAP service already configured to run on port 26 and KIMT then tries to unbind from port 26 and bind again, which sometimes fails if done fast (it happens on Linux). Just let IMAP to run on port 143 and then try another port in KIMT. And restart Connect before.

Pavel Špalek
developer - Kerio Connect
  •  
jimpan

Messages: 6
Karma: 0
Send a private message to this user
Not sure what you mean by IMAP service already configured to run on port 26. It was set to run on port 144.

Basically I have the default ports running o source:

SMTP: 25
IMAP: 143

On target, I have set the ports to be

SMTP:26
IMAP:144

So what should happen is that the IMAP should start on target server on port 144.

Hope that makes sense.

Thanks Jim

Regards,
Jim
  •  
Pavel Špalek (Kerio)

Messages: 287
Karma: 37
Send a private message to this user
I'm sorry, I overlooked that it's SMTP service running on port 26, not IMAP. Anyway now it makes sense, because SMTP service is bound to port 26, so you cannot bind IMAP service to the same port. There is no need to change service ports on Connect server, KIMT rebinds services as requested. Let the services run on their default ports and if you enter to the KIMT target hostname with non-default port, e.g. localhost:145, KIMT rebinds IMAP service from port 143 to 145 by itself. SMTP service is not used for migration at all, only administration service on the port 44337 and IMAP service (default port 143) must be accessible. For details see
http://kb.kerio.com/product/kerio-connect/server-configurati on/export-and-migration/kerio-imap-migration-tool-1468.html

[Updated on: Wed, 18 December 2013 14:42] by Moderator


Pavel Špalek
developer - Kerio Connect
  •  
jimpan

Messages: 6
Karma: 0
Send a private message to this user
Thanks for the response. I will try that out next time I am in a position to do a migration. Hopefully it works. Strange that I got things going the first time around but not the second time around.

I would not have thought that you can run two services on the same port (eg old mail server and new mail server).

The reason I believe that I changed my original ports on the target to 26 and 144 was because these services would not start in Kerio as it said that they were already being used. Basically my old mail enable server was using these ports. Hence, this is why I had changed them from the default ports.

The migration I did was on the same box which makes it a tad tricky.

Regards,
Jim.

Regards,
Jim
Previous Topic: Properties.fld contains 320 GB of data
Next Topic: Archive Location
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sat Oct 21 10:25:04 CEST 2017

Total time taken to generate the page: 0.00565 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.