Problem to start Plone. Please help me

My web server's power outage occurred and then my webpage doesn't work anymore. I'm using Plone ver 4.3.3 and Zope.
I found there is no problem at apache2 so i think the problem is at the plone. So I tried to restart plone and there was the problem.
I typed bin/instance fg but i got error message like this.

Traceback (most recent call last):
File "/home/kwlee/Plone/zinstance/parts/instance/bin/interpreter", line 265, in
exec(compile(__file__f.read(), file, "exec"))
File "/home/kwlee/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/run.py", line 76, in
run()
File "/home/kwlee/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/home/kwlee/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/init.py", line 79, in prepare
self.setupServers()
File "/home/kwlee/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/init.py", line 214, in setupServers
% (server.servertype(),e[1]))
ZConfig.ConfigurationError: There was a problem starting a server of type "HTTPServer". This may mean that your user does not have permission to bind to the port which the server is trying to use or the port may already be in use by another application. (Permission denied)

So i searched if there is another Plone running, so i did bin/instance stop and started again, but that couldn't solve my problem.
And i did ps aux | grep python and the result was like this.
kwlee 2974 0.0 0.0 17164 964 pts/14 S+ 16:38 0:00 grep --color=auto python
(kwlee is my account name)

How can i solve this problem?

search for your zope.conf for example with
grep zope.conf bin/instance
once you have the path then search for the lock file location with something like
grep lock /path/to/zope.conf
once you have this path check if the lock path exists, if yes delete it and try again

It does not have to be a Phone server running.
Something else could be running on port 8080, so maybe just ps aux and look through it 'manually'.

You could also try:
bin/instance stop; bin/instance fg
or bin/instance restart.

Also, there is a Data.fs.lock file ( you have to google that, I think you can delete it if it has something to do with this)

Thanks for your reply.
I searched grep zope.conf bin/instance and nothing came out. and also grep lock command too.
What can i do next?

Thanks for your reply.
Following your answer, I searched whether something is running on port 8080, but nothing found.
And then i typed bin/instance stop -> bin/instance fg again but same error happened.
Also, In Data.fs.lock file, there was a process not running now, so i deleted it and tried again but failed.

Everytime I try ./instance start and ./plonectl start, the process is soon died, and when i typed ./instance status or ./plonectl status, i get "daemon manager not running" or "daemon manager running; daemon process not running"
What is the matter then?

Just to be sure: This is a standalone setup (or did you install ZEOserver ?)

There is most definitely another service running preventing the instance from starting...

Install netstat and run netstat -nlp to see what connections you have open. If something is already running you'll see it there.

a plone start script without zope reference ? I'd be curious to see it; please post your bin/instance script

I know 2 reasons for such a situation to happen:

  1. you try to use a privileged port (numeric value < 1024) but you do not start as "root". This will give you a Permission denied.

  2. there is already some service using the port your Zope tries to use. This will give you a Address already in use.

Apparently, you have the first case. If you have configured your Zope/Plone to use a privileged port, you must start it as root (not as a non-privileged user).

Should you think that Zope/Plone should not use a privileged port, check the definition for http-server in zope.conf. Usually, you find zope.conf in parts/{instance|client1}/etc; use a recursive search (--> find . -name zope.conf) in case, you have problems to find it. zope.conf is created by buildout. Do not edit it directly but instead put relevant parameter definitions into buildout.cfg and then rerun buildout.

Oh sorry. I misspelled the command. Now I typed grep zope.conf bin/instance and got result like this.


So I followed your answer.

And deleted that instance.lock and tried./instance fg.
But same error happened.

Now what should i do?

Try to start your Zope/Plone as "root", i.e. sudo bin/instance fg.

Thanks for your reply.
I started as root and did /bin/instance fg. But same error happened. And also, following your first answer, i did two solutions each. But cannot solved.
Oh and i did buildout, but that also had error doing buildout. The error message was like this.
image
What can i do?

That's a tough one for sure.

First of all remember that failing start for one reason can leave process running and/or locks present that will give other errors when trying to start again. So you could possibly have cured the original problem and not realize it. So whenever you have a problem like this, check before each start attempt if there is no process remaining in memory with ps aux | grep python and for locks like you did at my request.

Then it's good that people trying to help you can understand better your configuration. Please post your zope.conf since you now know where it is. To post a big file it's better not to use screenshot, you can post a text by copying it in the server console, inserting three backticks in a separate line like this , type enter then paste. Then to exit quoting mode type again three backticks in a separate line.
This will appear like this

gp@ploneprod5:/usr/local/plone-5.1/ploneprod$ sudo ss -pentl | grep 8080
LISTEN     0      128          *:8080                     *:*                   ino:74504 sk:7 <->

The lines above appear in a different font, the three backticks are not displayed but I entered them nonetheless; n this way you will be able to display any necessary information without screenshot restrictions.

About the buildout: I don't think anyone advised you to run buildout with sudo. Don't do that. If it's necessary to do it your install is not good at all.

About the port conflict: I don't have a 4.3.3 instance (there is something called 'maintenance' for your server that includes updating to the last revision...) but on a 4.3.17 instance setting the start address to an already used one gives an explict message about 'address already in use'. So it's not likely your original problem was another application using the port.

Last do not open a new thread when you have already one for the same problem. Thanks for using a forum in a reasonable way.

Plone Foundation Code of Conduct