apollo icon indicating copy to clipboard operation
apollo copied to clipboard

How to deal with unix:///tmp/supervisor.sock refused connection when start the HMI?

Open JoelinChee opened this issue 8 years ago • 25 comments

After I install the docker and build the apollo, I met the problem Started supervisord with dev conf Start roscore... voice_detector: started unix:///tmp/supervisor.sock refused connection when start the HMI. Does anyone met this problem and how to deal with it? THX

JoelinChee avatar Jun 05 '18 02:06 JoelinChee

I got a error like voice_detector : started dreamview: ERROR (spawn error)

I don't know why it happens. And the localhost:88888 can't open either

Fred159 avatar Jun 05 '18 04:06 Fred159

You can check if there is a /etc/supervisord.conf, if not, you can create one this way: echo_supervisord_conf > supervisord.conf && sudo mv supervisord.conf /etc/

After that, run supervisord -c /apollo/modules/tools/supervisord/dev.conf to start the supervisord service.

You can check the status by supervisorctl status. You should be able to see a list of modules like the following:

canbus                           STOPPED   Not started
conti_radar                      STOPPED   Not started
control                          STOPPED   Not started
dreamview                        STOPPED   Not started
gps                              STOPPED   Not started
localization                     STOPPED   Not started
mobileye                         STOPPED   Not started
...

startcode avatar Jun 05 '18 17:06 startcode

Thank you for your reply, but when I followed the what startcode's instruction, the results are as follows. There are still some problems.


root@st-HP-Z840-Workstation:/etc# echo supervisord.conf > supervisord.conf && sudo mv supervisord.conf /etc/ root@st-HP-Z840-Workstation:/etc# supervisord -c /apollo/modules/tools/supervisord/dev.conf The program 'supervisord' is currently not installed. You can install it by typing: apt-get install supervisor


root@st-HP-Z840-Workstation:/etc# apt-get install supervisor Reading package lists... Done Building dependency tree
Reading state information... Done The following extra packages will be installed: python-meld3 The following NEW packages will be installed: python-meld3 supervisor 0 upgraded, 2 newly installed, 0 to remove and 342 not upgraded. Need to get 283 kB of archives. After this operation, 1,624 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu/ trusty/universe python-meld3 amd64 0.6.10-1 [39.0 kB] Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe supervisor all 3.0b2-1ubuntu0.1 [244 kB] Fetched 283 kB in 4s (61.9 kB/s)
Selecting previously unselected package python-meld3. (Reading database ... 183725 files and directories currently installed.) Preparing to unpack .../python-meld3_0.6.10-1_amd64.deb ... Unpacking python-meld3 (0.6.10-1) ... Selecting previously unselected package supervisor. Preparing to unpack .../supervisor_3.0b2-1ubuntu0.1_all.deb ... Unpacking supervisor (3.0b2-1ubuntu0.1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Setting up python-meld3 (0.6.10-1) ... Setting up supervisor (3.0b2-1ubuntu0.1) ... Starting supervisor: supervisord. Processing triggers for ureadahead (0.100.0-16) ...


root@st-HP-Z840-Workstation:/etc# supervisord -c /apollo/modules/tools/supervisord/dev.conf


root@st-HP-Z840-Workstation:/etc# supervisorctl status Traceback (most recent call last): File "/usr/bin/supervisorctl", line 9, in load_entry_point('supervisor==3.0b2', 'console_scripts', 'supervisorctl')() File "/usr/lib/python2.7/dist-packages/supervisor/supervisorctl.py", line 1113, in main options.realize(args, doc=doc) File "/usr/lib/python2.7/dist-packages/supervisor/options.py", line 1497, in realize Options.realize(self, *arg, **kw) File "/usr/lib/python2.7/dist-packages/supervisor/options.py", line 305, in realize self.process_config() File "/usr/lib/python2.7/dist-packages/supervisor/options.py", line 313, in process_config self.process_config_file(do_usage) File "/usr/lib/python2.7/dist-packages/supervisor/options.py", line 344, in process_config_file self.read_config(self.configfile) File "/usr/lib/python2.7/dist-packages/supervisor/options.py", line 1511, in read_config config.readfp(fp) File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp self._read(fp, filename) File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read raise MissingSectionHeaderError(fpname, lineno, line) ConfigParser.MissingSectionHeaderError: File contains no section headers. file: supervisord.conf, line: 1 'supervisord.conf\n'


JoelinChee avatar Jun 07 '18 13:06 JoelinChee

@JoelinChee hi, 1: You need do this inside docker. 2: That command is "echo_supervisord_conf" , NOTE there are two underscores.

zhxt avatar Jun 08 '18 13:06 zhxt

@Fred159 Please refer to FAQ Q2. You may probably need to rebuild pcl lib if your CPU does not support FMA3.

zhxt avatar Jun 08 '18 13:06 zhxt

Still failed, I follow below steps:

  1. root@in_dev_docker:/apollo# echo_supervisord_conf > supervisord.conf && sudo mv supervisord.conf /etc/
  2. supervisord -c /apollo/modules/tools/supervisord/dev.conf Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord. For help, use /usr/local/bin/supervisord -h
  3. root@in_dev_docker:/apollo# sudo supervisorctl status unix:///tmp/supervisor.sock no such file

changchengx avatar Jun 11 '18 04:06 changchengx

try to run supervisorctl cmd with parameter ' -c /apollo/modules/tools/supervisord/dev.conf '

zhxt avatar Jun 11 '18 04:06 zhxt

Worse still.... root@in_dev_docker:/apollo# echo_supervisord.conf > supervisord.conf && sudo mv supervisord.conf /etc/ bash: echo_supervisord.conf: command not found

JoelinChee avatar Jun 12 '18 06:06 JoelinChee

So how can I build PCL library in docker container? sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl sudo apt-get update sudo apt-get install libpcl-all Should I run these code in linux docker container?

Fred159 avatar Jun 14 '18 11:06 Fred159

@Fred159 no, please find the answer in #3615

zhxt avatar Jun 14 '18 12:06 zhxt

@JoelinChee I had wrote a NOTE there. But it seems no people cares :D

zhxt avatar Jun 14 '18 13:06 zhxt

@JoelinChee Please check if you have multiple supervisord running. If yes, kill them and run bootstrap.sh again.

zhxt avatar Jun 14 '18 13:06 zhxt

I encountered this issue too. When I make a fresh build (build_gpu/build_opt_gpu), the build ran successfully but the bootstrap fails. First it starts with the "no such file" for the sock, then following some of your suggestions it will instead change to the "refused connection", but I could not get rid of that. I deleted the supervisor, and installed it again ( + echo_supervisord_conf > /etc/supervisord.conf) I tried to add the config to these lines in bootstrap.sh:

supervisorctl start monitor > /dev/null
supervisorctl start dreamview

-->

supervisorctl -c /apollo/modules/tools/supervisord/dev.conf start monitor > /dev/null
supervisorctl -c /apollo/modules/tools/supervisord/dev.conf start dreamview

Tried to change the path to /var/run instead of /tmp in dev.conf Tried to add --tmpfs /var/run/ to docker run command like suggested here Unfortunately none of these worked.

If there were multiple supervisord running how would I check that, and kill those services? Can they be found with ps command, or do I have to kill them with service stop command?

specs: ubuntu 14.04, mostly followed this tutorial: https://github.com/ApolloAuto/apollo/blob/master/docs/howto/how_to_run_perception_module_on_your_local_computer.md I skipped step 1, since that looked like it was already included in dev_start, I used nvidia-384.130 driver, which looked good, since nvidia-smi worked inside docker. Don't know if it's relevant, but I have installed nvidia-docker on host.

I could start dreamview with this command: bash scripts/dreamview.sh But the full perception is probably not working properly when playing back the demo 2.5 rosbag (for eg. I have no camera picture on top-left side)

I don't really know what to try next, any suggestions are welcome

balazon avatar Jul 03 '18 19:07 balazon

I am having all the same problems as @balazon

unix:///tmp/supervisor.sock refused connection

but I cannot launch dreamview with scripts/dreamview.sh

Also, I just got done reinstalling Ubunutu, and also used the guide that you linked about running perception module locally.

but before reinstall I was also having issues with getting demo 2.5 rosbag to play and get the camera picture to show up

interesting on the last fresh install of ubunutu before this one ... (there has been many) I was able to get nvidia smi working inside of the docker container and outside... with 375.39 I think... and without the sock refused errors.

this time, I got nvidia smi working inside and outside of the docker container with 384.130... but now the sock refused errors when trying to launch bootstrap.sh...

snuffysasa avatar Jul 07 '18 00:07 snuffysasa

@balazon I met the same problem like yours. I cannot run dreamview successfully by "bash scripts/bootstrap.sh". However I can run dreamview successfully "bash scripts/dreamview.sh".

You mention that "But the full perception is probably not working properly when playing back the demo 2.5 rosbag (for eg. I have no camera picture on top-left side)". If you just want to see the camera view, you can try to play other rosbag(apollo_2.0_camera_sample.bag).

And I still need a solution to resolve the "unix:///tmp/supervisor.sock refused connection" problem. Any suggestions are welcome.

simon750324 avatar Jul 23 '18 09:07 simon750324

Well you can avoid this issue by not using sock files. Remove [unix_http_server] section and use this combo:

[inet_http_server]
port:9007
[supervisorctl]
serverurl=http://127.0.0.1:9007

artyfarty avatar Jul 26 '18 16:07 artyfarty

@artyfarty Thanks, it works.

simon750324 avatar Aug 03 '18 09:08 simon750324

I also meet the issues " unix:///tmp/supervisor.sock refused connection" these few days, after rebuild some modules , when running command 'bash scripts/bootstrap.sh' , this issue come up, but we can ignore this error, and run command ' bash scripts/dreamview.sh ' to launch the dreamview to go on to next step

wfgsy101 avatar Aug 03 '18 12:08 wfgsy101

@wfgsy101 You can try @artyfarty 's suggestion to use "inet_http_server" instead of "unix_http_server".

simon750324 avatar Aug 06 '18 02:08 simon750324

Supervisor is not a good way for development. In recent change (https://github.com/ApolloAuto/apollo/commit/67fad1f572b3f1973b695af5bab093546ee7fa0d), I have removed it from debugging mode. However, if you are using Apollo for some production scenarios, Supervisor could provide a second chance to recover the modules, which makes the more robust. Pass "--prod_mode" when starting dreamview for such use case.

xiaoxq avatar Aug 07 '18 18:08 xiaoxq