Skip to content

Possible problems and ways to resolve them


failed to read expected number of bytes: unexpected EOF

This error is related to the operation of the Docker registry. This issue has been resolved in GitFlic software version 3.3.0.

If you encounter this error in GitFlic software version 3.3.0 or higher, you need to use the CLI included with the GitFlic software distribution. For more details on the gitflic-cli software, please refer to this page.

1. Unpack the GitFlic software archive into any convenient directory

unzip gitflic_3.3.0_free.zip

2. Navigate to the cli directory inside the unpacked archive

cd /path/to/archive/cli

3. Make the gitflic-cli.sh script executable

chmod +x ./gitflic-cli.sh

4. Run the script

./gitflic-cli.sh /path/to/gitflic/properties/application.properties
# For example, ./gitflic-cli.sh /user/admin/gitflic/default-config/application.properties

5. Wait for the script to finish starting

2024-02-22 14:36:32.630  INFO 7 --- [           main] o.s.i.channel.PublishSubscribeChannel    : Channel 'application.errorChannel' has 1 subscriber(s).
2024-02-22 14:36:32.631  INFO 7 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : started bean '_org.springframework.integration.errorLogger'
shell:>

6. Enter the command fix docker manifest and wait for it to complete.

7. After successful execution, exit the application using the key combination ctrl+c.

psql: error obtaining MAC configuration for user

This error means that the database cannot correctly determine the user's security label.

To resolve this, check whether the user running the DBMS (postgres by default) has the necessary read and execute permissions on the required directories.

sudo getfacl /etc/parsec/macdb/
sudo getfacl /etc/parsec/capdb/

The output should contain user:postgres:r-x

If this entry is not present in the output, you need to set the necessary permissions.

sudo setfacl -R -m u:postgres:rx /etc/parsec/capdb
sudo setfacl -R -m u:postgres:rx /etc/parsec/macdb

Check the result by restarting the application.

If the error persists

Set valid confidentiality levels for the user according to the official instructions.

RSA keys of the PKCS8 standard are missing. Try adding them by specifying the paths gitflic.vault.cert.privateKey and gitflic.vault.cert.publicKey in application.properties

The use of these keys is related to the operation of Vault, SAML OIDC, container signing, and token signing in CI. The fields gitflic.vault.cert.privateKey and gitflic.vault.cert.publicKey are mandatory.

If this problem occurs during an update from version 3.x.x:

You need to use the [keys-retriever.jar](https://gitflic.ru/project/gitflic/keys-retriever/blob/raw?file=keys-retriever.jar) utility to extract the key pair from the current Gitflic software installation.

More about updating from version 3.x.x

For new installations starting from version 4.x.x:

1. Create a private key using the **openssl** utility with the command: `openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048`
2. Create a public key using the **openssl** utility with the command: `openssl rsa -pubout -in private_key.pem -out public_key.pem`
3. After creating the key pair, you must specify the paths to these files in **application.properties** in the parameters gitflic.vault.cert.privateKey and gitflic.vault.cert.publicKey.

org.springframework.dao.InvalidDataAccessResourceUsageException

This error is related to the settings of the PostgreSQL being used.

First of all, it is necessary to diagnose the standard_conforming_strings parameter specifically in the database and under the PostgreSQL user that the application is using.

You need to execute the following commands in the database console:

``` show standard_conforming_strings;

select current_setting('standard_conforming_strings'); ```

Expected response for both commands: on.

To determine the source from which the parameter value is derived, execute the following command in the database console:

select 
  name,
  setting,
  source,
  sourcefile,
  sourceline,
  pending_restart
from pg_settings
where name = 'standard_conforming_strings';
  • If source = 'configuration file', the parameter is set in the PostgreSQL configuration file.
  • If source = 'database', the parameter is overridden at the database level.
  • If source = 'user', the parameter is overridden at the user/role level.
  • If source = 'client' or source = 'session', the parameter is set during connection or already within the session.

To manage the activation of the feature via the configuration file, you need to determine where it is located on the system. You can find this out using the commands:

show config_file;
show data_directory;

The response will be exactly the postgresql.conf that this PostgreSQL instance is using.

The following must be set in the configuration file being used:

standard_conforming_strings = on

After changing the configuration, you need to apply it:

select pg_reload_conf();

Or restart PostgreSQL if required by the operational regulations. After that, restart GitFlic.

Automated translation!

This page has been automatically translated. The text may contain inaccuracies.