The robot logfile shows following:
INFO Executing command '/testcase_xy.py'. DEBUG [chan 28] Max
packet in: 32768 bytes INFO Command exited with return code 0.
INFO: Executing command '/testcase_xy_next.py'. DEBUG [chan 43] Max
packet in: 32768 bytes FAIL EOFError DEBUG Traceback (most recent
call last):
File "/usr/lib/python2.6/site-packages/SSHLibrary/library.py", line
881, in execute_command
stdout, stderr, rc = self.current.execute_command(command)
File "/usr/lib/python2.6/site-packages/SSHLibrary/abstractclient.py",
line 219, in execute_command
self.start_command(command)
File "/usr/lib/python2.6/site-packages/SSHLibrary/abstractclient.py",
line 237, in start_command
self._started_commands.append(self._start_command(command))
File "/usr/lib/python2.6/site-packages/SSHLibrary/pythonclient.py",
line 85, in _start_command
cmd.run_in(new_shell)
File "/usr/lib/python2.6/site-packages/SSHLibrary/abstractclient.py",
line 1055, in run_in
self._execute()
File "/usr/lib/python2.6/site-packages/SSHLibrary/pythonclient.py",
line 201, in _execute
self._shell.exec_command(self._command)
File "/usr/lib/python2.6/site-packages/paramiko/channel.py", line 60,
in _check
return func(self, *args, **kwds)
File "/usr/lib/python2.6/site-packages/paramiko/channel.py", line 229,
in exec_command
self._wait_for_event()
File "/usr/lib/python2.6/site-packages/paramiko/channel.py", line
1086, in _wait_for_event
raise e
I have seen these behaviour in several different steps during the test execution.
Can someone help me whats the problem is or how we can solve it?
Related
I got the following flink exception when I run pyflink processing job:
Exception in thread read_grpc_client_inputs:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 937, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 885, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib64/python3.6/site-packages/apache_beam/runners/worker/data_plane.py", line 598, in <lambda>
target=lambda: self._read_inputs(elements_iterator),
File "/usr/local/lib64/python3.6/site-packages/apache_beam/runners/worker/data_plane.py", line 581, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib64/python3.6/site-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib64/python3.6/site-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"#1664983018.802636895","description":"Error received from peer ipv4:127.0.0.1:44675","file":"src/core/lib/surface/call.cc","file_line":904,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
the sink result is loaded with :
resultB = tableA.flat_map(name).alias('name') \
.select(col('name'))\
.execute_insert('allowed_table').wait()
resultA = tableA.flat_map(name).alias('name') \
.select(col('name'))\
.execute_insert('allowed_table').wait()
I solved this problem by removing .wait()
On my FreeBSD I have a file packages.sls in the following path /usr/local/etc/salt/states
I'm getting the following error message when i do salt '*' state.apply packages :
freebsd:
Data failed to compile:
----------
Pillar failed to render with the following messages:
----------
Rendering SLS 'config' failed. Please see master log for details.
On the file master log i have the following details:
2022-06-02 10:05:12,222 [salt.roster :104 ][ERROR ][3425] Can't access roster for backend flat: Roster file "/usr/local/etc/salt/roster" not found
2022-06-02 10:05:12,434 [salt.pillar :900 ][CRITICAL][3427] Rendering SLS 'config' failed, render error:
found unexpected end of stream
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/salt/renderers/yaml.py", line 62, in render
data = yamlloader.load(yaml_data, Loader=get_yaml_loader(argline))
File "/usr/local/lib/python3.8/site-packages/salt/utils/yamlloader.py", line 169, in load
return yaml.load(stream, Loader=Loader)
File "/usr/local/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/usr/local/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "yaml/_yaml.pyx", line 707, in yaml._yaml.CParser.get_single_node
File "yaml/_yaml.pyx", line 725, in yaml._yaml.CParser._compose_document
File "yaml/_yaml.pyx", line 776, in yaml._yaml.CParser._compose_node
File "yaml/_yaml.pyx", line 890, in yaml._yaml.CParser._compose_mapping_node
File "yaml/_yaml.pyx", line 776, in yaml._yaml.CParser._compose_node
File "yaml/_yaml.pyx", line 892, in yaml._yaml.CParser._compose_mapping_node
File "yaml/_yaml.pyx", line 905, in yaml._yaml.CParser._parse_next_event
yaml.scanner.ScannerError: while scanning a quoted scalar
in "<unicode string>", line 3, column 27
found unexpected end of stream
in "<unicode string>", line 4, column 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/salt/pillar/__init__.py", line 887, in render_pstate
state = compile_template(
File "/usr/local/lib/python3.8/site-packages/salt/template.py", line 99, in compile_template
ret = render(input_data, saltenv, sls, **render_kwargs)
File "/usr/local/lib/python3.8/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/salt/renderers/yaml.py", line 66, in render
raise SaltRenderError(err_type, line_num, exc.problem_mark.buffer)
salt.exceptions.SaltRenderError: found unexpected end of stream
2022-06-02 10:05:12,435 [salt.pillar :1224][CRITICAL][3427] Pillar render error: Rendering SLS 'config' failed. Please see master log for details.
My sls file packages.sls
install_bash:
pkg.installed:
- pkgs:
- bash
- vim
- curl
Any idea on how to solve this situation?
Thank you
It was a problem of DNS/Cache. Issue solved after changing the hostname in minion.id ,clear cache, accepted new key and restart.
in terminal:
ngrok config add-authtoken -----personal_TOKEN-----
when ı tryed for this ı'm getting this error
ı downloaded the pyngrok but still ı have this issue.
Thanks for any help !
Traceback (most recent call last):
File "/home/selman/PycharmProjects/tringle-case/venv/lib/python3.8/site-packages/pyngrok/installer.py", line 94, in install_ngrok
download_path = _download_file(url, **kwargs)
File "/home/selman/PycharmProjects/tringle-case/venv/lib/python3.8/site-packages/pyngrok/installer.py", line 257, in _download_file
raise e
File "/home/selman/PycharmProjects/tringle-case/venv/lib/python3.8/site-packages/pyngrok/installer.py", line 235, in _download_file
buffer = response.read(chunk_size)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/selman/PycharmProjects/tringle-case/venv/bin/ngrok", line 8, in <module>
sys.exit(main())
File "/home/selman/PycharmProjects/tringle-case/venv/lib/python3.8/site-packages/pyngrok/ngrok.py", line 501, in main
run(sys.argv[1:])
File "/home/selman/PycharmProjects/tringle-case/venv/lib/python3.8/site-packages/pyngrok/ngrok.py", line 487, in run
install_ngrok(pyngrok_config)
File "/home/selman/PycharmProjects/tringle-case/venv/lib/python3.8/site-packages/pyngrok/ngrok.py", line 98, in install_ngrok
installer.install_ngrok(pyngrok_config.ngrok_path)
File "/home/selman/PycharmProjects/tringle-case/venv/lib/python3.8/site-packages/pyngrok/installer.py", line 98, in install_ngrok
raise PyngrokNgrokInstallError("An error occurred while downloading ngrok from {}: {}".format(url, e))
pyngrok.exception.PyngrokNgrokInstallError: An error occurred while downloading ngrok from https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip: The read operation timed out
The documentation is faulty. Try this:
ngrok.exe authtoken xxxxxxxxxxxxxxxxxxxxxxxxx
Replace xxxxxxx with your token.
I'm running Python3 running Django on localhost and listening to http://127.0.0.1:8000/
and I want to test it by different ways like request and socket
import requests
res = requests.request("GET", "http://127.0.0.1:8000/")
txt = res.content
print(res)
res.close()
# <Response [200]>
It runs well, and
on my running Django console, it shows [07/Jul/2018 16:04:26] "GET / HTTP/1.1" 200 6744
Now instead requests to socket
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', 8000))
msg = b'GET / HTTP/1.1'
s.send(msg)
print(s)
s.close()
# <socket.socket fd=1324, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 55312), raddr=('127.0.0.1', 8000)>
No error shows in my program
But I got the following exception on my running Django console
Invalid HTTP_HOST header: 'tony.jhou-1.xxservice.com:8000'. You may need to add 'tony.jhou-1.xxservice.com:8000' to ALLOWED_HOSTS.
[07/Jul/2018 16:08:10] "GET / HTTP/1.1" 400 63266
Traceback (most recent call last):
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 453, in _write
result = self.stdout.write(data)
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\socketserver.py", line 775, in write
self._sock.sendall(b)
File "D:\emc\ve\lib\site-packages\gevent\_socket3.py", line 459, in sendall
return _socketcommon._sendall(self, data_memory, flags)
File "D:\emc\ve\lib\site-packages\gevent\_socketcommon.py", line 358, in _sendall
timeleft = __send_chunk(socket, chunk, flags, timeleft, end)
File "D:\emc\ve\lib\site-packages\gevent\_socketcommon.py", line 287, in __send_chunk
data_sent += socket.send(chunk, flags)
File "D:\emc\ve\lib\site-packages\gevent\_socket3.py", line 440, in send
return _socket.socket.send(self._sock, data, flags)
ConnectionAbortedError: [WinError 10053] 連線已被您主機上的軟體中止。
[07/Jul/2018 16:08:10] "GET / HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 54587)
Traceback (most recent call last):
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 453, in _write
result = self.stdout.write(data)
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\socketserver.py", line 775, in write
self._sock.sendall(b)
File "D:\emc\ve\lib\site-packages\gevent\_socket3.py", line 459, in sendall
return _socketcommon._sendall(self, data_memory, flags)
File "D:\emc\ve\lib\site-packages\gevent\_socketcommon.py", line 358, in _sendall
timeleft = __send_chunk(socket, chunk, flags, timeleft, end)
File "D:\emc\ve\lib\site-packages\gevent\_socketcommon.py", line 287, in __send_chunk
data_sent += socket.send(chunk, flags)
File "D:\emc\ve\lib\site-packages\gevent\_socket3.py", line 440, in send
return _socket.socket.send(self._sock, data, flags)
ConnectionAbortedError: [WinError 10053] 連線已被您主機上的軟體中止。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 141, in run
self.handle_error()
File "D:\emc\ve\lib\site-packages\django\core\servers\basehttp.py", line 88, in handle_error
super(ServerHandler, self).handle_error()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 368, in handle_error
self.finish_response()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\socketserver.py", line 639, in process_request_thread
self.finish_request(request, client_address)
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\socketserver.py", line 696, in __init__
self.handle()
File "D:\emc\ve\lib\site-packages\django\core\servers\basehttp.py", line 155, in handle
handler.run(self.server.get_app())
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\handlers.py", line 144, in run
self.close()
File "C:\Users\tony.jhou\AppData\Local\Continuum\Anaconda3\lib\wsgiref\simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
I'm new to socket programming and just start learning networking, I think maybe I should send more request head. Please tell me how to do that, thanks.
Yes, you need to send more data. A minimal HTTP 1.1 request requires a second line that contains a Host header specifying the name or address of the host that should handle the request, and the request header lines must be followed by an empty line to tell the server that the header has been completely received.
In HTTP the end of a line is indicated by a pair of characters, a carriage return and a line feed. In Python strings \r represents a carriage return and \n represents a line feed. (The line feed character is sometimes called a newline character, hence the \n code.) This means that you have to write \r\n to mark the end of each line in the request.
So, what you need is:
msg = b'GET / HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n'
The final \r\n produces the empty line that indicates the end of the headers.
After you make that change it's likely that your server will report a different error, because your client program closes its socket immediately. That breaks the connection between the client and the server. When the server tries to send its response, it will find that the connection has been broken and it will probably complain about that. To avoid that, change your client to use s.recv to wait for and read the response from the server after it does s.send(). Something like:
while True:
resp = s.recv(8000)
if resp:
print resp
else:
break
I am using Newrelic's nginx-nr-agent but suddenly it crashed giving out the following error and not starting back.
2016-04-12 07:51:07,021 nginx-nr-agent [ERROR]: EXCEPTION: Traceback (most recent call last):
File "/usr/bin/nginx-nr-agent.py", line 431, in newrelic_push
u = urlopen(r, data=json.dumps(payload))
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 401, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 419, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1219, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1034, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline()
File "/usr/lib/python2.7/socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
File "/usr/lib/python2.7/ssl.py", line 241, in recv
return self.read(buflen)
File "/usr/lib/python2.7/ssl.py", line 160, in read
return self._sslobj.read(len)
File "/usr/lib/pymodules/python2.7/daemon/daemon.py", line 399, in terminate
raise exception
SystemExit: Terminating on signal 15
Any help please?
I got two solution for this from here, one is to remove the pid file /var/run/nginx-nr-agent/nginx-nr-agent.pid and than start/restart it. And second solution is to restart the server.
This plugin is published and supported by Nginx, Inc. If the previous suggestions did not help, contact
newrelic-support#nginx.com.