gamegos / cesi Goto Github PK
View Code? Open in Web Editor NEWCeSI is a web interface for managing multiple supervisors from the same place.
License: GNU General Public License v3.0
CeSI is a web interface for managing multiple supervisors from the same place.
License: GNU General Public License v3.0
How about i18n support?
Hi,
I'm using HAProxy to redirect to the local machine where cesi is hosted. I'm using a certificate on HAProxy so that all traffic is encrypted, but whenever i use the base url, i get to redirected to /login and the https disappears from the url, which gives an incorrect url.
I am not entirely sure if this can be fixed from HAProxy or somewhere in cesi.
I use cesi 2.6.7,it over flow the line when check the logs,Then I add this into the build/static/css/main.59121a6e.chunk.css for temporary.
.modal-body p {
word-break: break-word;
}
maybe should have the fucntion for tail the logs, or check the days of logs we set
wish the project more and more active
Programs that are "EXITED" or "FAILED" only have the readlog button option, but no start button. It would be great if these programs could be (re)started through the gui by providing a start button (I know supervisor doesn't consider this a restart since the program is already stopped).
If the behavior of "STOPPED" programs (which has a start button and a gray-ed out stop button) could be applied to these other states, then the problem would be solved.
Hi
My cesi server can’t start,I don’t know why.
When I run python web.py,there is an error occurred.
Help me!!!
[node:<node_name>]
;username =
;password =
host = <10.13.2.49>
port = <9001>
[node:<node_name2>]
;username =
;password =
;host =
;port =
;[environment:<environment_name>]
;members = <node_name>, <node_name2>
[cesi]
database = </root/cesi/cesi/userinfo.db>
activity_log = </root/cesi/cesi/access.log>
host = <127.0.0.1>
Hi,
I am quite new in azure and facing issue in my deployed web app written in flask.
I have built a solution using flask where, user can send mail to my company mail box. The main code written on application.py is below
from flask import Flask, render_template
from flask_mail import Mail, Message
app = Flask(name)
app.config.update(
DEBUG=True,
MAIL_SERVER='My Company SMTP MAIL SERVER',
MAIL_PORT=My Company SMTP PORT NUMBER,
# MAIL_USE_SSL=True,
MAIL_USERNAME='[email protected]',
)
mail = Mail(app)
@app.route('/')
def mailSend():
try:
msg = Message("Send Mail Tutorial!",
sender="[email protected]",
recipients=["[email protected]"])
msg.html = render_template('linkPage.html')
mail.send(msg)
return 'Mail sent!'
except Exception as e:
print(type(e))
print(e)
return 'error'
The sender mail address is shared mail and does not need password to send any mail. I already tested the solution on my pycharm IDE and worked totally fine without any issue. However, its throwing error on azure app service after deploying over there. Its saying gaierror'> [Errno -5] No address associated with hostname
Any suggestion on this please let me know.
FYI, I didnt mention my company SMTP server name and port number for data sensitivity
Few improvements/suggestions
I have inherited the following setup:
...
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix://%(ENV_HOME)s/supervisord.sock
...
Could this work also via a unix socket?
API: /api/v2/nodes/jumpserver/processes/cesi:cesi/log/
Request Method: GET
Status Code: 500 INTERNAL SERVER ERROR
There are a few oddities in the behavior of the node-wide start/stop/restart options (not sure what to call them, the ones at the upper-left of a node that work for the checked services):
Nodes section has no scrollbar when you have a lot of nodes and not enough resolution. Most probably same thing for Environment and Groups section.
sqlite3 ~/cesi/userinfo.sql < userinfo.sql
Error: near line 1: file is encrypted or is not a database
Error: near line 2: file is encrypted or is not a database
Error: near line 3: file is encrypted or is not a database
i can not do ip what i wrong ???
Thanks for help
I use second method to install cesi,but when I use systemctl command to start cesi,it remind me that python3 file not exist, 'cesi.service: Changing to the requested working directory failed: No such file or directory,cesi.service: Failed at step CHDIR spawning /opt/cesi/venv/bin/python3: No such file or directory',My system is Manjaro.
root@Soc:/home/lizx/cesi# vi /etc/cesi.conf
[node:220]
username = soc_web
password = XXXX
host = 10.1.101.220
port = 9001
[node:<node_name2>]
;username =
;password =
;host =
;port =
[environment:soc_web]
members = 220
[cesi]
database =/home/lizx/cesi/userinfo.db
activity_log =/home/lizx/cesi/cesi_activity.log
host = 0.0.0.0
root@Soc:/home/lizx/cesi# python cesi/web.py
Traceback (most recent call last):
File "cesi/web.py", line 27, in
@app.teardown_appcontext
AttributeError: 'Flask' object has no attribute 'teardown_appcontext'
How would I go about customizing the interface? For instance change the top left "Cesi version_here" on the dashboard.
the error stack log:
File "/usr/share/pyshared/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/usr/share/pyshared/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/share/pyshared/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/share/pyshared/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/share/pyshared/flask/app.py", line 1478, in full_dispatch_request
response = self.make_response(rv)
File "/usr/share/pyshared/flask/app.py", line 1566, in make_response
raise ValueError('View function did not return a response')
ValueError: View function did not return a response
https://github.com/GulsahKose/cesi/blob/master/web.py#L39 when there is a try, better to add an except block also.
Is there anyway to disable or bypass authentication?
version 2.7.1
description: "pid 146470, uptime 2 days, 21:42:59"
exitstatus: 0
group: "cesi"
logfile: "/tmp/cesi-stdout---supervisor-eu2kXd.log"
name: "cesi"
now: 1606985061
now_hr: "16:44:21"
pid: 146470
spawnerr: ""
start: 1606734082
start_hr: "19:01:22"
state: 20
statename: "RUNNING"
stderr_logfile: "/tmp/cesi-stderr---supervisor-cNkfed.log"
stdout_logfile: "/tmp/cesi-stdout---supervisor-eu2kXd.log"
stop: 0
stop_hr: "08:00:00"
uptime: "2"
Is there any support for supervisord without username, password (open server) ?
it is needed in my case.
the docker url is 404
Hi,my supervisor nodes' password is 'Ebupt#2016',when I run ,CeSi tell me an error "Node: 'my-test', Error: 'nonnumeric port: 'Ebupt'".why port?it is password.
Hi,
When i do a grouped config in supervisord,and i can't do any thing in the browers with that group's member, the background log file show:
<Fault 10: 'BAD_NAME: test1'>
/api/v2/nodes/api/processes/test1/stop/
i think it shoud be groupname:test1 ?
thank you!
typo
win7 本地怎么部署呢 我是高java开发的
Importing flask from python console and when it's being run brings this attribute error:
Traceback (most recent call last):
File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 29, in start(fakepyfile,mainpyfile) File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 28, in start exec(open(mainpyfile).read(), main.dict) File "", line 6, in File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/init.py", line 21, in from .app import Flask, Request, Response File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/app.py", line 25, in from . import cli, json File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/json/init.py", line 21, in from itsdangerous import json as _json File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/itsdangerous.py", line 38, in import simplejson as json
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/init.py", line 115, in
from .encoder import JSONEncoder, JSONEncoderForHTML
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/encoder.py", line 15, in
c_encode_basestring_ascii, c_make_encoder = _import_speedups()
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/encoder.py", line 12, in _import_speedups
return _speedups.encode_basestring_ascii, _speedups.make_encoder
AttributeError: module 'markupsafe._speedups' has no attribute 'encode_basestring_ascii'
[Program finished]
Login to CESI with the default account for the first time. After restarting CESI, you will be prompted with "invalid user name or password". Even if you change the password, it will be invalid. The following is the background error, can you help to see what the problem.
File "/data/Python3.6/lib/python3.6/site-packages/Flask-0.12.1-py3.6.egg/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/data/Python3.6/lib/python3.6/site-packages/Flask-0.12.1-py3.6.egg/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "/data/cesi/cesi/api/v2/auth.py", line 35, in login
result = User.verify(user_credentials["username"], user_credentials["password"])
File "/data/cesi/cesi/models.py", line 37, in verify
user = User.query.filter_by(username=username).first()
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3397, in first
ret = list(self[0:1])
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3171, in getitem
return list(res)
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3503, in iter
return self._execute_and_instances(context)
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3525, in _execute_and_instances
querycontext, self._connection_from_session, close_with_result=True
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3540, in _get_bind_args
mapper=self._bind_mapper(), clause=querycontext.statement, **kw
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3518, in _connection_from_session
conn = self.session.connection(**kw)
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 1141, in connection
execution_options=execution_options,
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 1147, in _connection_for_bind
engine, execution_options
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 409, in _connection_for_bind
self._assert_active()
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 296, in _assert_active
code="7s2a",
sqlalchemy.exc.InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (sqlite3.IntegrityError) column username is not unique
[SQL: INSERT INTO users (username, password, usertype) VALUES (?, ?, ?)]
[parameters: ('admin', 'pbkdf2:sha256:50000$AuTMhJVb$32b7ed7be7ca0344bf6984e194e35d418ef1ca818fec5d6ab83372dae98eb4e4', 0)]
(Background on this error at: http://sqlalche.me/e/13/gkpj) (Background on this error at: http://sqlalche.me/e/13/7s2a)
10.208.1.13 - - [14/Aug/2020 05:53:04] "POST /api/v2/auth/login/ HTTP/1.1" 500
Thx~
Hello everyone here,
I had two nodes connected with cesi, one of them disconnected from the network yesterday,
but after the connection issue is fixed (ping, ssh are fine, and the website of supervisord is alive too), cesi never connect with the node again, even after I restart cesi process.
Any idea about how to solve it?
Thank you!
a question how to change the default port not use 5000?
in my env not can't use port 5000,how to change the port to other as 8080 80 .
i don't find where to change it .
how can change it ,thanks so much.
Hi,
I was wondering why my processes seemed to only running for some hours. The uptime in the gui does only show hours, minutes and seconds event though the days are included in the json response.
https://github.com/GulsahKose/cesi/blob/master/web.py#L59 seems ugly to me. Do you think about using SqlAlchemy or some abstraction to skip writing sql queries?
Does it support webroot subfolder?
how can use cesi to start or stop processes on many machines ones?
I name a subprocess of one supervisor node such as aaa_server.bin. And when I click its 'read log' button, no response, but when I change its name to aaa_server(without '.bin'), I can its button has response.
I find that the subprocess name can not contain ".", otherwise its readlog function can not be accessed.
errror log
[2019-05-24 11:15:03,387] ERROR in app: Exception on /api/v2/auth/login/ [POST]
Traceback (most recent call last):
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/util/_collections.py", line 1010, in __call__
return self.registry[key]
KeyError: 140072201742080
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 338, in dbapi
from pysqlite2 import dbapi2 as sqlite
ModuleNotFoundError: No module named 'pysqlite2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/cesi/cesi/api/v2/auth.py", line 35, in login
result = User.verify(user_credentials["username"], user_credentials["password"])
File "/usr/local/cesi/cesi/models.py", line 37, in verify
user = User.query.filter_by(username=username).first()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 514, in __get__
return type.query_class(mapper, session=self.sa.session())
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/orm/scoping.py", line 78, in __call__
return self.registry()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/util/_collections.py", line 1012, in __call__
return self.registry.setdefault(key, self.createfunc())
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 3206, in __call__
return self.class_(**local_kw)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 143, in __init__
bind = options.pop('bind', None) or db.engine
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 877, in engine
return self.get_engine()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 896, in get_engine
return connector.get_engine()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 559, in get_engine
self._engine = rv = sqlalchemy.create_engine(info, **options)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/engine/__init__.py", line 435, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 343, in dbapi
raise e
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 341, in dbapi
from sqlite3 import dbapi2 as sqlite # try 2.5+ stdlib name.
File "/usr/local/Python3.6/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/Python3.6/lib/python3.6/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
60.12.216.130 - - [24/May/2019 11:15:03] "POST /api/v2/auth/login/ HTTP/1.1" 500 -
[2019-05-24 11:15:05,009] ERROR in app: Exception on /api/v2/auth/login/ [POST]
Traceback (most recent call last):
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/util/_collections.py", line 1010, in __call__
return self.registry[key]
KeyError: 140072201742080
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 338, in dbapi
from pysqlite2 import dbapi2 as sqlite
ModuleNotFoundError: No module named 'pysqlite2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/cesi/cesi/api/v2/auth.py", line 35, in login
result = User.verify(user_credentials["username"], user_credentials["password"])
File "/usr/local/cesi/cesi/models.py", line 37, in verify
user = User.query.filter_by(username=username).first()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 514, in __get__
return type.query_class(mapper, session=self.sa.session())
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/orm/scoping.py", line 78, in __call__
return self.registry()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/util/_collections.py", line 1012, in __call__
return self.registry.setdefault(key, self.createfunc())
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 3206, in __call__
return self.class_(**local_kw)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 143, in __init__
bind = options.pop('bind', None) or db.engine
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 877, in engine
return self.get_engine()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 896, in get_engine
return connector.get_engine()
File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 559, in get_engine
self._engine = rv = sqlalchemy.create_engine(info, **options)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/engine/__init__.py", line 435, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 343, in dbapi
raise e
File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 341, in dbapi
from sqlite3 import dbapi2 as sqlite # try 2.5+ stdlib name.
File "/usr/local/Python3.6/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/Python3.6/lib/python3.6/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
60.12.216.130 - - [24/May/2019 11:15:05] "POST /api/v2/auth/login/ HTTP/1.1" 500 -
I can't login with admin:admin while first run it, it raise an exception:
(sqlite3.IntegrityError) UNIQUE constraint failed: users.username [SQL: 'INSERT INTO users (username, password, usertype) VALUES (?, ?, ?)'] [parameters: ('admin', 'pbkdf2:sha256:50000$bO2jbFQ4$6df2181d675615bd2fc4fcb9e61fd24a77765317067a1af028447f8ea4d673a0', 0)] (Background on this error at: http://sqlalche.me/e/gkpj)
however, it works until I am deleting the record of username=admin
in users table.
If the process number is large, the Uptime will display error
example:
file: cesi/cesi/static/custom.js
description: "pid 199917, uptime 0:47:11"
var $uptime = result['process_info'][$counter]['description'].substring(17,24);
$uptime == "e 0:47:"
Solution:
var $uptime = result['process_info'][$counter]['description'].split(", uptime")[1];
thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.