trigger.io toolkit reload tab fails to load - reload

The reload tab has been failing to load since at least sometime last night (12+ hours). I've tried the "Clean app" option, but otherwise I'm not sure what to do. Here's the error that eventually comes back to the top of the screen:
Error in remote call to reload.verify_config: GET to reload/buildevents/ce8b0e4afeac11e1bdde12313d1adcbe failed: <Response [504]> Details Close
Traceback (most recent call last):
File "C:\Users\bholub\AppData\Local\Trigger Toolkit\build-tools\forge\async.py", line 96, in run
result = self._target(*self._args, **self._kwargs) File "C:\Users\bholub\AppData\Local\Trigger Toolkit\trigger\api\reload.py", line 81, in verify_config
buildevents = forge_tool.singleton.remote.buildevents(path)['buildevents'] File "C:\Users\bholub\AppData\Local\Trigger Toolkit\build-tools\forge\remote.py", line 627, in buildevents
resp = self._api_get(url) File "C:\Users\bholub\AppData\Local\Trigger Toolkit\build-tools\forge\remote.py", line 223, in _api_get
_check_api_response_for_error(url, 'GET', resp) File "C:\Users\bholub\AppData\Local\Trigger Toolkit\build-tools\forge\remote.py", line 94, in
_check_api_response_for_error
raise RequestError(resp, msg) RequestError: GET to reload/buildevents/ce8b0e4afeac11e1bdde12313d1adcbe failed: <Response [504]>

This was caused by some un-optimised app server code on the Trigger.io side: your particular usage was especially awkward for our code hence the 504s.
I pushed a fix for it yesterday: everyone should see a snappier Reload tab now!

Related

GraqlSemanticException-label 'database' not found. Please check server logs for the stack trace

So I was trying to get Biograkn usecase for BLAST working , following the steps as per this video series. I was able to load the schema , but after that we need to execute python migrate.py to load data into it. I executed the command and i am getting the following error traceback
Traceback (most recent call last):
File "/home/aditya/anaconda3/envs/RD/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 161, in send
response = next(self._response_iterator)
File "/home/aditya/anaconda3/envs/RD/lib/python3.7/site-packages/grpc/_channel.py", line 364, in __next__
return self._next()
File "/home/aditya/anaconda3/envs/RD/lib/python3.7/site-packages/grpc/_channel.py", line 358, in _next
raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "GraqlSemanticException-label 'database' not found. Please check server logs for the stack trace."
debug_error_string = "{"created":"#1582269484.666990683","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1017,"grpc_message":"GraqlSemanticException-label 'database' not found. Please check server logs for the stack trace.","grpc_status":3}"
>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "migrate.py", line 92, in <module>
init(data_path="uniprot-asthma-proteins.fasta")
File "migrate.py", line 23, in init
session, q_get_database, q_insert_database, "$db"
File "/home/aditya/Projects/RD/biograkn/blast/util.py", line 14, in insert_if_non_existent
found_list = list(read_transaction.query(get_query))
File "/home/aditya/anaconda3/envs/RD/lib/python3.7/site-packages/grakn/client.py", line 131, in query
return self._tx_service.query(query, infer)
File "/home/aditya/anaconda3/envs/RD/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 49, in query
response = self._communicator.send(request)
File "/home/aditya/anaconda3/envs/RD/lib/python3.7/site-packages/grakn/service/Session/TransactionService.py", line 165, in send
raise GraknError("Server/network error: {0}\n\n generated from request: {1}".format(e, request))
grakn.exception.GraknError.GraknError: Server/network error: <_Rendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "GraqlSemanticException-label 'database' not found. Please check server logs for the stack trace."
debug_error_string = "{"created":"#1582269484.666990683","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1017,"grpc_message":"GraqlSemanticException-label 'database' not found. Please check server logs for the stack trace.","grpc_status":3}"
>
generated from request: query_req {
query: "match $db isa database, has name \"uniprot\"; get $db;"
}
now this is not understandable why loading is not possible. Hence requesting for assistance.
There appears to already be a problem with the schema, since graql is trying to look for the label "database" but cannot find it.
You can check your schema using workbase:
1. connect to your local server (localhost:48555)
2. select your keyspace ("proteins")
3. click on the hierarchy symbol on the top left next to the grakn logo
If the schema is present, it will be visualized automatically.

AZURE Cognitive Serivces -> KeyError: 'Endpoint'

I am using the SDK (Python) for Computer Vision published in Mocrosoft Docs (https://learn.microsoft.com/es-es/azure/cognitive-services/computer-vision/quickstarts-sdk/python-sdk).
When I run the code, this error occurs:
Traceback (most recent call last):
File "c:/analyze_image_local.py", line 68, in <module>
description_result = computervision_client.describe_image_in_stream(local_image)
File "C:\Anaconda3\lib\site-packages\azure\cognitiveservices\vision\computervision\operations\_computer_vision_client_operations.py", line 1202, in describe_image_in_stream
request = self._client.post(url, query_parameters, header_parameters, body_content)
File "C:\Anaconda3\lib\site-packages\msrest\service_client.py", line 193, in post
request = self._request('POST', url, params, headers, content, form_content)
File "C:\Anaconda3\lib\site-packages\msrest\service_client.py", line 108, in _request
request = ClientRequest(method, self.format_url(url))
File "C:\Anaconda3\lib\site-packages\msrest\service_client.py", line 155, in format_url
base = self.config.base_url.format(**kwargs).rstrip('/')
KeyError: 'Endpoint'
I rather used the REST API method (https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts/python-disk)
However, it can be useful to complete the endpoint using this command line:
analyze_url = endpoint + "vision/v2.1/analyze"
Simply run the following command to reinstall customvision SDK worked for me.
pip uninstall azure-cognitiveservices-vision-customvision
pip install azure-cognitiveservices-vision-customvision

AttributeError: module 'select' has no attribute 'poll'

I'm running eventlet.monkey_patch() while trying to spin up a flask server which uses flask-socketio. This is the traceback:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/alhasan/MeetupPoint/venv/lib/python3.6/site-packages/werkzeug/serving.py", line 777, in inner
srv.serve_forever()
File "/home/alhasan/MeetupPoint/venv/lib/python3.6/site-packages/werkzeug/serving.py", line 612, in serve_forever
HTTPServer.serve_forever(self)
File "/usr/lib64/python3.6/socketserver.py", line 232, in serve_forever
with _ServerSelector() as selector:
File "/usr/lib64/python3.6/selectors.py", line 348, in __init__
self._poll = select.poll()
AttributeError: module 'select' has no attribute 'poll'
I tried using monkey_patch, as previously I encountered the following error:
RuntimeError: You need to use the eventlet server. See the Deployment section of the documentation for more information.
I have eventlet installed.
...
eventlet==0.23.0
Flask==0.12.2
Flask-Migrate==2.1.1
Flask-Script==2.0.6
Flask-SocketIO==3.0.1
...
Is there a fix for this?
My initial problem was that my server returns bad requests everytime I try to emit a message from the client. But, the other way works. Would really appreciate any kind of a solution. :)

Apache Airflow - Was Working Fine Now Says Log File Isn't Local Error & Exceptions are Popping Up

So it looks like my install of apache airflow on a Google Compute Engine instance broke down. Everything was working great and then two days ago all the DAG runs show up stuck in a running state. I am using LocalExecutioner.
When I try to look at the log I get this error:
* Log file isn't local.
* Fetching here: http://:8793/log/collector/aa_main_combined_collector/2017-12-15T09:00:00
*** Failed to fetch log file from worker.
I didn't touch a setting anywhere. I looked through all the config files and I scanned the logs and I see this error
[2017-12-16 20:08:42,558] {jobs.py:355} DagFileProcessor0 ERROR - Got an exception! Propagating...
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/airflow/jobs.py", line 347, in helper
pickle_dags)
File "/usr/local/lib/python3.4/dist-packages/airflow/utils/db.py", line 53, in wrapper
result = func(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/airflow/jobs.py", line 1584, in process_file
self._process_dags(dagbag, dags, ti_keys_to_schedule)
File "/usr/local/lib/python3.4/dist-packages/airflow/jobs.py", line 1173, in _process_dags
dag_run = self.create_dag_run(dag)
File "/usr/local/lib/python3.4/dist-packages/airflow/utils/db.py", line 53, in wrapper
result = func(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/airflow/jobs.py", line 763, in create_dag_run
last_scheduled_run = qry.scalar()
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/orm/query.py", line 2843, in scalar
ret = self.one()
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/orm/query.py", line 2814, in one
ret = self.one_or_none()
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/orm/query.py", line 2784, in one_or_none
ret = list(self)
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/orm/query.py", line 2855, in iter
return self._execute_and_instances(context)
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/orm/query.py", line 2878, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 945, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
context)
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 1405, in _handle_dbapi_exception
util.reraise(*exc_info)
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/util/compat.py", line 187, in reraise
raise value
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
context)
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/default.py", line 470, in do_execute
cursor.execute(statement, parameters)
File "/usr/local/lib/python3.4/dist-packages/airflow/bin/cli.py", line 69, in sigint_handler
sys.exit(0)
SystemExit: 0
Any thoughts out there?
I solved this problem though in doing so I discovered another problem.
Long and short of it as soon as I manually started the scheduler, everything worked again. It appears the problem was that the scheduler did not get restarted correctly after a system reboot.
I have scheduler running through SystemD. The Webserver .service works fine. However I do notice that the scheduler .service continually restarts. It appears there is an issue there I need to resolve. This part of it is solved for now.
Look at the log URL, verify if it ends with a date with special characters +:
&execution_date=2018-02-23T08:00:00+00:00
This was fixed here.
You can replace the + for -, or replace all special characters, in my case:
&execution_date=2018-02-23T08%3A00%3A00%2B00%3A00
This happens here.
The FileTaskHandler can not load the log from local disk, and try to load from worker.
Another thing that could be causing this error is the exclusion of the airflow/logs folder or the sub folders inside it.

Error handling request with gunicorn and nginx

I am getting "Error handling request" and I can't really trace this down to a particular problem?
I am using gunicorn+nginx and my gunicorn setup is
gunicorn run:app -w 4 -b 0.0.0.0:8080 --workers=1 --timeout=300
here is the error message
2015-10-14 21:27:11,287 DEBG 'myserver' stderr output:
[2015-10-14 21:27:11 +0000] [26725] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 130, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 171, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1478, in full_dispatch_request
response = self.make_response(rv)
File "/usr/local/lib/python2.7/dist-packages/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
can anybody give me a hint how to debug this? I don't have much experience with server usage...
thanks
carl
tl;dr: This isn't an issue with gunicorn or nginx. Your view function in your Flask app is not returning a response. Check the return statement in your view function for whatever route you are accessing when you get this error.
Beginning at the Line
Traceback (most recent call last):
You can see the stack trace produced by the python interpreter. The stack trace shows the sequence of nested functions leading up to the point where your code failed. In my limited experience, the python interpreter stack trace has reliably directed me to the fault in my code.
In your case here, the final line:
ValueError: View function did not return a response
provides some more detail about the error and should give you pretty good idea of what went wrong (Your view function didn't return a response).
The next line up from the bottom will show you the function that triggered the error, and its exact location in your code:
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1566, in make_response
raise ValueError('View function did not return a response')
In this case the error is raised by a function in the flask source, so unless you edited that, that is probably not where you need to make a fix. Based on the specific ValueError at the end of the trace, I'd go straight to my views function. In Flask that probably looks something like this (example from Flask tutorial):
#app.route('/')
def show_entries():
cur = g.db.execute('select title, text from entries order by id desc')
entries = [dict(title=row[0], text=row[1]) for row in cur.fetchall()]
return render_template('show_entries.html', entries=entries)
That last line seems like a good place to start in your case, since the error says nothing is being returned.

Resources