Skip to content

Possible problems and troubleshooting methods


failed to read expected number of bytes: unexpected EOF

The error is related to the Docker registry. This issue was fixed in GitFlic software version 3.3.0.

If you encounter this error in GitFlic software version 3.3.0 or higher, use the CLI included with the GitFlic software distribution. More information about the gitflic-cli software is available on this page.

1. Extract the GitFlic software archive to any convenient directory

unzip gitflic_3.3.0_free.zip

2. Go to the cli directory inside the extracted 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
#Например, ./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 fix docker manifest command and wait for it to complete.

7. After successful completion, exit the application with the ctrl+c key combination.

psql: error obtaining MAC configuration for user

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

To resolve it, check whether the user who starts the DBMS (postgres by default) has the required read and execute permissions for the necessary directories.

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

Entry in the output: user:postgres:r-x

If this entry is not present in the output, set the required 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 remains

Set valid confidentiality levels for the user according to the official instruction

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

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

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

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 information 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, specify the path to these files in **application.properties** in the gitflic.vault.cert.privateKey and gitflic.vault.cert.publicKey parameters

org.springframework.dao.InvalidDataAccessResourceUsageException

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

First, diagnose the standard_conforming_strings parameter in the exact database and under the PostgreSQL user used by the application.

Run the following commands in the database console:

show standard_conforming_strings;

select current_setting('standard_conforming_strings');

The expected response for both commands is on.

To determine the source from which the parameter value is defined, run 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 inside the session.

To manage activation of the function through the configuration file, determine where it is located in the system. You can find this out using the commands:

show config_file;
show data_directory;

The response will contain the exact postgresql.conf used by this PostgreSQL instance.

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

standard_conforming_strings = on

After changing the configuration, apply it:

select pg_reload_conf();

Or restart PostgreSQL if this is required by the operating regulations. After that, restart GitFlic.

Error: LinkageError occurred while loading main class org.springframework.boot.loader.launch.JarLauncher

Application version 5.0.0 and higher fails to start with the error:

Error: LinkageError occurred while loading main class org.springframework.boot.loader.launch.JarLauncher
    java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/launch/JarLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

Solution: The minimum Java version required for operation has been raised to version 17. Update Java to version 17 and try starting again. More information is available in the update guide at the link

The agent does not execute jobs because of an access error to the ./helper.sh file on MacOS

Check the file properties with the ls -la@ ./helper.sh or xattr -l ./helper.sh command. If the response contains com.apple.quarantine, remove the file from quarantine with the xattr -d com.apple.quarantine ./helper.sh command. Check the changed file property with ls -la@ ./helper.sh; it should change to com.apple.provenance.

After that, you can start the Agent and check job execution with java -jar runner.jar start.

Automated translation!

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