1
0
-1

Hello,

I recently installed translate5 using the instructions provided on the Docker based installation page.

When creating the first project, I encountered the error : "Unknown column 'languageResource.writeSource'". You can find the full error message below, as well as the content of the files related to docker compose. I applied no significant change to the .env, docker-compose.yml and docker-compose.production.yml files.

The rest of the application works fine : I can edit the settings, add clients, language resources, ...

Full error message
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'languageResource.writeSource' in 'field list', query was: SELECT 'test - en / fr' as taskName, '{23d29a80-9805-4f61-849a-6219eee4b5cd}' as taskGuid, `languageResource`.`id` AS `languageResourceId`, `languageResource`.`langResUuid`, `languageResource`.`name`, `languageResource`.`color`, `languageResource`.`resourceId`, `languageResource`.`serviceType`, `languageResource`.`serviceName`, `languageResource`.`specificData`, `languageResource`.`timestamp`, `languageResource`.`resourceType`, `languageResource`.`writeSource`, `ta`.`id` AS `taskassocid`, `ta`.`segmentsUpdateable`, `la`.`sourceLang`, `la`.`targetlang` AS `targetLang`, IF(ta.taskGuid = '{23d29a80-9805-4f61-849a-6219eee4b5cd}','true','false') AS `checked`, IF(ta.taskGuid = '{23d29a80-9805-4f61-849a-6219eee4b5cd}',segmentsUpdateable,0) AS `segmentsUpdateable`, `cu`.`customerId` FROM `LEK_languageresources` AS `languageResource` INNER JOIN `LEK_languageresources_languages` AS `la` ON languageResource.id=la.languageResourceId LEFT JOIN `LEK_languageresources_taskassoc` AS `ta` ON ta.languageResourceId = languageResource.id AND ta.taskGuid = '{23d29a80-9805-4f61-849a-6219eee4b5cd}' INNER JOIN `LEK_languageresources_customerassoc` AS `cu` ON languageResource.id=cu.languageResourceId WHERE (la.sourceLang IN('5', '367', '368', '369', '370', '371', '372', '373', '374', '375', '376', '377', '251', '252')) AND (la.targetLang IN('253', '280', '403', '404', '405', '406', '407')) AND (languageResource.serviceType IN('editor_Services_OpenTM2', 'editor_Services_Moses', 'editor_Services_LucyLT', 'editor_Services_TermCollection', 'editor_Services_SDLLanguageCloud', 'editor_Services_Google', 'editor_Services_Microsoft', 'editor_Plugins_PangeaMt')) AND (cu.customerId='1') GROUP BY `languageResource`.`id`
.env file
CONTAINER_REGISTRY_BASE=translate5
MYSQL_USERNAME=translate5
MYSQL_PASSWORD=translate5
APP_HOST=localhost
COMPOSE_FILE=docker-compose.yml:docker-compose.production.yml
docker-compose.yml
version: '3.4'

services:
    proxy:
        image: ${CONTAINER_REGISTRY_BASE}/proxy
        depends_on:
            - php
            - frontendmessagebus

        # TODO ADD THE DESIRED PORTS / EXTRA_HOSTS IN docker-compose.production.yml and add that to .env file

    php:
        image: ${CONTAINER_REGISTRY_BASE}/translate5
        depends_on:
            - db            # configured by ENV, see below
            - languagetool  # autodiscovery in translate5 by name "languagetool", scalable with --scale
            - t5memory      # autodiscovery by service name "t5memory", scalable only behind a load balancer with consistent hash algorithm
            # termtagger: autodiscovery by service name termtagger
            #   or with multiple termtagger_N, termtagger_TYPE_N service instances
            #   where N is an integer and TYPE one of default, gui, import
            #   automatic scaling only behind a load balancer with consistent hash algorithm TODO add TBX hash to URL in T5
            #   or scaling by adding multiple instance in translate5 with above naming scheme
            #   another easier scaling solution is planned: TERMTAGGER-63
            - termtagger_1
            - termtagger_2
            - frontendmessagebus # no scaling needed, autodiscovery by name
            - okapi         # no scaling needed, autodiscovery by name
            # - pdfconverter  # scaling possible, since implemented as one long-running request
            # - visualbrowser # scaling possible, since communication happens in an opened websocket per operation, but should not be necessary
        environment:
            - TZ=Europe/Berlin
            - T5_INSTALL_DB_HOSTNAME=db
            - T5_INSTALL_DB_USERNAME=${MYSQL_USERNAME-translate5}
            - T5_INSTALL_DB_PASSWORD=${MYSQL_PASSWORD-translate5}
            - T5_INSTALL_DB_DATABASE=${MYSQL_DATABASE-translate5}
            - APP_HOST=${APP_HOST}
        # TODO CHOOSE ENTRYPOINT:
        # default entrypoint: By default translate5 is updated on restart of the container!
        # if this is not desired, change the entrypoint to just start the apache
        # entrypoint: apache2-foreground
        # entry point for running tests (on translate5-git container):
        # entrypoint: bash /var/www/run-tests.sh

    frontendmessagebus:
        image: ${CONTAINER_REGISTRY_BASE}/frontendmessagebus
        environment:
            MESSAGE_SERVER_ADDRESS: 0.0.0.0
            MESSAGE_SERVER_PORT: 9057
            SOCKET_SERVER_HOST: ${APP_HOST}
            SOCKET_SERVER_PORT: 9056

    db:
        image: mariadb
        command:
            --default-authentication-plugin=mysql_native_password
            --sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
            --character-set-server=utf8mb4
            --collation-server=utf8mb4_unicode_ci
            --innodb_ft_min_token_size=1
            --innodb_ft_enable_stopword=0
            --disable-log-bin
        environment:
            TZ: Europe/Berlin
            MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PW-r00t}
            MYSQL_USER: ${MYSQL_USERNAME-translate5}
            MYSQL_PASSWORD: ${MYSQL_PASSWORD-translate5}
            MYSQL_DATABASE: ${MYSQL_DATABASE-translate5}

    t5memory: # default port 4040
        image: ${CONTAINER_REGISTRY_BASE}/t5memory

    #
    #   termtagger naming scheme:
    #     termtagger or termtagger_N or termtagger_TYPE_N
    #     where 1 <= N <= 20 and TYPE one of default, gui, import
    #     for termtagger duplication see https://stackoverflow.com/a/71178128/1749200
    termtagger_1: &termtagger_tpl # default port 9001
        image: ${CONTAINER_REGISTRY_BASE}/opentmstermtagger

    termtagger_2:
        <<: *termtagger_tpl

    languagetool: # default port 8010
        image: ${CONTAINER_REGISTRY_BASE}/languagetool
        environment:
            #Java_Xms: 256m #start size
            Java_Xmx: 1024m #max heap space, at least 1024 for tests

    okapi: # default port 8080
        image: ${CONTAINER_REGISTRY_BASE}/okapi-longhorn
docker-compose.production.yml
version: '3.4'

##
## docker-compose production overwrites:
##
services:
    proxy:
        restart: unless-stopped
        ports:
            # EXPOSE PORT 80
            - "80:80"
        extra_hosts:
            - ${APP_HOST}:127.0.0.1
        # it may be necessary to persist single config files (with absolute paths!), example:
        #volumes:
        #    - /home/localadm/nginx-server.conf:/etc/nginx/conf.d/server.conf

    php:
        # for development: (GIT_USER / GIT_TOKEN of bitbucket must be set in .ENV then)
        # image: ${CONTAINER_REGISTRY_BASE}/translate5-git
        restart: unless-stopped
        volumes:
            - translate5-data:/var/www/translate5:cached
        # just start the apache, if no updates on restart are desired
        # DO THAT AFTER NOT BEFORE THE DEFAULT ENTRYPOINT WAS USED ONCE!
        # entrypoint: apache2-foreground

    frontendmessagebus:
        restart: always

    db:
        restart: always
        volumes:
            - translate5-db:/var/lib/mysql

    t5memory:
        restart: always
        volumes:
            - t5memory:/root/.t5memory/MEM

    termtagger_1: &termtagger_tpl
        restart: always

    termtagger_2:
        <<: *termtagger_tpl

    languagetool:
        restart: always
        environment:
            langtool_languageModel: /ngrams
            #Java_Xms: 256m #start size
            Java_Xmx: 2048m # TEST ME
            # FIXME set max mem settings!
        volumes:
            - languagetool-ngrams:/ngrams
            - languagetool-dict:/dictionaries

    okapi:
        restart: always

# ENABLE ME IF USING Visual plugin
    #pdfconverter:
        #restart: always

    #visualbrowser:
        #restart: always

volumes:
    translate5-db:
    translate5-data:
    languagetool-ngrams:
    languagetool-dict:
    t5memory:


Is there anything I can do on my side to help solve this issue ?

Thank you in advance !

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Donatien,

      thank you very much for your post!

      I guess, that there is a problem with the database somehow not being up2date with the changes-sql files.

      Since for clients and upcoming clients it is best to handle such requests in our servicedesk, I will now create an account there for you and would like to ask you to repost your question there.

      Thank you very much in advance!

      best

      Marc

        CommentAdd your comment...