Difference between revisions of "Known issues"

From TempusServa wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 57: Line 57:
=== MySQL ===
=== MySQL ===


===== Invalid default value for 'CreatedAt': 0000-00-00 =====
===== Error migrating from 5.x to 8.x =====
 
Error messages
* ORDER BY clause is not in SELECT list, references column ... ([[https://stackoverflow.com/questions/36829911/how-to-resolve-order-by-clause-is-not-in-select-list-caused-mysql-5-7-with-sel|learn more]])
* Invalid default value for 'CreatedAt' ([[https://stackoverflow.com/questions/36374335/error-in-mysql-when-setting-default-value-for-date-or-datetime|learn more]])
 
The default SQL modeis causing trouble:
* ONLY_FULL_GROUP_BY (prevent order on fields not selected)
* STRICT_TRANS_TABLES (prevent default date values)
* NO_AUTO_VALUE_ON_ZERO (allow default date values)


Temporary fix  
Temporary fix  


   SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'STRICT_TRANS_TABLES',''));
   SET GLOBAL sql_mode='NO_AUTO_VALUE_ON_ZERO';


Or set it in the configuration file  
Permanent fix
Set it in the configuration file  
# Open my.ini
# Open my.ini
# Look for sql_mode
# Replace sql_mode definition with
# Remove STRICT_TRANS_TABLES
 
  sql_mode="NO_AUTO_VALUE_ON_ZERO"
 
===== Driver for +8.4 not being used =====
Make sure that the 8.4 driver is present in
* TOMCAT\lib
* TOMCAT\webapps\XXX\WEB-INF\lib
 
In the application context file: TOMCAT\conf\Catalina\localhost\XXX.xml
 
  driverClassName=com.mysql.jdbc.Driver
 
Should be changed to (simply add '.cj')


Read more [[https://stackoverflow.com/questions/36374335/error-in-mysql-when-setting-default-value-for-date-or-datetime|here]]
  driverClassName=com.mysql.'''cj.'''jdbc.Driver


===== ORDER BY clause is not in SELECT list, references column ... =====
==== Import timeouts ====
Sometimes large blobs will cause timeouts when running the mysql tool


Temporary fix
* Create a config file with (example import.cnf)


  SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
[mysqld]
max_allowed_packet=1024M
innodb_lock_wait_timeout=3600
net_read_timeout=3600
net_write_timeout=3600
wait_timeout=3600
innodb_log_file_size=2048M
innodb_log_buffer_size=2048M
bulk_insert_buffer_size=1024M


Or set it in the configuration file
* Then a parameter in the import --
# Open my.ini
# Look for sql_mode
# Remove ONLY_FULL_GROUP_BY


Read more [[https://stackoverflow.com/questions/36829911/how-to-resolve-order-by-clause-is-not-in-select-list-caused-mysql-5-7-with-sel|here]]
  mysql.exe --defaults-file=import.cnf ...


===== Unable to restart services =====
===== Unable to restart services =====
Line 124: Line 152:
  done
  done


==== Invalid default value ====
==== Encoding problems with SQL dumps ====
Situation arises when moving SQL data from version 5+ to version 8+
If it is caused by special characters (æøå) in the sql files
 
If it is caused by special characters (æøå) in the value


# Open the .sql file in Notepad++
# Open the .sql file in Notepad++
# Set encoding to ANSI
# Set encoding to ANSI
# Save
# Save
If it is caused by date zero default values (0000-00-00 00:00:00). From a console disable the STRICTMODE.
  SET GLOBAL sql_mode = "";
If it is caused by datetime defaults being CURRENT_TIMESTAMP
# Open SQL file
# Search / replace
#* DEFAULT CURRENT_TIMESTAMP
#* DEFAULT '0000-00-00 00:00:00'
Edit the SQL files and these lines at the top
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; it is caused by
  SET time_zone = "+00:00";


=== Tomcat ===
=== Tomcat ===

Latest revision as of 12:31, 7 January 2025

The following list describes wellknown issues in Tempus Serva.

Frontend

Certain texts result in error when saving

When saving you get an error that looks like this

 Incorrect string value: '\xC2\x94s\xC3

Your database is in legacy format and needs updating

 main?command=dk.p2e.blanket.codeunit.common.PageConvertDatabaseToUTF8
Special characters are not displayed correctly

You might be using an older version of the database that is not using UTF8. This can bo corrected by running this codeunit:

 main?command=dk.p2e.blanket.codeunit.common.PageConvertDatabaseToUTF8
Media files sometimes dont display after a boot

Media files are stored temporaryly within the web application when requested. Depending of the speed of the underlying filesystem, they will not allways be available for the server right away.

  • Workaround: Reload the page (F5)
  • Resolution: Tweak the configuration parameter mediaFilterDelayMS
Upload of files fails after server restart

Sometimes tempoarray folders are not reestablished after the server boots

  • Frontend: Personal menu > Services > Rebuild folders
  • Backend: Modules > Admin services
An error has occured

Sometimes lowlevel tampering with field configuration, or force changing field types will result in this error.

  • Workaround: Deploy solution
  • Resolution
    1. Check which field fails: Modules > Event viewer
    2. Delete field and create again

Designer

References not fixed during restore where components need renaming (solution/bundles)

Workaround: Correct all parent/child references manually and redeploy solution

Solution configurations cannot be set to an empty value

Workaround: Set value to single whitespace " ".

Old backups from other solutions found in list of backups

When deleting solutions the Designer does not delete corresponding backups (saftety reasons).

In the future a list will be implemented to browse older backups, but untill hen you should just ignore this issue.

Engine

No unfixed issues

Conatainer specific

MySQL

Error migrating from 5.x to 8.x

Error messages

  • ORDER BY clause is not in SELECT list, references column ... ([more])
  • Invalid default value for 'CreatedAt' ([more])

The default SQL modeis causing trouble:

  • ONLY_FULL_GROUP_BY (prevent order on fields not selected)
  • STRICT_TRANS_TABLES (prevent default date values)
  • NO_AUTO_VALUE_ON_ZERO (allow default date values)

Temporary fix

 SET GLOBAL sql_mode='NO_AUTO_VALUE_ON_ZERO';

Permanent fix Set it in the configuration file

  1. Open my.ini
  2. Replace sql_mode definition with
 sql_mode="NO_AUTO_VALUE_ON_ZERO"
Driver for +8.4 not being used

Make sure that the 8.4 driver is present in

  • TOMCAT\lib
  • TOMCAT\webapps\XXX\WEB-INF\lib

In the application context file: TOMCAT\conf\Catalina\localhost\XXX.xml

  driverClassName=com.mysql.jdbc.Driver

Should be changed to (simply add '.cj')

  driverClassName=com.mysql.cj.jdbc.Driver

Import timeouts

Sometimes large blobs will cause timeouts when running the mysql tool

  • Create a config file with (example import.cnf)
[mysqld]
max_allowed_packet=1024M
innodb_lock_wait_timeout=3600
net_read_timeout=3600
net_write_timeout=3600
wait_timeout=3600
innodb_log_file_size=2048M
innodb_log_buffer_size=2048M
bulk_insert_buffer_size=1024M
  • Then a parameter in the import --
 mysql.exe --defaults-file=import.cnf ... 
Unable to restart services

Kille the underlying processes for both webserver and database

sudo killall -KILL mysqld_safe mysqld

If you cannot start MySQL again try removing the logfiles

sudo mv /mnt/sda/mysql/ib_logfile0 /mnt/sda/backup/
sudo mv /mnt/sda/mysql/ib_logfile1 /mnt/sda/backup/
sudo mv /mnt/sda/mysql/ibdata1 /mnt/sda/backup/

In some cases DB table repairs are needed

nano /etc/my.cnf

Add the line

innodb_force_recovery = 1

Recover data from backup

Create a restore script

 sudo nano ./restoreall.sh
 chmod 777 ./restoreall.sh

Add the following

APP="ts"

for sql_file in `ls /mnt/sda/backup/rsync/${APP}base_*.sql`;
do mysql -uroot -pPASSWORD ${APP}base < $sql_file ;
done

for sql_file in `ls /mnt/sda/backup/rsync/${APP}live_*.sql`;
do mysql -uroot -pPASSWORD ${APP}live < $sql_file ;
done

for sql_file in `ls /mnt/sda/backup/rsync/${APP}test_*.sql`;
do mysql -uroot -pPASSWORD ${APP}test < $sql_file ;
done

Encoding problems with SQL dumps

If it is caused by special characters (æøå) in the sql files

  1. Open the .sql file in Notepad++
  2. Set encoding to ANSI
  3. Save

Tomcat

Warning during server stop

Example

SEVERE: The web application [/sandbox] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

The warning is of no importance because the shutdown automatically kills all objects in memory, and no memory leaks are there possible.

JBoss

WARN errors during boot

Example

17:56:40,337 WARN [org.jboss.as.server.deployment] (MSC service thread 1-12) Class Path entry ...

The warnings are due to jar taht have their version number appended to their name. Possible fixes include stripping the names of all jar files in the /WEB-INF/lib/, but recommended solution is ignoring the warnings.