Giter Site home page Giter Site logo

webapp is not runnig about skyline HOT 9 CLOSED

elifish4 avatar elifish4 commented on August 25, 2024
webapp is not runnig

from skyline.

Comments (9)

earthgecko avatar earthgecko commented on August 25, 2024

Could you please check the following. Do you have any webapp processes already
running? You can check like this.

ps aux | grep webapp | grep skyline


# If you have anyway webapp processes they will be similar to
root     25936  0.0  0.2 202140 16556 ?        S    Aug23   2:40 /opt/python_virtualenv/projects/skyline-py2712/bin/python2.7 /opt/python_virtualenv/projects/skyline-py2712/bin/gunicorn --config /opt/skyline/github/skyline/skyline/webapp/gunicorn.py webapp:app
root     25942  0.0  0.2 234196 23456 ?        S    Aug23   0:27 /opt/python_virtualenv/projects/skyline-py2712/bin/python2.7 /opt/python_virtualenv/projects/skyline-py2712/bin/gunicorn --config /opt/skyline/github/skyline/skyline/webapp/gunicorn.py webapp:app
root     25943  0.0  0.2 234208 23472 ?        S    Aug23   0:25 /opt/python_virtualenv/projects/skyline-py2712/bin/python2.7 /opt/python_virtualenv/projects/skyline-py2712/bin/gunicorn --config /opt/skyline/github/skyline/skyline/webapp/gunicorn.py webapp:app

If you do, try open the frontend in your browser.

This is possibly due to the amount of time the gunicorn process takes to spawn
on your machine. The webapp bin file does sometimes start without writing a
pid to the pid file because the process spawning takes longer than usual and
no pid is determined as gunicorn takes a while to spawn.

If things are still not working for you then try stopping, not restarting the
webapp, if it stops, just check that all the processes have terminated and the
pid file has been removed from /var/run/skyline/webapp.pid and then try and
start the webapp again.

If the webapp stop did not terminate the running pids, issue a kill to all the
process ids, make sure they have terminated by checking the ps output again and
make sure there is no pid file.

Once there are no webapp processes running and there is no pidfile, start the
webapp again. If you experience the same behaviour, you could try increasing
the sleep .5 on line 273 of the local copy of
/opt/skyline/github/skyline/bin/webapp.d to 5 instead of .5, see if that helps.

vi +273 /opt/skyline/github/skyline/bin/webapp.d

Also if you have followed the documentation, please make sure you stop and start
the webapp using the absolute path to the bin file.

/opt/skyline/github/skyline/bin/webapp.d start

from skyline.

elifish4 avatar elifish4 commented on August 25, 2024

thanks for your response.
i still get:

Error: 'Error: './skyline/webapp/gunicorn.py' doesn't exist
webapp started with pid unknown
' doesn't exist
webapp started with pid unknown

the output of the command "ll ./skyline/webapp/gunicorn.py" is:

-rw-r--r-- 1 root root 1378 Aug 31 08:26 ./skyline/webapp/gunicorn.py

from skyline.

earthgecko avatar earthgecko commented on August 25, 2024

Can you please run the following and paste the output

ps aux | grep webapp | grep skyline

ls -al /var/run/skyline/webapp.pid

tail -n 20 /var/log/skyline/webapp.log

Also what user are you starting the webapp with? Are you using sudo?

from skyline.

elifish4 avatar elifish4 commented on August 25, 2024

ps aux | grep webapp | grep skyline ----> returned empty
ls -al /var/run/skyline/webapp.pid ----> ls: cannot access /var/run/skyline/webapp.pid: No such file or directory

tail -n 20 /var/log/skyline/webapp.log:

File "./skyline/webapp/webapp.py", line 904, in run
    now = time()
TypeError: 'module' object is not callable
2016-08-31 08:46:01 :: 17153 :: webapp.d :: process removed log.wait file, starting log management
2016-08-31 08:46:02 :: 17153 :: webapp.d :: log management done
started with pid 17250
Traceback (most recent call last):
  File "./skyline/webapp/webapp.py", line 1029, in <module>
    run()
  File "./skyline/webapp/webapp.py", line 1026, in run
    daemon_runner.do_action()
  File "/usr/local/lib/python2.7/dist-packages/daemon/runner.py", line 267, in do_action
    func(self)
  File "/usr/local/lib/python2.7/dist-packages/daemon/runner.py", line 186, in _start
    self.app.run()
  File "./skyline/webapp/webapp.py", line 904, in run
    now = time()
TypeError: 'module' object is not callable
2016-08-31 08:46:09 :: 17210 :: webapp.d :: process removed log.wait file, starting log management
2016-08-31 08:46:09 :: 17210 :: webapp.d :: log management done

from skyline.

earthgecko avatar earthgecko commented on August 25, 2024

It looks like you are not running in Skyline in a virtualenv which makes it
trickier. Did you install all the packages in requirements.txt?

The error being thrown suggests that from time import time, sleep is not
behaving as expected

TypeError: 'module' object is not callable

Please use

pip list

and verify that you have all the required packages listed in requirements.txt at
the correct versions.

Further I would suggest for ease and known state that if you want to try using
Skyline consider running it in an isolated virtualenv. There is a bit of info
on the motivation and rationale behind running Skyline in a virtualenv and
a fair bit of documentation on how to setup virtualenv for Python here:
http://earthgecko-skyline.readthedocs.io/en/latest/running-in-python-virtualenv.html

Although you are seem to be only having an issue with webapp, so if you do not
want to use virtualenv and just maybe fix this you could try editting line 904
and change the now = time() to now = time.time()

If you still experience issues, virtualenv.

from skyline.

elifish4 avatar elifish4 commented on August 25, 2024

ok. now i seceded to start webapp follow your last advice.
now, the webapp.d is up but when i try lo access to the url http://my_server_ip:1500
i get the 403 page:

Forbidden

You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.

Can you help?

from skyline.

earthgecko avatar earthgecko commented on August 25, 2024

Is this on you localhost or on a server? If it is your localhost then your url should be:

http://127.0.0.1:1500

If it is on a server and you are using the default webapp settings e.g. WEBAPP_IP = '127.0.0.1'
you will not be able to access a server on 127.0.0.1

If you are using the default settings, and it is not on your localhost, you either have to run Apache in front of gunicorn - look at deploying Apache with etc/skyline.httpd.conf.d.example and http://earthgecko-skyline.readthedocs.io/en/latest/webapp.html#apache-and-gunicorn

Or you can bind the webapp to an accessible IP address and declare your WEBAPP_ALLOWED_IPS.

If you go that route, please ensure that your firewall is configured to only allow your WEBAPP_ALLOWED_IPS.

There is a fair bit of documentation on the webapp and its security in the docs, please see the Installation and webapp pages for serving gunicorn via Apache reverse proxy with authentication - http://earthgecko-skyline.readthedocs.io/en/latest/installation.html

from skyline.

elifish4 avatar elifish4 commented on August 25, 2024

Thanks!!
you solved my problems :)

from skyline.

earthgecko avatar earthgecko commented on August 25, 2024

No worries, glad to hear you have it all sorted out and working now.

from skyline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.