Hi Emanuele,
the problem is that you're running buildout with sudo (as root), so now
your user (zeo and zope drop the priviledges to the user you set on
site.cfg once they're ran even if you use sudo) does not have permission
to write to the log.
If you want for some reason to run your development instance as root
(which is not recommended) you should set the users as root in site.cfg.
But I suggest that you change the ownership of all the files and folders
inside your buildout to your user and not use sudo to start the
instance:
chown -R username:username *
./bin/instance-debug fg
Cheers,
Mike
On Fri, 2010-12-03 at 14:06 +0100, Emanuele Rodo wrote:
> Hello Mike:
>
> here again: (the plone instance is running):
>
> sudo ./bin/instance-debug fg
>
> /usr/lib/python2.6/dist-packages/zope/__init__.py:1: UserWarning: Module
> _hashlib was already imported from None, but
> /usr/local/plumi4/eggs/hashlib-20081119-py2.6-linux-x86_64.egg is being
> added to sys.path
> # this is a namespace package
> 2010-12-03 14:03:24 INFO ZServer HTTP server started at Fri Dec 3
> 14:03:24 2010
> Hostname: localhost
> Port: 8080
> 2010-12-03 14:03:24 INFO ZServer FTP server started at Fri Dec 3
> 14:03:24 2010
> Hostname: localhost
> Port: 8021
> 2010-12-03 14:03:24 INFO Zope Set effective user to "omakuva"
> Traceback (most recent call last):
> File
> "/usr/local/plumi4/eggs/Zope2-2.12.13-py2.6-linux-x86_64.egg/Zope2/Startup/run.py",
> line 56, in <module>
> run()
> File
> "/usr/local/plumi4/eggs/Zope2-2.12.13-py2.6-linux-x86_64.egg/Zope2/Startup/run.py",
> line 21, in run
> starter.prepare()
> File
> "/usr/local/plumi4/eggs/Zope2-2.12.13-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py",
> line 83, in prepare
> self.setupFinalLogging()
> File
> "/usr/local/plumi4/eggs/Zope2-2.12.13-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py",
> line 358, in setupFinalLogging
> self.setupConfiguredLoggers()
> File
> "/usr/local/plumi4/eggs/Zope2-2.12.13-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py",
> line 240, in setupConfiguredLoggers
> self.cfg.eventlog()
> File
> "/usr/local/plumi4/eggs/ZConfig-2.7.1-py2.6.egg/ZConfig/components/logger/factory.py",
> line 32, in __call__
> self.instance = self.create()
> File
> "/usr/local/plumi4/eggs/ZConfig-2.7.1-py2.6.egg/ZConfig/components/logger/logger.py",
> line 42, in create
> handler = handler_factory()
> File
> "/usr/local/plumi4/eggs/ZConfig-2.7.1-py2.6.egg/ZConfig/components/logger/factory.py",
> line 32, in __call__
> self.instance = self.create()
> File
> "/usr/local/plumi4/eggs/ZConfig-2.7.1-py2.6.egg/ZConfig/components/logger/handlers.py",
> line 82, in create
> logger = self.create_loghandler()
> File
> "/usr/local/plumi4/eggs/ZConfig-2.7.1-py2.6.egg/ZConfig/components/logger/handlers.py",
> line 128, in create_loghandler
> handler = loghandler.FileHandler(path)
> File
> "/usr/local/plumi4/eggs/ZConfig-2.7.1-py2.6.egg/ZConfig/components/logger/loghandler.py",
> line 68, in __init__
> StreamHandler.__init__(self, open(filename, mode))
> IOError: [Errno 13] Permission denied:
> '/usr/local/plumi4/var/log/instance-debug.log'
>
>
> For your information; the site.cfg looks like:
>
> [site]
> # arch should be either linux32 or linux64. mac support coming soon
> arch = linux64
>
> # the default Administrator's username and password
> user = admin:*****
>
> # the id of your plumi site
> portal-id = videobank-plumi
>
> # the address where ZEO will be listening on
> zeo-address = localhost:8100
>
> # the address you debug instance will be listening on
> instance-debug-address = localhost:8080
>
> # the address where Zope's Medusa FTP is listening on
> instance-ftp = localhost:8021
>
> # the public ftp address of plumiftp. By default any ip, port 21, which
> requires root privileges to start
> plumiftp-address = *:21
>
> # change that if not using port 21
> ftp-user = root
>
> # the addresses of the zope instances
> instance1-address = localhost:8081
> instance2-address = localhost:8082
> instance3-address = localhost:8083
> instance4-address = localhost:8084
>
> # the icp addresses for each zope instance
> instance1-icp = localhost:8091
> instance2-icp = localhost:8092
> instance3-icp = localhost:8093
> instance4-icp = localhost:8094
>
>
> # hostname and port for transcode daemon
> transcode-host = localhost
> transcode-port = 8888
> transcode-user = daemon
>
> # varnish user and address to listen to
> cache-user = root
> cache-address = localhost:8090
>
> # hostname, port and credentials for supervisor
> supervisor-host = localhost
> supervisor-port = 8890
> supervisor-user = supervu
> supervisor-pass = supervp
>
> # haproxy port and host
> balancer-host = localhost
> balancer-port = 8089
> balancer-user = proxy
>
> # syslog address
> syslog-host = localhost
>
> # web server user
> www-user = www-data
> www-address = 180
> www-server-name = dev.raw-news.net:8180/videobank-plumi
> www-videoserver-name = video.raw-news.net
>
> # zope and zeo will be running as
> zeo-user = omakuva
> zope-user = omakuva
>
> # cache options
> zeo-client-cache-size = 1024MB
> zodb-cache-size = 10000
>
> # the folder where transcoded videos are being stored
> videofolder = transcoded
>
> # add here additional eggs that should be available to your portal
> eggs =
>
> # additional zcml includes
> zcml =
>
> # the mimetypes supported by default by the transcode profiles below
> default_supported_mimetypes = ['application/ogg', 'video/flv',
> 'video/x-flv', 'video/mpeg', 'video/3gpp', 'video/x-ms-wmv',
> 'video/ogg', 'video/x-ogg', 'video/x-ogm+ogg', 'video/quicktime',
> 'video/x-la-asf', 'video/x-ms-asf', 'video/x-msvideo', 'video/mp4']
>
> # a list of dicts containing the supported transcode profiles
> {'id':..,'cmd':..,'supported_mime_types':..}
> transcode-profiles = [ { 'id' : 'jpeg', 'cmd' : 'scripts/getThumb \"%s\"
> \"%s\"', 'supported_mime_types': ${site:default_supported_mimetypes},
> 'output_mime_type': 'image/jpeg', 'output_extension': 'jpg' }, { 'id' :
> 'mp4', 'cmd' : 'scripts/transcodeMp4 \"%s\" \"%s\"',
> 'supported_mime_types': ${site:default_supported_mimetypes},
> 'output_mime_type': 'video/mp4', 'output_extension': 'mp4' }, { 'id' :
> 'ogg', 'cmd' : 'scripts/transcodeTheora \"%s\" \"%s\"',
> 'supported_mime_types': ${site:default_supported_mimetypes},
> 'output_mime_type': 'video/ogg', 'output_extension': 'ogv' }, { 'id' :
> 'mpeg2', 'cmd' : 'scripts/transcodeMpeg2 %s %s', 'supported_mime_types':
> ${site:default_supported_mimetypes}, 'output_mime_type': 'video/mpeg',
> 'output_extension': 'mpg' },{ 'id' : 'dvd', 'cmd' : 'scripts/makeIso %s
> %s', 'supported_mime_types': 'text/xml', 'output_mime_type':
> 'application/octet-stream', 'output_extension': 'iso' }, ]
>
> # shared secret for symmetric encryption of transcode requests. If you
> update it here make sure you also update it in the transcode settings panel.
> secret = 1771d99931264d538e75eeb19da7d6a0
>
>
> Cheers.
>
> Emanuele.
>
>
> On 03/12/10 13.23, Mike Muzurakis wrote:
> > Hi Emanuele,
> >
> > you must set the effective user as the user that is running the
> > buildout. On your site.cfg there is a section:
> >
> > # zope and zeo will be running as
> > zeo-user = zope
> > zope-user = zope
> >
> > if for example you're running it as emanuele, you must change zope to
> > emanuele and re-run buildout with ./bin/buildout -vN -c devel.cfg
> >
> > It should take a couple of minutes for buildout to finish and then you
> > should be able to start zope.
> >
> > Cheers,
> > Mike
>
_______________________________________________
Discuss mailing list
[email protected]
http://lists.plumi.org/listinfo/discuss