Closed red0bear closed 4 years ago
Need more info on that. Can you paste the complete error ?
How could do that ? Do you have a command line please ?
127.0.0.1 - - [30/Oct/2018 14:41:32] "GET / HTTP/1.1" 500 - Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/flask/app.py", line 2309, in call return self.wsgi_app(environ, start_response) File "/usr/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/usr/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/usr/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/usr/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "/usr/lib/python3.6/site-packages/flask_login/utils.py", line 261, in decorated_view return func(*args, **kwargs) File "antminer-monitor/antminermonitor/blueprints/asicminer/views/antminer.py", line 105, in miners worker = active_pool[0]['User']
builtins.KeyError
KeyError: 'POOLS' Traceback (most recent call last)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/lib/python3.6/site-packages/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "antminer-monitor/antminermonitor/blueprints/asicminer/views/antminer.py", line 102, in miners
pool for pool in miner_pools['POOLS'] #if pool['Stratum Active']
KeyError: 'POOL
Will look into that. I will need to add some exceptions and print some info about the miner like the IP Address so we have an ideawhich machine is causing tbe error
This was closed with #124 Maybe you are running an older version ?
im running the last version i get in git hub. Did you make some update right now ?
No
Well ... so still something wrong then ...
Please try to increase the socket timeout in the lib/pycgminer.py file and let me know if that helped
Ok.
Any feedback ?
@anselal im so sorry ... i didnt get enough time time to see that. i will do soon. Im bit busy.
sock.settimeout(1) ????
No problem,
yes, try to increase it to 2, 3, or 5 seconds
@anselal i put 10 because low time sometimes give some problems.
OK. Let it run for a couple of days and it fixes the error come back and close the issue
HI guys I have same issue it started once I added the last miner somewhere around 50 I did increase the socket as directed above and no change
@fcabrera1109 what version from python are you using ? i faced anothers errors but seem ok right now for me .
Python 2.7.5
@fcabrera1109 can you try python 3.6 ? im doing this on it.
let me try and install
python3.6 manage.py run -h 0.0.0.0 -p 5000 ran this got
File "manage.py", line 3, in
Did you install are requirements ?
I believe so when I run "pip install flask". says all requirements already installed
yes all installed and got this when I try and load page
Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/flask/app.py", line 2309, in call return self.wsgi_app(environ, start_response) File "/usr/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/usr/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/usr/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/usr/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "/usr/lib/python3.6/site-packages/flask_login/utils.py", line 261, in decorated_view return func(*args, **kwargs) File "/var/www/antminer-monitor-master/antminermonitor/blueprints/asicminer/views/antminer.py", line 105, in miners worker = active_pool[0]['User'] IndexError: list index out of range
hummmm .... i think some missing lib like me .... when i try install first time ... now you need do a work around to discover whats going on in package.
Do you've many miners? It ws working fine until the last one I added and broke page
in antminer.py make a change
pool for pool in miner_pools['POOLS'] if pool['Stratum Active']
to @pool for pool in miner_pools['POOLS'] #if pool['Stratum Active']
and try again .
FYI I started with new DB and working again. I believe it a limitation of DB or code display when to many rows
@red0bear commenting out the if statement will make the software always showing the 1st worker regardless if the miner has switched to the 2nd or 3rd pool
I will start adding again and see when it breaks
My software has no limits !!!! The limit is the sky !!!!
@anselal limits is only money in your pocket to buy a good computer.
Money is irelevant
So it breaks around 40 miners
just started from scratch and broke it at about 40 miners some had errors think its something with layout
@anselal any idea why its breaking at around 40 miners. I think its not the actual active miner pane breaking it but the inactive/error one.
if that she case its 13-14 errors.
that worked!!
fixed it :)
@fcabrera1109 what ? :-)
My software can handle hundreds maybe even thousands of miners.
@fcabrera1109 feedback please
the change anselal had me make worked.
in antminer.py make a change
pool for pool in miner_pools['POOLS'] if pool['Stratum Active']
to @pool for pool in miner_pools['POOLS'] #if pool['Stratum Active']
and try again .
I explained abive why the code is wrong. It will show the wrong pool user if tje miner switches to other than the first.
I will taoe a look at it.
@fcabrera1109 what models are your miners ?
Well new error today when I don't have an entry in first pool for the miner
TypeError: Object of type 'bytes' is not JSON serializable
File "/usr/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/var/www/antminer-monitor-master/antminermonitor/blueprints/user/views.py", line 16, in login
form = LoginForm()
File "/usr/lib/python3.6/site-packages/wtforms/form.py", line 212, in __call__
return type.__call__(cls, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/flask_wtf/form.py", line 88, in __init__
super(FlaskForm, self).__init__(formdata=formdata, **kwargs)
File "/usr/lib/python3.6/site-packages/wtforms/form.py", line 278, in __init__
self.process(formdata, obj, data=data, **kwargs)
File "/usr/lib/python3.6/site-packages/wtforms/form.py", line 132, in process
field.process(formdata)
File "/usr/lib/python3.6/site-packages/wtforms/csrf/core.py", line 43, in process
self.current_token = self.csrf_impl.generate_csrf_token(self)
File "/usr/lib/python3.6/site-packages/flask_wtf/csrf.py", line 134, in generate_csrf_token
token_key=self.meta.csrf_field_name
File "/usr/lib/python3.6/site-packages/flask_wtf/csrf.py", line 47, in generate_csrf
setattr(g, field_name, s.dumps(session[field_name]))
File "/usr/lib/python3.6/site-packages/itsdangerous/serializer.py", line 166, in dumps
payload = want_bytes(self.dump_payload(obj))
File "/usr/lib/python3.6/site-packages/itsdangerous/url_safe.py", line 42, in dump_payload
json = super(URLSafeSerializerMixin, self).dump_payload(obj)
File "/usr/lib/python3.6/site-packages/itsdangerous/serializer.py", line 133, in dump_payload
return want_bytes(self.serializer.dumps(obj, **self.serializer_kwargs))
File "/usr/lib/python3.6/site-packages/itsdangerous/_json.py", line 18, in dumps
return json.dumps(obj, **kwargs)
File "/usr/lib64/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'bytes' is not JSON serializable
I think that the issue because I deleted the first entry for each miner to have them mine on second entry
This is why you need the if statement you deleted.
If I remove the # and unremarkable it it still gives same error,
@fcabrera1109 @anselal well ... here i just make that and i still get errors. But at least it recover from error. I see more a problem with exceptions.
Well i got error now ....
builtins.IndexError IndexError: list index out of range