rkaczorek / astroberry-server

Astroberry Server is a ready to use system for Raspberry Pi for controlling all your astronomy equipment
GNU General Public License v3.0
274 stars 19 forks source link

[Astroberry 2.0] [SOLVED] indi-web service fails to start #46

Closed apos closed 4 years ago

apos commented 5 years ago

Hi,

I switched to astroberry 2.0 and copied my ~/.indi directory to the new installation (UPDATE: solution at the bottom). Unfortunately indi-web fails to start:

  astroberry@astroberry:~ $ sudo systemctl start indiwebmanager.service

  astroberry@astroberry:~ $ sudo systemctl status indiwebmanager.service
  indiwebmanager.service - INDI Web Manager
     Loaded: loaded (/etc/systemd/system/indiwebmanager.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2019-12-01 13:19:58 CET; 187ms ago
   Main PID: 1777 (indi-web)
      Tasks: 1 (limit: 2077)
     Memory: 2.5M
     CGroup: /system.slice/indiwebmanager.service
             └─1777 /usr/bin/python3 /usr/local/bin/indi-web -v

  Dec 01 13:19:58 astroberry systemd[1]: Started INDI Web Manager.

  astroberry@astroberry:~ $ sudo systemctl status indiwebmanager.service
  indiwebmanager.service - INDI Web Manager
     Loaded: loaded (/etc/systemd/system/indiwebmanager.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sun 2019-12-01 13:19:59 CET; 1s ago
    Process: 1777 ExecStart=/usr/local/bin/indi-web -v (code=exited, status=1/FAILURE)
   Main PID: 1777 (code=exited, status=1/FAILURE)

  astroberry@astroberry:~ $ sudo systemctl status indiwebmanager.service
   indiwebmanager.service - INDI Web Manager
     Loaded: loaded (/etc/systemd/system/indiwebmanager.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2019-12-01 13:20:04 CET; 625ms ago
   Main PID: 1803 (indi-web)
      Tasks: 2 (limit: 2077)
     Memory: 8.0M
     CGroup: /system.slice/indiwebmanager.service
             └─1803 /usr/bin/python3 /usr/local/bin/indi-web -v

  Dec 01 13:20:04 astroberry systemd[1]: Started INDI Web Manager.
  Dec 01 13:20:05 astroberry indi-web[1803]: 2019-12-01 13:20:05,189 - DEBUG: command line arguments: {'indi_port': 7624, 'port': 8624, 'host': '0.0.0.0', 'fifo': '/tmp/indiFIFO', 'conf': '/ho
  Dec 01 13:20:05 astroberry indi-web[1803]: 2019-12-01 13:20:05,211 - INFO: pkill -9 indiserver
  Dec 01 13:20:05 astroberry indi-web[1803]: 2019-12-01 13:20:05,240 - WARNING: terminating indiserver failed code 1

If I start indi-web manually I also get a lot of error messages ..

  astroberry@astroberry:~ $ cd /usr/local/bin
  astroberry@astroberry:/usr/local/bin $ ls
  indi-web
  astroberry@astroberry:/usr/local/bin $ ./indi-web -v
  2019-12-01 13:29:13,141 - DEBUG: command line arguments: {'indi_port': 7624, 'port': 8624, 'host': '0.0.0.0', 'fifo': '/tmp/indiFIFO', 'conf': '/home/astroberry/.indi', 'xmldir': '/usr/share/indi/', 'verbose': True, 'logfile': None, 'server': 'standalone'}
  2019-12-01 13:29:13,157 - INFO: pkill -9 indiserver
  2019-12-01 13:29:13,180 - WARNING: terminating indiserver failed code 1
  2019-12-01 13:29:13,184 - INFO: using Bottle as standalone server
  2019-12-01 13:29:13,269 - INFO: Deleting fifo /tmp/indiFIFO
  2019-12-01 13:29:13,282 - INFO: indiserver -p 7624 -m 100 -v -f /tmp/indiFIFO > /tmp/indiserver.log 2>&1 &
  Traceback (most recent call last):
    File "./indi-web", line 10, in <module>
      sys.exit(main())
    File "/usr/local/lib/python3.7/dist-packages/indiweb/main.py", line 315, in main
      start_profile(profile['name'])
    File "/usr/local/lib/python3.7/dist-packages/indiweb/main.py", line 99, in start_profile
      indi_server.start(info['port'], all_drivers)
    File "/usr/local/lib/python3.7/dist-packages/indiweb/indi_server.py", line 74, in start
      self.start_driver(driver)
    File "/usr/local/lib/python3.7/dist-packages/indiweb/indi_server.py", line 37, in start_driver
      cmd = 'start %s' % driver.binary
  AttributeError: 'NoneType' object has no attribute 'binary'

SOLUTION

cd ~/-indi  # this is my backup from the old astroberry
mv profiles.db profiles.db_astroberry_1_$(date +%F)

Now you can start indi-web service*** , which creates a new profile database.

https://www.indilib.org/support/tutorials/162-indi-web-manager.html https://github.com/knro/indiwebmanager

rkaczorek commented 5 years ago

This is possible. Some time ago formats in profiles.db were changed so you may be forced to start from clean profiles.db file.