Error processing http request on raspberry server - http

I have set up a raspberry webserver running on my school lan network ,other people are connecting with arduino,sometimes when they connect i get this error:
Exception happened during processing of request from ('172.17.17.66', 49153)
Traceback (most recent call last):
File "/usr/lib/pythonz.7/SocketServer.py", line 290, in
_hand1e_request_nobloc k self.process_request(request, client_address) File
"/usr/lib/pythonz.7/SocketServer.py“, line 318, in process_request
self.finish_request(request, client_address) File
"/usr/lib/pythonz.7/SocketServer.py“, line 331, in finish_request
self.RequestHandlerClass(request, client_address, self) File
"/usr/lib/pythonz.7/SocketServer.py", line 652, in __init__ self.hand1e()
File "/usr/lib/pythonz.7/BaseHTTPServer.py“, line 340, in handle
self.handle_one_request() File "/usr/lib/pythonz.7/BaseHTTPServer.py", line
310, in handle_one request self . raw_requestline = self . rfile .
readline(65537) ‘ File "/usr/lib/pythonz.7/socket.py", line 480, in readline
data = self._sock.recv(se1f._rbufsize) error: [Errno 104] Connection reset
by peer
Can someone tell me what means? Is a problem of my server or their socket? If needed i can post my code.

The last line:
error: [Errno 104] Connection reset by peer
Means the client dropped the connection. I'd look into the Arduino code first.

Related

Install CDH 6.0.1 have trouble with install cm-agent

with cloudera install doc step by step I have in trouble with Install Agents
like this:
It said install failed and can not receive signal.
And I find the log like this:
[13/Nov/2018 16:44:19 +0000] 4306 MainThread agent ERROR Heartbeating to ryze-1.bigdata.com:7182 failed.
Traceback (most recent call last):
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cmf/agent.py", line 1371, in _send_heartbeat
response = self.requestor.request('heartbeat', heartbeat_data)
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 141, in request
return self.issue_request(call_request, message_name, request_datum)
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 254, in issue_request
call_response = self.transceiver.transceive(call_request)
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 483, in transceive
result = self.read_framed_message()
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 489, in read_framed_message
framed_message = response_reader.read_framed_message()
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 417, in read_framed_message
raise ConnectionClosedException("Reader read 0 bytes.")
ConnectionClosedException: Reader read 0 bytes.
I try to solve it with google I already check these setting.
/etc/cloudera-scm-agent/config.ini the port set 7182 and server_host set ryze-1.bigdata.com.
iptable altready shutdown with sudo service iptables stop
ryze-1.bigdata.com is reachable. and telnet ryze-1.bigdata.com 7183 can succeed.
OS: Centos7.4
Platform: AliCloud
So what can I do? Any one can help me ?
I closed the ssl option.
Everything is fine now.......

Error when Communicating with the server while Cluster Setup in Cloudera

I am trying to up Hadoop in Centos-7 usign CLoudera, but while Cluster Setup process (Single node), I am getting this error stating:
There was an error when communicating with the server. See the log file for more information.
I logged into cloudera-scm-agent.log file using
sudo cat /var/log/cloudera-scm-agent/cloudera-scm-agent.log
And I see Failed directory creation and connection refused errors.
The detailed log file can be found here.
Can someone please assist me on what am I doing wrong here?
Have you installed the cluster with single user mode? if so the system user "cloudera-scm" should have permission to perform read, write operation on service log, pid, data directory. From your log message, all services are refused to start because of improper file system permission.
stacks', u'bytes_free_warning_threshhold_bytes': 0, u'group': u'cloudera-scm', u'user': u'cloudera-scm', u'mode': 493}]
[01/Nov/2018 04:41:11 +0000] 28095 MainThread os_ops ERROR Failed directory creation: /var/log/zookeeper/stacks: [Errno 13] Permission denied: '/var/log/zookeeper'
[01/Nov/2018 04:41:11 +0000] 28095 MainThread process ERROR Could not evaluate resource {u'path': u'/var/log/zookeeper/stacks', u'bytes_free_warning_threshhold_bytes': 0, u'group': u'cloudera-scm', u'user': u'cloudera-scm', u'mode': 493}
Traceback (most recent call last):
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.15.1-py2.7.egg/cmf/process.py", line 963, in _do_directory_resources
self.osops.mkabsdir(d["path"], user=d["user"], group=d["group"], mode=d["mode"])
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.15.1-py2.7.egg/cmf/util/os_ops.py", line 180, in mkabsdir
os.makedirs(path)
File "/usr/lib64/cmf/agent/build/env/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib64/cmf/agent/build/env/lib64/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/log/zookeeper'

AirflowException: Celery command failed - The recorded hostname does not match this instance's hostname

I'm running Airflow on a clustered environment running on two AWS EC2-Instances. One for master and one for the worker. The worker node though periodically throws this error when running "$airflow worker":
[2018-08-09 16:15:43,553] {jobs.py:2574} WARNING - The recorded hostname ip-1.2.3.4 does not match this instance's hostname ip-1.2.3.4.eco.tanonprod.comanyname.io
Traceback (most recent call last):
File "/usr/bin/airflow", line 27, in <module>
args.func(args)
File "/usr/local/lib/python3.6/site-packages/airflow/bin/cli.py", line 387, in run
run_job.run()
File "/usr/local/lib/python3.6/site-packages/airflow/jobs.py", line 198, in run
self._execute()
File "/usr/local/lib/python3.6/site-packages/airflow/jobs.py", line 2527, in _execute
self.heartbeat()
File "/usr/local/lib/python3.6/site-packages/airflow/jobs.py", line 182, in heartbeat
self.heartbeat_callback(session=session)
File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 50, in wrapper
result = func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/airflow/jobs.py", line 2575, in heartbeat_callback
raise AirflowException("Hostname of job runner does not match")
airflow.exceptions.AirflowException: Hostname of job runner does not match
[2018-08-09 16:15:43,671] {celery_executor.py:54} ERROR - Command 'airflow run arl_source_emr_test_dag runEmrStep2WaiterTask 2018-08-07T00:00:00 --local -sd /var/lib/airflow/dags/arl_source_emr_test_dag.py' returned non-zero exit status 1.
[2018-08-09 16:15:43,681: ERROR/ForkPoolWorker-30] Task airflow.executors.celery_executor.execute_command[875a4da9-582e-4c10-92aa-5407f3b46d5f] raised unexpected: AirflowException('Celery command failed',)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/airflow/executors/celery_executor.py", line 52, in execute_command
subprocess.check_call(command, shell=True)
File "/usr/lib64/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'airflow run arl_source_emr_test_dag runEmrStep2WaiterTask 2018-08-07T00:00:00 --local -sd /var/lib/airflow/dags/arl_source_emr_test_dag.py' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/dist-packages/celery/app/trace.py", line 382, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/lib/python3.6/dist-packages/celery/app/trace.py", line 641, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/airflow/executors/celery_executor.py", line 55, in execute_command
raise AirflowException('Celery command failed')
airflow.exceptions.AirflowException: Celery command failed
When this error occurs the task is marked as failed on Airflow and thus fails my DAG when nothing actually went wrong in the task.
I'm using Redis as my queue and postgreSQL as my meta-database. Both are external as AWS services. I'm running all of this on my company environment which is why the full name of the server is ip-1.2.3.4.eco.tanonprod.comanyname.io. It looks like it wants this full name somewhere but I have no idea where I need to fix this value so that it's getting ip-1.2.3.4.eco.tanonprod.comanyname.io instead of just ip-1.2.3.4.
The really weird thing about this issue is that it doesn't always happen. It seems to just randomly happen every once in a while when I run the DAG. It's also occurring on all of my DAGs sporadically so it's not just one DAG. I find it strange though how it's sporadic because that means other task runs are handling the IP address for whatever this is just fine.
Note: I've changed the real IP address to 1.2.3.4 for privacy reasons.
Answer:
https://github.com/apache/incubator-airflow/pull/2484
This is exactly the problem I am having and other Airflow users on AWS EC2-Instances are experiencing it as well.
The hostname is set when the task instance runs, and is set to self.hostname = socket.getfqdn(), where socket is the python package import socket.
The comparison that triggers this error is:
fqdn = socket.getfqdn()
if fqdn != ti.hostname:
logging.warning("The recorded hostname {ti.hostname} "
"does not match this instance's hostname "
"{fqdn}".format(**locals()))
raise AirflowException("Hostname of job runner does not match")
It seems like the hostname on the ec2 instance is changing on you while the worker is running. Perhaps try manually setting the hostname as described here https://forums.aws.amazon.com/thread.jspa?threadID=246906 and see if that sticks.
I had a similar problem on my Mac. It fixed it setting hostname_callable = socket:gethostname in airflow.cfg.
Personally when running on my Mac, I found that I got similar errors to this when the Mac would sleep while I was running a long job. The solution was to go into System Preferences -> Energy Saver and then check "Prevent computer from sleeping automatically when the display is off."

Error message in nova schedule

i tried to start 5 instance on my "litle cloud". I have one controller node (tb22) with nova-api and compute. An i have one compute node (tb23).
I get an error message in nova-schedule:
2014-07-09 13:00:23.858 ERROR nova.scheduler.filter_scheduler
[req-f699a7d3-e3de-40e4-b291-9ae972c7d8f9 admin demo] [instance:
55febf3d-1d56-4381-a6ca-b4b3b37e92e0] Error from last host: tb23 (node
tb23): [u'Traceback (most recent call last):\n', u' File
"/opt/stack/nova/nova/compute/manager.py", line 1305, in
_build_instance\n set_access_ip=set_access_ip)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 393, in
decorated_function\n return function(self, context, *args,
**kwargs)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1717, in spawn\n LOG.exception((\'Instance failed to spawn\'),
instance=instance)\n', u' File
"/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in
exit\n six.reraise(self.type_, self.value, self.tb)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1714, in _spawn\n
block_device_info)\n', u' File
"/opt/stack/nova/nova/virt/libvirt/driver.py", line 2262, in spawn\n
write_to_disk=True)\n', u' File
"/opt/stack/nova/nova/virt/libvirt/driver.py", line 3447, in to_xml\n
disk_info, rescue, block_device_info)\n', u' File
"/opt/stack/nova/nova/virt/libvirt/driver.py", line 3263, in
get_guest_config\n flavor)\n', u' File
"/opt/stack/nova/nova/virt/libvirt/vif.py", line 384, in get_config\n
_("Unexpected vif_type=%s") % vif_type)\n', u'NovaException: Unexpected vif_type=binding_failed\n']
Has anybody an idea what the fault is?
Thanks
This is error is caused by configuration mistake in
/etc/neutron/plugins/ml2/ml2_conf.ini
Fix
Edit /etc/neutron/plugins/ml2/ml2_conf.ini on both compute and network node
Change tunnel_type = gre to tunnel_types = gre
Restart these services in network node
service openvswitch-switch restart
service neutron-plugin-openvswitch-agent restart
service neutron-l3-agent restart
service neutron-dhcp-agent restart
service neutron-metadata-agent restart
Restart these services in compute node
service openvswitch-switch restart
service nova-compute restart
service neutron-plugin-openvswitch-agent restart

PloneFormGen Refuses to send mail on one site

We have a server running Plone 4 which hosts many of our sites, on one we have just noticed it is not sending any mail from PloneFormGen.
I have tried:
Recreating the form
Deleting & recreating the mailer in the form
Altering the site from address (avoiding any spam issues like sending to and from the same address)
All the other sites on this server can send mail fine from PFG, I am not really sure which log files to check but below is the last few lines of my events.log file which mentions a few things about missing adapters as far as I can tell, can someone translate this form me?:
------
2012-07-11T15:13:38 WARNING PloneFormGen Designated action adapter 'formsavedataadapter.2012-07-03.5018819612' is missing; ignored.
------
2012-07-11T15:13:38 WARNING PloneFormGen Designated action adapter 'formmaileradapter.2012-07-11.9678428439' is missing; ignored.
------
2012-07-11T15:13:38 WARNING PloneFormGen Designated action adapter 'formmaileradapter.2012-07-11.9935785303' is missing; ignored.
------
2012-07-11T15:13:38 ERROR MailDataManager [Errno -2] Name or service not known
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Plone-4.0.4-py2.6.egg/Products/CMFPlone/patches/sendmail.py", line 9, in _catch
return func(*args, **kwargs)
File "/usr/local/Plone/buildout-cache/eggs/zope.sendmail-3.5.2-py2.6.egg/zope/sendmail/mailer.py", line 46, in send
connection = self.smtp(self.hostname, str(self.port))
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 239, in __init__
(code, msg) = self.connect(host, port)
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 295, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 273, in _get_socket
return socket.create_connection((port, host), timeout)
File "/usr/local/Plone/Python-2.6/lib/python2.6/socket.py", line 547, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
------
2012-07-11T15:13:38 ERROR MailDataManager [Errno -2] Name or service not known
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Plone-4.0.4-py2.6.egg/Products/CMFPlone/patches/sendmail.py", line 9, in _catch
return func(*args, **kwargs)
File "/usr/local/Plone/buildout-cache/eggs/zope.sendmail-3.5.2-py2.6.egg/zope/sendmail/mailer.py", line 46, in send
connection = self.smtp(self.hostname, str(self.port))
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 239, in __init__
(code, msg) = self.connect(host, port)
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 295, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 273, in _get_socket
return socket.create_connection((port, host), timeout)
File "/usr/local/Plone/Python-2.6/lib/python2.6/socket.py", line 547, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
------
2012-07-11T15:30:18 INFO CMFFormController /usr/local/Plone/buildout-cache/eggs/Products.PloneFormGen-1.7a2-py2.6.egg/Products/PloneFormGen/skins/PloneFormGen/fg_base_view_p3.cpt: No default action specified for status success, content type ANY. Users of IE can submit pages using the return key, resulting in no button in the REQUEST. Please specify a default action for this case.
------
2012-07-11T15:30:18 INFO CMFFormController /usr/local/Plone/buildout-cache/eggs/Products.PloneFormGen-1.7a2-py2.6.egg/Products/PloneFormGen/skins/PloneFormGen/fg_embedded_view_p3.cpt: No default action specified for status success, content type ANY. Users of IE can submit pages using the return key, resulting in no button in the REQUEST. Please specify a default action for this case.
------
2012-07-11T15:30:32 INFO CMFFormController /usr/local/Plone/buildout-cache/eggs/Products.PloneFormGen-1.7a2-py2.6.egg/Products/PloneFormGen/skins/PloneFormGen/fg_base_view_p3.cpt: No default action specified for status success, content type ANY. Users of IE can submit pages using the return key, resulting in no button in the REQUEST. Please specify a default action for this case.
------
2012-07-11T15:30:32 INFO CMFFormController /usr/local/Plone/buildout-cache/eggs/Products.PloneFormGen-1.7a2-py2.6.egg/Products/PloneFormGen/skins/PloneFormGen/fg_embedded_view_p3.cpt: No default action specified for status success, content type ANY. Users of IE can submit pages using the return key, resulting in no button in the REQUEST. Please specify a default action for this case.
------
2012-07-11T15:39:18 WARNING PloneFormGen Designated action adapter 'formsavedataadapter.2012-07-03.5018819612' is missing; ignored.
------
2012-07-11T15:39:18 WARNING PloneFormGen Designated action adapter 'formmaileradapter.2012-07-11.9678428439' is missing; ignored.
------
2012-07-11T15:39:18 WARNING PloneFormGen Designated action adapter 'formmaileradapter.2012-07-11.9935785303' is missing; ignored.
------
2012-07-11T15:39:18 ERROR MailDataManager [Errno -2] Name or service not known
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Plone-4.0.4-py2.6.egg/Products/CMFPlone/patches/sendmail.py", line 9, in _catch
return func(*args, **kwargs)
File "/usr/local/Plone/buildout-cache/eggs/zope.sendmail-3.5.2-py2.6.egg/zope/sendmail/mailer.py", line 46, in send
connection = self.smtp(self.hostname, str(self.port))
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 239, in __init__
(code, msg) = self.connect(host, port)
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 295, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 273, in _get_socket
return socket.create_connection((port, host), timeout)
File "/usr/local/Plone/Python-2.6/lib/python2.6/socket.py", line 547, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
------
2012-07-11T15:39:18 ERROR MailDataManager [Errno -2] Name or service not known
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Plone-4.0.4-py2.6.egg/Products/CMFPlone/patches/sendmail.py", line 9, in _catch
return func(*args, **kwargs)
File "/usr/local/Plone/buildout-cache/eggs/zope.sendmail-3.5.2-py2.6.egg/zope/sendmail/mailer.py", line 46, in send
connection = self.smtp(self.hostname, str(self.port))
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 239, in __init__
(code, msg) = self.connect(host, port)
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 295, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/local/Plone/Python-2.6/lib/python2.6/smtplib.py", line 273, in _get_socket
return socket.create_connection((port, host), timeout)
File "/usr/local/Plone/Python-2.6/lib/python2.6/socket.py", line 547, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
I can provide other information please just tell me where to look if possible.
Thanks.
This traceback means that your server is unable to connect mail server:
gaierror: [Errno -2] Name or service not known
It's an operating system levle failure.
DNS resolution of the mail server name failed. The reason could be
Firewalled server
Misconfigured DNS
or mistyped mail server name as mentioned above
Perhaps this site has an incorrect mail server configured at Site Setup>Mail?

Resources