Running Python script in a linux "screen" which results in a "Cannot assign requested address" -
i have shell script starts simulation environment (ros underwater simulation) on unbuntu 12.04. in order use simulation environment in general ones component needs communicate environment via tcp/ip. if start script simulation on standart terminal simulation environment starts it's supposed to. binds definded ip address, no errors or warning. can work without limitaion. here comes problem: need start simulation in detached screen (do requirements). use
screen -d -m -s uwsim bash -c 'export $user=~ ; ~/uwsim_ws/uwsim_starter.sh'
i need set user
variable not set default in screen, otherwise script doesn't find other subscripts of ros. after executing command above, @ point during startup of ros following error:
... traceback (most recent call last): file "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [errno 99] cannot assign requested address ...
due error components can't connect simulation. mentioned: works when started in standart terminal. guess there export
's missing. compared exports in terminal exports in screen (this led me set user
varaible), without success. in advance :-)
i shell-related in uwsim_starter.sh shell instead of inside screen command. that, screen command simpler
then export $user not supposed set $user ! use
export user=~
instead
also, cannot assign requested address appears when process listening @ same ip:port or *:port on same server. please check using
netstat -plnt | grep <port number of application>
and search else in listen mode
Comments
Post a Comment