Comments (511)
Also think about it. In future releases I will do most likely.
Did you get started? If so, please describe after some tests what you liked and what is not. Maybe something is not convenient or intuitively not clear?
from roxy-wi.
Who owner cgi-bin folder? Must be apache or under what user is the service running
from roxy-wi.
its a default httpd install on centos and the folder is owned by root.
from roxy-wi.
Alos a suggestion, can you please have it available on MySQL instead of sqlite as that will ensure high availability of data stored in DB in case of the primary Hardware/Vm failure where the haproxy-wi is running
from roxy-wi.
change to apache user. Try like this:
chown -R apache:apache cgi-bin/
from roxy-wi.
okay sure, i will try that as well, if its succesful i would create a auto installer which will take care of all these steps and would submit to the repo. add it incase you like it.
from roxy-wi.
ok, thank you)
from roxy-wi.
[Mon Apr 23 17:24:18.776057 2018] [cgi:error] [pid 1269] [client 172.16.10.20:55387] AH01215: File "/var/www/haproxy-wi/cgi-bin/ovw.py", line 71, in get_overview, referer:
cgi-bin/overview.py
[Mon Apr 23 17:24:18.776070 2018] [cgi:error] [pid 1269] [client 172.16.10.20:55387] AH01215: listhap = sql.get_dick_permit(), referer: /cgi-bin/overview.py
[Mon Apr 23 17:24:18.776095 2018] [cgi:error] [pid 1269] [client 172.16.10.20:55387] AH01215: File "/var/www/haproxy-wi/cgi-bin/sql.py", line 259, in get_dick_permit, referer:
cgi-bin/overview.py
[Mon Apr 23 17:24:18.776119 2018] [cgi:error] [pid 1269] [client 172.16.10.20:55387] AH01215: sql = """ select * from user where username = '%s' """ % login.value, referer:
/overview.py
[Mon Apr 23 17:24:18.776139 2018] [cgi:error] [pid 1269] [client 172.16.10.20:55387] AH01215: AttributeError: 'NoneType' object has no attribute 'value', referer: /cgi-bin/overview.py
[Mon Apr 23 17:24:41.173343 2018] [cgi:error] [pid 1253] [client 172.16.10.20:55405] AH01215: Traceback (most recent call last):, referer: /cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:24:41.173519 2018] [cgi:error] [pid 1253] [client 172.16.10.20:55405] AH01215: File "/var/www/haproxy-wi/cgi-bin/login.py", line 53, in , referer: http://haprocy-wi.allsafe.tech/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:24:41.173538 2018] [cgi:error] [pid 1253] [client 172.16.10.20:55405] AH01215: for users in USERS:\t, referer: /cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:24:41.173562 2018] [cgi:error] [pid 1253] [client 172.16.10.20:55405] AH01215: TypeError: 'NoneType' object is not iterable, referer:
/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:24:41.219242 2018] [cgi:error] [pid 1253] [client 172.16.10.20:55405] Premature end of script headers: login.py, referer: /cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:25:10.600969 2018] [cgi:error] [pid 1255] [client 172.16.10.20:55412] AH01215: Traceback (most recent call last):, referer: /cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:25:10.601122 2018] [cgi:error] [pid 1255] [client 172.16.10.20:55412] AH01215: File "/var/www/haproxy-wi/cgi-bin/login.py", line 53, in , referer: http://haprocy-wi.allsafe.tech/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:25:10.601161 2018] [cgi:error] [pid 1255] [client 172.16.10.20:55412] AH01215: for users in USERS:\t, referer: cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:25:10.601187 2018] [cgi:error] [pid 1255] [client 172.16.10.20:55412] AH01215: TypeError: 'NoneType' object is not iterable, referer: /cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 17:25:10.647880 2018] [cgi:error] [pid 1255] [client 172.16.10.20:55412] Premature end of script headers: login.py, referer: /cgi-bin/login.py?ref=/cgi-bin/overview.py
from roxy-wi.
It error after login? First login you had notice about creating DB?
from roxy-wi.
its not giving me a login, its showing a signup page to me, once i enter admin/admin there is a 500 error with this in error log
from roxy-wi.
the database was created correctly? have all updates been completed?
from roxy-wi.
i didnt notice that
from roxy-wi.
Try clear coockies files in your broweser, and at first time on login page must be notice about DB creating.
from roxy-wi.
from roxy-wi.
no luck, same issue
from roxy-wi.
You download latest distr? I'm today update
from roxy-wi.
and check db file in cgi-bin, if exist, remove
from roxy-wi.
i removed all files and tried putting it again. its not creating the db and the same error persists
from roxy-wi.
can you send a listing of these files login.py and create_db.py?
from roxy-wi.
root@localhost cgi-bin]# !tail
tail -f /var/log/httpd/haproxy-wi.error.log
[Mon Apr 23 18:15:57.197803 2018] [cgi:error] [pid 3368] [client 172.16.10.20:56463] AH01215: Traceback (most recent call last):, referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:15:57.197928 2018] [cgi:error] [pid 3368] [client 172.16.10.20:56463] AH01215: File "/var/www/haproxy-wi/cgi-bin/login.py", line 53, in , referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:15:57.197939 2018] [cgi:error] [pid 3368] [client 172.16.10.20:56463] AH01215: for users in USERS:\t, referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:15:57.197955 2018] [cgi:error] [pid 3368] [client 172.16.10.20:56463] AH01215: TypeError: 'NoneType' object is not iterable, referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:15:57.234178 2018] [cgi:error] [pid 3368] [client 172.16.10.20:56463] Premature end of script headers: login.py, referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:16:02.918773 2018] [cgi:error] [pid 3291] [client 172.16.10.20:56467] AH01215: Traceback (most recent call last):
[Mon Apr 23 18:16:02.918887 2018] [cgi:error] [pid 3291] [client 172.16.10.20:56467] AH01215: File "/var/www/haproxy-wi/cgi-bin/login.py", line 53, in
[Mon Apr 23 18:16:02.918899 2018] [cgi:error] [pid 3291] [client 172.16.10.20:56467] AH01215: for users in USERS:\t
[Mon Apr 23 18:16:02.918914 2018] [cgi:error] [pid 3291] [client 172.16.10.20:56467] AH01215: TypeError: 'NoneType' object is not iterable
[Mon Apr 23 18:16:02.954573 2018] [cgi:error] [pid 3291] [client 172.16.10.20:56467] Premature end of script headers: login.py
from roxy-wi.
Problem becase db not created, I want undestand why. And need files, where db creating.
And you dowload latest repos? today were update
from roxy-wi.
will try that
from roxy-wi.
i did that just now, no luck
from roxy-wi.
tail -f /var/log/httpd/haproxy-wi.error.log
[Mon Apr 23 18:24:42.543940 2018] [cgi:error] [pid 3294] [client 172.16.10.20:56605] AH01215: File "/var/www/haproxy-wi/cgi-bin/ovw.py", line 71, in get_overview, referer: http://172.16.0.254/cgi-bin/overview.py
[Mon Apr 23 18:24:42.543954 2018] [cgi:error] [pid 3294] [client 172.16.10.20:56605] AH01215: listhap = sql.get_dick_permit(), referer: http://172.16.0.254/cgi-bin/overview.py
[Mon Apr 23 18:24:42.543978 2018] [cgi:error] [pid 3294] [client 172.16.10.20:56605] AH01215: File "/var/www/haproxy-wi/cgi-bin/sql.py", line 259, in get_dick_permit, referer: http://172.16.0.254/cgi-bin/overview.py
[Mon Apr 23 18:24:42.544003 2018] [cgi:error] [pid 3294] [client 172.16.10.20:56605] AH01215: sql = """ select * from user where username = '%s' """ % login.value, referer: http://172.16.0.254/cgi-bin/overview.py
[Mon Apr 23 18:24:42.544024 2018] [cgi:error] [pid 3294] [client 172.16.10.20:56605] AH01215: AttributeError: 'NoneType' object has no attribute 'value', referer: http://172.16.0.254/cgi-bin/overview.py
[Mon Apr 23 18:25:03.835595 2018] [cgi:error] [pid 3292] [client 172.16.10.20:56618] AH01215: Traceback (most recent call last):, referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:25:03.835723 2018] [cgi:error] [pid 3292] [client 172.16.10.20:56618] AH01215: File "/var/www/haproxy-wi/cgi-bin/login.py", line 53, in , referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:25:03.835739 2018] [cgi:error] [pid 3292] [client 172.16.10.20:56618] AH01215: for users in USERS:\t, referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:25:03.835756 2018] [cgi:error] [pid 3292] [client 172.16.10.20:56618] AH01215: TypeError: 'NoneType' object is not iterable, referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
[Mon Apr 23 18:25:03.871551 2018] [cgi:error] [pid 3292] [client 172.16.10.20:56618] Premature end of script headers: login.py, referer: http://172.16.0.254/cgi-bin/login.py?ref=/cgi-bin/overview.py
from roxy-wi.
Please send me listing files: login.py and create_db.py
from roxy-wi.
from roxy-wi.
Or try create db manuly - run create_db.py from cgi-bin
from roxy-wi.
i did that too. i can see the db file exists
from roxy-wi.
from roxy-wi.
and its creating a db with nothing in it
from roxy-wi.
Before creating remove empty file?
from roxy-wi.
deleting the db and recreating using create_db,py also does not create a DB
from roxy-wi.
yes tried that , the create db py is not creating the db
from roxy-wi.
Ooops... berfore manuly run create_db.py uncomment this strings:
#if check_db():
# create_table()
#else:
# print('DB already exists, try update')
#update_all()
from roxy-wi.
i see those are commented in the file already
from roxy-wi.
ofcourse, now it got created. will try to see if i can login
from roxy-wi.
and i can login now, i will check other stuff and will update you on if any findings.
from roxy-wi.
It's good news ) now would understand why db was not created automatically. May be SELinux?
from roxy-wi.
nope, i thought so, but selinux is diabled
from roxy-wi.
interesting interesting.....
from roxy-wi.
a new one popped up
from roxy-wi.
You use ssh keys? Check access and path to keys
from roxy-wi.
Added Mysql support... want try? )
from roxy-wi.
from roxy-wi.
i dont use ssh keys, i have installed haproxy on the same box where haproxy-ui is running
from roxy-wi.
Haproxy-wi work over ssh, even on localhost. Configure ssh env
Now do new release, few minutes )
from roxy-wi.
okay sure, once you are done, please let me know i will try it and provide feedback
from roxy-wi.
Done! )
from roxy-wi.
okay i will try installing it after finishing dinner :)
from roxy-wi.
Couple of issues that i faced.
- Mysql is used but the database is not created automatically. i had ro rin the create database file to have the database created and it threw few errors. However still app works fine till i tested it.
- Add Listen has all the values, where as add frontend should take the only value of ip and port and it should move to the next tab for adding a front end and then next tab to add backend.
- Stats page is not enabled by default in any haproxy install hence, it would be a good idea to add stats config during install it self.
=========================================================================
listen stats # Define a listen section called "stats"
bind 0.0.0.0:8085 # Listen on localhost:9000
mode http
stats enable # Enable stats page
stats hide-version # Hide HAProxy version
stats realm Haproxy\ Statistics # Title text for popup window
stats uri /haproxy_stats # Stats URI
stats auth admin:password # Authentication credentials
stats uri /stats
ssl file path is not working while providing the file location. There should a way to upload the pem file directly to the server and while creating frontend user should be able to choose the file name and Description.
- Logging is not enabled in Haprocy by default, during install the below content can be added to /etc/rsyslog.d/haproxy.conf in a centos 7 environment
$ModLoad imudp
$UDPServerRun 514
$UDPServerAddress 127.0.0.1
local2.* /var/log/haproxy.log
4.There should a option to list available listen/frontend and backend servers. ( this can be read from the running haproxy config.
5.in the homepage the user login details are visible. that can be hidden.
-
during installer, db details can be collected which later can be written to the config file.
-
The vhost config can also be parsed to apache on a non standard port such as 8080. This is because if the user is running haproxy on the same host, then it will conflict to start haproxy on port 80as a frontend.
i will do more testing and would provide feedback
from roxy-wi.
1 Why? Why?! DB do not creating auto in your env? ((( What errors? and you now work on mysql or sqlite?
2 Hm.. MB, need to think about this
3. About stats and logs. I think about this, but "do not I take too much on myself" to climb into someone else's config? And at what stage is it done? can the user have their own settings ... When writing the program, I proceeded from the considerations that the user is all set up. Also there were thoughts to make the installation of haproxy-wi, here it could be, yes .. I think the best option would be to make a "help" page where all this will be described
4. If I'm right undestend... have you seen "map" page?
5. Users info can see only users with admin role, to other users it's info hidden
6. You meen do installer script?
7. Not quite understood .. The user himself configures vhost
About upload ssl certs, yes, I'm think about this same time ago )
from roxy-wi.
i use centos7 minimal, hence the db is not created automatically, i had to create it manually.
for point 7 i say this apache vhost listen on port 80 which would conflict with http port of haproxy. if you look at other Load balancers or UI available , they always listen on a different port than port 80 or 443
from roxy-wi.
You think db not creating because OS is minimal install?
I myself use port 8000, config is the same for example. But I correct just in case
from roxy-wi.
yes may be, which OS you are testing this on ?
from roxy-wi.
RHEL 7, infrastructur install
from roxy-wi.
hmm maybe this is the case need to look deeper or i will help create an installer script. another idea that i have is to keep track of the changes. something like showing the changes done by users.
from roxy-wi.
Yes, the installation script is probably a good idea, especially if you consider that I do not know how to auto update the database, you can use it for this too)
Do you mean logging in user actions?
from roxy-wi.
yes correct. keeping a record in Db to ensure proper auditing.
from roxy-wi.
Haproxy-wi already have users activity logs. Look in "View logs" at "Admin area"
Abaout record in DB, yes, I think about this, but don't know how to implement this
from roxy-wi.
okay, no problem, what you can do is create a table in the Db called audit and read the logs and insert into the table. the table should have 3 coloums.
- username
- Audit log
- Date and time.
when users click the audit tab they can view it per user or all logs at once. this is going to be a select query.
from roxy-wi.
AAA, you about this DB records, I'm thought you meen update db ))
and those logs that there are not like?
from roxy-wi.
are those logs coming from DB ?
from roxy-wi.
No, from log file
from roxy-wi.
please check if you can put them in DB and fetch from DB
from roxy-wi.
I can. but for what do this? I think the file is more convenient
from roxy-wi.
okay. thats also sounds good.
from roxy-wi.
please let me knwo when youa re done with frontend and backend stuff. iw ill test it.
from roxy-wi.
You meen separete "Add listen" to diff tabs?
from roxy-wi.
ti mean the flow. Add listen then add frontend and add backend.
front end and back end are something that people use too much.
from roxy-wi.
and i am also thinking of HA feature in HAproxy once this is sorted, We can have HA implemented
from roxy-wi.
I did not quite understand about the flow, which prevents me from adding in turn now and how it can affect thee HA?
from roxy-wi.
Ha is a separate concept, we will jkeep it aside as of now. That can be done via vrrp.
the flow of haproxy add listen, add fe and add be is a basic term, in this they are all individual functions. where what i think is a better way to do is to allow them to create everything in a single flow which is more effecient
from roxy-wi.
ok. What do if I want add only fe or be, without listen?
from roxy-wi.
Yes, Listen is the one-time creation in most cases, fe and Be is the one which is created the most
times. so if you look at any Load balancers, they offer a direct way to create your pool whetre you can define which ip it should listen on and what would be the front end and backend for it. but in most cases Listen is almost for 2 ports which is 80 and 443
from roxy-wi.
Seems to understand what you mean. Do you want the Haproxy-wi to propose an address for Listen? If so, then try:
Select the server in the Listenor in the fe or in the be, away from the address, press down. Are you talking about this?
from roxy-wi.
nope. please have a look at thishttps://youtu.be/WOa8QGJFd4c?t=10m12s
from roxy-wi.
https://youtu.be/WOa8QGJFd4c?t=10m12s
from roxy-wi.
it turns out you want, that there was an opportunity to save any options for a listen and then on the basis of them to create a fe?
from roxy-wi.
correct. and also we should enable an option to select an existing BE in case of FE creation
from roxy-wi.
select an existing be of fe creation already exist
Hm.... how to implement the preservation and after the choice listen
from roxy-wi.
yes that correct, i saw that too. i am talking about Editing an existing Fe of be that is in the config and serving traffic. in that case if we enable a way to add or remove servers from BE or FE and do a soft reload to ensure existing traffic does not take a hit
by issuing the following command
systemctl reload haproxy
from roxy-wi.
preservation can be by reading the running haproxy config, which is in a static apth always "/etc/haproxy/haproxy.cfg" this feature is somewhat there as edit config
from roxy-wi.
so basically, while allowing edit fe or be functionality, make a copy of the file, wllow user to edit it, verify and then deploy.
i think this flow is already there in the tool
from roxy-wi.
Eh... yes... I have long wanted to do this, but I can not imagine how this can be realized. Putting the config into the database is not a hunt, and it's difficult.
from roxy-wi.
not in Db but make a copy and edit it
from roxy-wi.
cpu?
from roxy-wi.
i have edited it. i meant was copy
from roxy-wi.
in python it is difficult to work with files, so now you can only edit the entire config. But how to edit it in parts, without entering the database, I do not know
from roxy-wi.
https://stackoverflow.com/questions/43453490/python-script-to-parse-a-config-file
https://docs.python.org/3/library/argparse.html#module-argparse
https://docs.python.org/3/library/string.html#template-strings
from roxy-wi.
What about https://github.com/imjoey/pyhaproxy ?
from roxy-wi.
This also looks good but it will add up more dependencies to this tool. if you can embed this it would work seamlessly
from roxy-wi.
after updating to 2.5 edit feature is failing
from roxy-wi.
what error?
from roxy-wi.
TypeError: 'bool' object is not iterable,
from roxy-wi.
you update DB?
from roxy-wi.
no
from roxy-wi.
try updae run script update_db.py
from roxy-wi.
i did just now, but then the configfile itself not open now
from roxy-wi.
run from cgi-bin folder?
from roxy-wi.
yes ofcourse
from roxy-wi.
Related Issues (20)
- Error - LDAP - Add_user HOT 2
- Can't log in HOT 2
- Fresh manual install cannot login HOT 16
- Remote command execution due to poor parameter filtering HOT 2
- Authenticated SQLi HOT 1
- Установка roxy-wi под Debian 11.6 ошибка авторизации HOT 1
- debian/ubuntu: lorotate config conflict. HOT 2
- Fresh manual install on Centos 7. Admin login fails with no error HOT 2
- i am clinically insane HOT 1
- Letsencrypt pem generation failed HOT 5
- Error on manual install step sudo ./create_db.py HOT 6
- LDAP Authentication HOT 6
- 500 Internal server error CentOS 7 HOT 14
- Letsencrypt with multiple domain in one certificate HOT 5
- ed25519 support HOT 4
- URL rewrite needs updated on HAProxy > Overview > Backends HOT 1
- Managing local server haproxy but SSH login fails HOT 2
- HAProxy log files not rotated HOT 2
- Installed Roxy-wi does not work when accessing web console. HOT 1
- Change language to not use master and slave HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roxy-wi.