Error in VACaMobil for INET - linux

I am starting to use VACaMobil, a module for OMNET++ which allows, while evaluating
ITS solutions, to have a constant number of cars during a simulation period.
After making some changes to the code, I tried to run VACaMobil, with the configuration
flows 2. The simulation aborted and I got the following messages from sumo-launchd.py:
jcmh#juanca-freya:~$ python Proyectos-OMNeT++/inet/etc/sumo-launchd.py -vv -c sumo-gui
Logging to /tmp/sumo-launchd.log
Listening on port 9999
Connection from 127.0.0.1 on port 49847
Handling connection from 127.0.0.1 on port 49847
Got TraCI message of length 2
Got TraCI command of length 1
Got TraCI command 0x0
Got CMD_GETVERSION
Got TraCI message of length 248
Got TraCI command of length 247
Got TraCI command 0x75
Got CMD_FILE_SEND for "sumo-launchd.launch.xml"
Got CMD_FILE_SEND with data "<launch>
<copy file="downtown.mapa.xml"/>
<copy file="downtown.routes.xml"/>
<copy file="downtown.sumo.cfg" type="config"/>
<basedir path="../examples/VACaMobil/flows/Milan/"/>
<seed value="2"/>
</launch>
"
Creating temporary directory...
Temporary dir is /tmp/sumo-launchd-tmp-dsJ7kR
Base dir is ../examples/VACaMobil/flows/Milan/
Seed is 2
Finding free port number...
Claiming lock on port
...found port 56172
Releasing lock on port
Cleaning up
Result: "None"
Aborting on error: file "../examples/VACaMobil/flows/Milan/downtown.mapa.xml" does not exist
Closing connection from 127.0.0.1 on port 49847
A user posted a message in the blog of Sergio Tornell, one of the VACaMobil developers, asking to help,
because he had a problem similar to mine. The answer was: "It seems like you are using windows. You
have to modify all the routes, in windows you use "\" instead of "/"". He certainly was using Windows,
but I am in GNU/Linux.
What could be the problem? I don't think to be because backslashes, since I am in GNU/Linux.
I am using Elementary OS 3 (based in Ubuntu 14.04), OMNeT++ 4.6, VACaMobil for INET framework and SUMO 0.18.0.
Thanks in advance.

The way to solve this problem was simply:
To go to folder where was sumo-launchd.py:
jcmh#juanca-freya:~$ cd Proyectos-OMNeT++/inet/etc
Run sumo-launchd.py directly:
jcmh#juanca-freya:~/Proyectos-OMNeT++/inet/etc$ python sumo-launchd.py -vv -c sumo-gui

Related

RIAK Node does not Start after changing IP

I am in the process of setting up a Riak Cluster on Raspberry Pis.
Unfortunately I get the following error message after changing the IP address.
Versions I used:
Debian Jessie (Raspberry PI)
riak (Github Clone Mar2017)
riak-cs2.1.1
stanchion-2.1.1
Using this guide I tried to change the IP addresses in the various .conf files.
https://docs.riak.com/riak/kv/latest/using/cluster-operations/changing-cluster-info/index.html
Works on 127.0.0.1:
$ ~/riak/rel/riak/bin/riak-admin test
Successfully completed 1 read/write cycle to 'riak#127.0.0.1'
Error Message (after changing IP:192.168.178.61):
sudo ./riak console
config is OK
-config /home/pi/neu/riak/rel/riak/data/generated.configs/app.2020.01.02.23.37.52.config -args_file /home/pi/neu/riak/rel/riak/data/generated.configs/vm.2020.01.02.23.37.52.args -vm_args /home/pi/neu/riak/rel/riak/data/generated.configs/vm.2020.01.02.23.37.52.args
Exec: /home/pi/neu/riak/rel/riak/bin/../erts-5.10.3/bin/erlexec -boot /home/pi/neu/riak/rel/riak/bin/../releases/2.2.3/riak -config /home/pi/neu/riak/rel/riak/data/generated.configs/app.2020.01.02.23.37.52.config -args_file /home/pi/neu/riak/rel/riak/data/generated.configs/vm.2020.01.02.23.37.52.args -vm_args /home/pi/neu/riak/rel/riak/data/generated.configs/vm.2020.01.02.23.37.52.args -pa /home/pi/neu/riak/rel/riak/bin/../lib/basho-patches -- console
Root: /home/pi/neu/riak/rel/riak/bin/..
Erlang R16B02_basho10 (erts-5.10.3) [source] [smp:4:4] [async-threads:64] [hipe] [kernel-poll:true] [frame-pointer]
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
{"Kernel pid terminated",application_controller,"{application_start_failure,riak_core,{bad_return,{{riak_core_app,start,[normal,[]]},{'EXIT',{{function_clause,[{orddict,fetch,['riak#192.168.178.61',[]],[{file,\"orddict.erl\"},{line,72}]},{riak_core_capability,renegotiate_capabilities,1,[{file,\"src/riak_core_capability.erl\"},{line,441}]},{riak_core_capability,handle_call,3,[{file,\"src/riak_core_capability.erl\"},{line,213}]},{gen_server,handle_msg,5,[{file,\"gen_server.erl\"},{line,585}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,239}]}]},{gen_server,call,[riak_core_capability,{register,{riak_core,vnode_routing},{capability,[proxy,legacy],legacy,{riak_core,legacy_vnode_routing,[{true,legacy},{false,proxy}]}}},infinity]}}}}}}"}
Crash dump was written to: ./log/erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,riak_core,{bad_return,{{riak_core_app,start,[normal,[]]},{'EXIT',{{function_clause,[{orddict,fetch,['riak#192.168.178.61',[
https://github.com/basho/riak/issues/999
martinsumner commented 3 days ago:
I might expect to see this if you hadn't done the step of either renaming (or deleting the contents of) the ring directory. Did you do this?
Also can you confirm if you're in the single-node or multi-node renaming scenario?
Ei3rb0mb3r commented 1 minute ago:
Many thanks for the quick feedback!
The error has been solved after I deleted the ring directory files.
../riak/rel/riak/data/ring/ rm -rf *

Documentum.cmis.too many open files error

We have deployed our application on rhel 7 from rhel 6 and after deployment we are seeing following error in the catalina.properties, due to this my vm link is getting down frequently. We are using Documentum CMIS 16.4 version on tomcat 8.5 version.
Following is the error's details:
27-Nov-2018 01:57:00.536 SEVERE [https-jsse-nio-0.0.0.0-12510-Acceptor-0] org.apache.tomcat.util.net.NioEndpoint$Acceptor.run Socket accept failed
java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:457)
at java.lang.Thread.run(Thread.java:748)
Here are my efforts in order to solve this problem:
I have increased ulimit value from 1024 to 8192 for specific user and rebooted it, recycled tomcat service but nothing happened. I had done changed to file named /etc/security/limits.d/20-nproc.conf/20-nproc.conf. kindly help here.
I don't have privileges to add a comment, so posting as an answer. Try to find out which files are open by using the command
lsof -p <pid> | wc -l.
That will tell you which files are not getting closed.
You can also check the limits of a running process by
cat /proc/<pid>/limits

how to secure a MyCloud? Is it already too late?

My laptop is running Ubuntu 14.04 LTS. I have a WMD MyCloud that I am doing backups to with an rsync. The rsync calls usually end with an error.
Some things I have observed. The MyCloud machine has a REST API and I see that someone has tried to hack that. As far as I can tell, the attempt did not succeed.
My backup does this from my laptop, to the MyCloud:
/usr/bin/rsync -a -z -v /home/me/ root#192.168.1.82:/shares/me
Usually I get:
rsync: connection unexpectedly closed (93239 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.0]
and the rsync process is returning 12.
Oddly, if I use a second -v, the process usually succeeds. Why would that be? It is too fast without the second -v?
Something I saw worries me. Again, this is the output on my laptop, running rsync to copy to the MyCloud:
*** stack smashing detected ***: <unknown> terminated
rsync: connection unexpectedly closed (11387 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.0]
and it returns 12. Ouch!
So, does this mean my laptop is infected with something, presumably Heartbleed or something like it?
On my laptop:
$ rsync -h
rsync version 3.1.0 protocol version 31
...
On the MyCloud:
# rsync -h
rsync version 3.0.9 protocol version 30
...
Am I just screwed? Do I just need to update the stuff on the MyCloud? I have updated by Ubuntu laptop several times. Did that not prevent an infection on this machine?
Open to any suggestions.

heimcontrol.js Node/Mongodb: 'events.js:2817: Uncaught Error: Cannot open /dev/'

I have been struggling for a week trying to figure out what went wrong. I had this running fine from outside my house and controlling an led on a breadboard. When I restarted my pi and attempted to run 'node heimcontrol.js', I am greeted with 'info - socket.io started' (expected), and two instances of 'events.js:2817: Uncaught Error: Cannot open /dev/' and no return of listening on port. I've checked and changed my permissions of /dev/ to 'drwxr-xr-x 12 pi root 3100 Sep 28 15:58 dev'. I know 777 isn't the best practice, but I was trying to see if that was the issue. I've tried to locate the events.js to dig deeper, but no luck. What should I check next? I've run out of ideas.
node v0.10.2
mongo v2.1.1
pi#raspberrypi ~/heimcontrol.js $ node heimcontrol.js
info - socket.io started
events.js:2817: Uncaught Error: Cannot open /dev/
events.js:2817: Uncaught Error: Cannot open /dev/
Thank you very much in advance.
Edit 01: I pointed my Pi browser to 127.0.0.1:8080 and was greeted with a page 'Motion 3.2.12 Running [1] Threads' and a hyperlink 'All' which leads to settings. I am assuming that I created a video module in Heimcontrol and did not finish the setup since Motion detect my camera (RPi camera module). Not familiar with Motion, maybe someone can help guide me.

Is it possible to connect to Mobile Safari remote debugger protocol using python?

I have an HTML5-based application running on iOS and I want to connect to it using the webkit remote debugger protocol 1 that is now supported in iOS 5 2.
I am trying to track down a problem where my javascript application is hard crashing the browser (SEG_FAULT). I would like to get a trace of the application as it executes so I can see what line(s) or network operations may be leading to the issue. My current idea is to write a python application that will connect to the remote debugger and keep stepping through the code and collecting information to a log file while I interact with the application.
I ran into an initial hurdle though that I can't find any examples or documentation about how to connect to the debugger and communicate or even if it is possible.
Does anyone know if this is possible and if so can you point me at some documentation and/or example code?
Based on the code from also below I created a project on github to test out some of the ideas. You can find it here: abierbaum:/python_webkit-remote_debugger
Yes, if you've got the inspector enabled in your UIWebView by following the instructions, it should be possible to connect to it from Python. I played around with it, and figured out how to send and receive commands using a Web Socket. Here's a script for Python 2.7 using websocket-client
import json
import socket
from websocket import WebSocket
ws = WebSocket()
# if ipv6
ws.io_sock = ws.sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
ws.connect("ws://localhost:9999/devtools/page/1")
counter = 0
def send(method, params):
global counter
counter += 1
# separators is important, you'll get "Message should be in JSON format." otherwise
message = json.dumps({"id": counter, "method": method, "params": params}, separators=(',', ':'))
print "> %s" % (message,)
ws.send(message)
def recv():
result = ws.recv()
print "< %s" % (result,)
send('Runtime.evaluate', {'expression': 'alert("hello from python")'})
recv()
This uses the Runtime.evaluate function to show an alert.
I tried running it against MobileSafari running in the simulator, and it worked fine. I noticed two important things:
the remote server is bound to an IPv6 port, and websocket-client didn't connect without the line to override the socket and set the family. Not sure if it would be the same running on a device or in a UIWebView.
it doesn't like spaces around the separators in the JSON.
Here's what it looks like enabling the inspector in MobileSafari using gdb and running the script:
$ ps x | grep MobileSafari
4968 ?? Z 0:00.00 (MobileSafari)
6234 ?? S 0:00.69 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk//Applications/MobileSafari.app/MobileSafari
6238 s007 R+ 0:00.00 grep MobileSafari
$ gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov 3 21:59:02 UTC 2011)
...
(gdb) attach 6234
Attaching to process 6234.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ........................................................................................................................................................ done
0x99798c22 in mach_msg_trap ()
(gdb) p (void *)[WebView _enableRemoteInspector]
$1 = (void *) 0x2ac93ce
(gdb) detach
Detaching from process 6234.
(gdb) quit
$ python debug.py
> {"params":{"expression":"alert(\"hello from python\")"},"id":1,"method":"Runtime.evaluate"}
< {"result":{"result":{"type":"undefined","description":"undefined"}},"id":1}

Resources