Clean/fresh install not working

Hi all,

i’ve tried to install SeaTable EE several times as described here without success.

I’ve only set the domain inside the docker-compose.yml and left all other parameters untouched.
The instance starts without problems and i’m able to login.

While creating a “Base” the browser (Chrome) shows an “internal server error” and stucks.

After reloading the page, the “Base” exists but could not be opened. It results in a 502 Bad Gateway Error.

Any help would be appreciated.

Thanks
oetti

Hi @oetti.

Congrats to your own server!

Do you use a proxy infront of the SeaTable installation? Like Traefik or Nginx Proxy Manager?

No, just the nginx which comes with the installation. Just a basic installation for testing. Not even SSL.

Have a look into the developer tools of your browser. There should show up some errors of not loading pages for example. What does it say?

This happens while creating a new “base”.

debug

So it’s a server error. You should have a look into the SeaTable log files.

ok, here we go:

error.log

2022/12/10 20:15:37 [error] 38#38: *70 open() "/opt/seatable/seatable-server-latest/dtable-web/media/css/antd-mobile.min.css.map" failed (2: No such file or directory), client: 192.168.250.73 server: pm-digital.mydomain.de, request: "GET /media/css/antd-mobile.min.css.map HTTP/1.1", host: "pm-digital.mydomain.de"
2022/12/10 20:15:40 [error] 38#38: *68 open() "/opt/seatable/seatable-server-latest/dtable-web/media/css/antd-mobile.min.css.map" failed (2: No such file or directory), client: 192.168.250.73 server: pm-digital.mydomain.de, request: "GET /media/css/antd-mobile.min.css.map HTTP/1.1", host: "pm-digital.mydomain.de"
2022/12/10 20:16:16 [error] 38#38: *68 open() "/opt/seatable/seatable-server-latest/dtable-web/media/css/antd-mobile.min.css.map" failed (2: No such file or directory), client: 192.168.250.73 server: pm-digital.mydomain.de, request: "GET /media/css/antd-mobile.min.css.map HTTP/1.1", host: "pm-digital.mydomain.de"

dtable-server.error.log

2022/12/10 19:11:36 [error] 38#38: *45 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.250.73, server: pm-digital.mydomain.de, request: "GET /dtable-server/dtables/f19112ef-44d1-4cac-af2e-2ac57630b66d?lang=de HTTP/1.1", upstream: "http://127.0.0.1:5000/dtables/f19112ef-44d1-4cac-af2e-2ac57630b66d?lang=de", host: "pm-digital.mydomain.de", referrer: "http://pm-digital.mydomain.de/workspace/1/dtable/2022/"
2022/12/10 20:15:41 [error] 38#38: *68 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.250.73, server: pm-digital.mydomain.de, request: "GET /dtable-server/dtables/f19112ef-44d1-4cac-af2e-2ac57630b66d?lang=de HTTP/1.1", upstream: "http://127.0.0.1:5000/dtables/f19112ef-44d1-4cac-af2e-2ac57630b66d?lang=de", host: "pm-digital.mydomain.de", referrer: "http://pm-digital.mydomain.de/workspace/1/dtable/2022/"

That looks very strange.

Which version do you use? If you are using the latest tag, this could be a problem. The current release of SeaTable enterprise is 3.2.6 (have a look here). 3.3.7 and latest are not “released” yet. Please modify your docker-compose.yml file and switch to 3.2.6 (https://hub.docker.com/r/seatable/seatable-enterprise/tags) and install it again.

I think if you switch to the official version the database error should be gone too.

Please post your docker-compose.yml (redact your DB password).

Additionally, are you sure that you started the seatable service using this command:

docker exec -d seatable /shared/seatable/scripts/seatable.sh start

I’m using the “latest” tag. I’m going to try v3.2.6 next

Really basic, nothing special. SeaTable is service is started. double checked this.

version: '2.0'
services:
  db:
    image: mariadb:10.5
    container_name: seatable-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=***                    # Root password of MySQL -- must be changed
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /opt/seatable/mysql-data:/var/lib/mysql         # Volume of MySQL (directory for persistent storage) and mount point in container -- can be changed (not advised)
    networks:
      - seatable-net

  memcached:
    image: memcached:1.5.6
    container_name: seatable-memcached
    entrypoint: memcached -m 256
    networks:
      - seatable-net

  redis:
    image: redis:5.0.7
    container_name: seatable-redis
    networks:
      - seatable-net

  seatable:
    image: seatable/seatable-enterprise:latest
    container_name: seatable
    ports:
      - "80:80"                                         # HTTP port on the Docker host and the port in the container -- must be changed if port 80 is already in use on Docker host
      - "443:443"                                       # HTTPS port on the Docker host and the port in the container -- must be changed if port 443 is already in use on Docker host
    volumes:
      - /opt/seatable/seatable-data:/shared             # Volume of SeaTable (directory for persistent storage) and mount point in container -- can be changed (not advised)
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=***                         # Root password of MySQL -- must be changed to the value set above
      - SEATABLE_SERVER_LETSENCRYPT=False               # Decision on whether or not to use Let's Encrypt for HTTPS, default is False -- must be changed to True if a Let's Encrypt SSL certificate is to be used
      - SEATABLE_SERVER_HOSTNAME=pm-digital.mydomain.de   # Host name -- must be changed
      - TIME_ZONE=Europe/Berlin                               # Optional, default is UTC. Example: Europe/Berlin. Choices can be found here: http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
    depends_on:
      - db
      - memcached
      - redis
    networks:
      - seatable-net

networks:
  seatable-net:

Ok, your docker-compose.yml is the definition of normal :wink:

Check the paths in the config file dtable_web_settings.py. Do you see any https:// there?

Next, go to system administration in the web interface, select Settings. Do you see any https:// in the two paths shown there?

No https:// anywhere.

This is how dtable_web_settings.py looks like:

IS_PRO_VERSION = True

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'HOST': 'db',
        'PORT': '3306',
        'USER': 'root',
        'PASSWORD': '***',
        'NAME': 'dtable_db',
        'OPTIONS': {
            'charset': 'utf8mb4',
        },
    }
}

CACHES = {
    'default': {
        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
        'LOCATION': 'memcached',
    },
    'locmem': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    },
}
COMPRESS_CACHE_BACKEND = 'locmem'

SECRET_KEY = '*******'

# for dtable-server
DTABLE_PRIVATE_KEY = '*****'
DTABLE_SERVER_URL = 'http://pm-digital.mydomain.de/dtable-server/'
DTABLE_SOCKET_URL = 'http://pm-digital.mydomain.de/'

# for dtable-web
DTABLE_WEB_SERVICE_URL = 'http://pm-digital.mydomain.de/'

# for dtable-db
DTABLE_DB_URL = 'http://pm-digital.mydomain.de/dtable-db/'

# for dtable-storage-server
DTABLE_STORAGE_SERVER_URL = 'http://127.0.0.1:6666/'

NEW_DTABLE_IN_STORAGE_SERVER = True

# for seaf-server
FILE_SERVER_ROOT = 'http://pm-digital.mydomain.de/seafhttp/'

ENABLE_USER_TO_SET_NUMBER_SEPARATOR = True


PLUGINS_REPO_ID='****'

Ok, this looks all good.

Last attempt: Is there an http->https redirect configured in nginx? Can you post nginx.conf?

Sure.

upstream dtable_servers {
    server 127.0.0.1:5000;
    keepalive 15;
}

server {
    server_name pm-digital.mydomain.de;
    listen 80;



    # for letsencrypt
    location /.well-known/acme-challenge/ {
        alias /var/www/challenges/;
        try_files $uri =404;
    }

    proxy_set_header X-Forwarded-For $remote_addr;

    location / {
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
        add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
        if ($request_method = 'OPTIONS') {
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
            add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
            return 204;
        }
        proxy_pass         http://127.0.0.1:8000;
        proxy_set_header   Host $host;
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Host $server_name;
        proxy_read_timeout  1200s;

        # used for view/edit office file via Office Online Server
        client_max_body_size 0;

        access_log      /opt/nginx-logs/dtable-web.access.log seatableformat;
        error_log       /opt/nginx-logs/dtable-web.error.log;
    }

    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8082;

        client_max_body_size 0;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_request_buffering off;
        proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
        proxy_send_timeout  36000s;

        send_timeout  36000s;

        access_log      /opt/nginx-logs/seafhttp.access.log seatableformat;
        error_log       /opt/nginx-logs/seafhttp.error.log;

    }

    location /media {
        root /opt/seatable/seatable-server-latest/dtable-web;
    }

    location /socket.io {
        proxy_pass http://dtable_servers;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_redirect off;

        proxy_buffers 8 32k;
        proxy_buffer_size 64k;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        access_log      /opt/nginx-logs/socket-io.access.log seatableformat;
        error_log       /opt/nginx-logs/socket-io.error.log;

    }

    location /dtable-server {
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
        add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
        if ($request_method = 'OPTIONS') {
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
            add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
            return 204;
        }
        rewrite ^/dtable-server/(.*)$ /$1 break;
        proxy_pass         http://dtable_servers;
        proxy_redirect     off;
        proxy_set_header   Host              $host;
        proxy_set_header   X-Real-IP         $remote_addr;
        proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Host  $server_name;
        proxy_set_header   X-Forwarded-Proto $scheme;

        # used for import excel
        client_max_body_size 100m;

        access_log      /opt/nginx-logs/dtable-server.access.log seatableformat;
        error_log       /opt/nginx-logs/dtable-server.error.log;

    }

    location /dtable-db/ {
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
        add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
        if ($request_method = 'OPTIONS') {
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
            add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
            return 204;
        }
        proxy_pass         http://127.0.0.1:7777/;
        proxy_redirect     off;
        proxy_set_header   Host              $host;
        proxy_set_header   X-Real-IP         $remote_addr;
        proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Host  $server_name;
        proxy_set_header   X-Forwarded-Proto $scheme;

        access_log      /opt/nginx-logs/dtable-db.access.log seatableformat;
        error_log       /opt/nginx-logs/dtable-db.error.log;
    }

}

I’ve tried v3.2.6 and it doesn’t work. Here is what I’ve done to get a clean install. Maybe some of you finds the error in my installation.

###clean up
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
rm -rf /opt/seatable


### Install
mkdir -p /opt/seatable
cd /opt/seatable
docker pull seatable/seatable-enterprise:3.2.6
mkdir -p /opt/seatable/seatable-data/seatable
cp ~/seatable-license.txt /opt/seatable/seatable-data/seatable/
wget -O "docker-compose.yml" "https://manual.seatable.io/docker/Enterprise-Edition/docker-compose.yml"
vi docker-compose.yml
docker-compose up
docker-compose up -d
docker exec -it seatable /shared/seatable/scripts/seatable.sh start
docker exec -it seatable /shared/seatable/scripts/seatable.sh superuser

Hard to tell why it’s not working. I can offer you hands-on onto your installation via screen sharing (Discord, Jitsi, …).

I’m running my own instanz but it’s behind a nginx proxy with certs.

As I have already pointed out above: This is the wrong command.

1 Like

Argh, sometimes it is too easy and hard to see the forest for the trees.
Everything is working now as expected.

Thanks
oetti

Ok! We can consider this solved?