Very strange. Never heard anything like that before. :!:
Although I don't think this will affect what you are seeing, you should be configuring alfresco via alfresco-global.properties rather than alfresco-shared.properties or repository.properties.
Is your networking working well when you are not running alfresco?
Then I suspect that your instance of alfresco is not shutting down properly
Check that your instance of Tomcat is shutting down for example check that there is no java process after you shutdown.
Wait a minute.
Then do a netstat -a command to see what is happening on your tcp ports.