Export view to excel: Internal Server error (Seahub API port)

Problem: When I try to export a view to Excel, there is an immediate error “internal server error” when clicking on the link.

Internally, I have this log file error:

2023-03-30 16:31:04,686 [ERROR] django.request:224 log_response Internal Server Error: /api/v2.1/workspace/2/dtable/OZG-Controlling/convert-view-to-excel/
2023-03-30 16:43:11,289 [ERROR] seahub.api2.endpoints.dtable_excel:88 get convert view to excel task error: HTTPConnectionPool(host='127.0.0.1', port=6000): Max retries exceeded with url: /convert-view-to-excel?dtable_uuid=[***_ALL_IDS_DELETETD_FOR_PRIVACY_***] (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1f49345b20>: Failed to establish a new connection: [Errno 111] Connection refused'))

“Connection refused” is understandable, because there is nothing running on port 6000. Seatable is running on Port 5000, the storage server on 6666 etc. (the default ports). Should there be the internal API running on port 6000?

In /opt/seatable/seatable-server-latest/dtable-web/seahub/settings.py, I can see that this URL is explicitly set like this

DTABLE_EVENTS_IO_SERVER_URL = 'http://127.0.0.1:6000'

So what should be running on port 6000? Or should this be port 6666?

SOLVED!

For anyonewho has the same (stupid) problem, here’s the explanation:

  • When tinkering with LDAP, I added an LDAP-SYNC section to dtable-events.conf
  • I copied an entry from somewhere
[LDAP_SYNC]
enabled = true
sync_interval = 360  # The unit is seconds
  • In the format used, the remark in the last line is syntactically wrong
  • The int value could not be parsed, so the dtable-events-task stopped with the error in dtable-events.log
Traceback (most recent call last):
  File "main.py", line 45, in <module>
    main()
  File "main.py", line 34, in main
    app = App(config, task_mode)
  File "/opt/seatable/seatable-server-latest/dtable-events/dtable_events/app/app.py", line 47, in __init__
    self._ldap_syncer = LDAPSyncer(config)
  File "/opt/seatable/seatable-server-latest/dtable-events/dtable_events/tasks/ldap_syncer.py", line 17, in __init__
    self._prepara_config(config)
  File "/opt/seatable/seatable-server-latest/dtable-events/dtable_events/tasks/ldap_syncer.py", line 35, in _prepara_config
    self._interval = parse_interval(interval, 60*60)
  File "/opt/seatable/seatable-server-latest/dtable-events/dtable_events/utils/__init__.py", line 72, in parse_interval
    val = int(interval.rstrip('smhd')) * unit
ValueError: invalid literal for int() with base 10: '360  # the unit is secon'

Thus the dtable-events-task was not running on Port 6000. Fixed it, works.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.