[Twisted-Python] Twisted perspective broker on port 80, problem
hbd
happybrowndog at hotmail.com
Wed Jun 17 16:32:19 EDT 2009
Is there any reason why I am getting this error when I try to get
perspective broker to be on port 80?
twisted.internet.error.CannotListenError: Couldn't listen on any:80:
(13, 'Permission denied').
I made sure port 80 was not used by Apache or anything else by checking
with netstat.
Here is the relevant pieces of twisted code:
application = twisted.application.service.Application("eventserver")
rpcservice = TheService()
flashservice = XMLSocket(FlashReceiver)
myServiceCollection =
twisted.application.service.IServiceCollection(application)
portalmonitor = portal.Portal(DefaultRealm())
dbu=twisted.cred.checkers.InMemoryUsernamePasswordDatabaseDontUse()
dbu.addUser("user1","pass1")
portalmonitor.registerChecker(dbu)
internet.TCPServer(5002,
server.Site(rpcservice.getResource())).setServiceParent(myServiceCollection)
internet.SSLServer(80,
pb.PBServerFactory(portalmonitor),ssl.DefaultOpenSSLContextFactory('privkey.pem','cacert.pem')).setServiceParent(myServiceCollection)
internet.TCPServer(5001, flashservice).setServiceParent(myServiceCollection)
More information about the Twisted-Python
mailing list