Projects tigase _server server-core Issues #716
DSL config issues (#716)
Closed
wojciech.kapcia@tigase.net opened 8 years ago
Due Date
2016-09-29
  • it seems to be limited to etc/init.properties (hardcoded?!) and ignores properties configuration files passed as a parameter (currently up to 7.1.x it is possible to have multiple files)

  • as a result of the above, it creates etc/init.properties.new even though we may have configured different file

wojciech.kapcia@tigase.net commented 8 years ago

Somewhat related - I just encountered it today. During second start of Tigase:

2016-09-23 15:02:44.283 [main]             ConfigHolder.loadConfiguration()   SEVERE:   could not replace configuration file with file in DSL format
java.nio.file.FileAlreadyExistsException: etc/init.properties.old
	at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:429)
	at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
Andrzej Wójcik (Tigase) commented 8 years ago

I removed any existing hardcoded references to etc/init.properties file with exception of one used when there is no --properties-file parameter.

I also added code to remove existing old file if one exists and to I'm using name of config file passed as parameter with .old suffix as a backup file for converted configuration.

+Note:+ It is possible to pass more than one property file as config file in Tigase XMPP Server 7.1.0 and earlier. Now however it is not supported in Tigase XMPP Server 7.2.0-SNAPSHOT, so configuration will be loaded from multiple property files, converted to DSL and store under name of first configuration file.

wojciech.kapcia@tigase.net commented 8 years ago

Andrzej Wójcik wrote:

I removed any existing hardcoded references to etc/init.properties file with exception of one used when there is no --properties-file parameter.

Works correctly now.

I also added code to remove existing old file if one exists and to I'm using name of config file passed as parameter with .old suffix as a backup file for converted configuration.

This works as well. However:

  • I would add a log entry to the tigase-console.log file that such conversion was performed, what was changed and where files were moved;

  • I'm not sure if in-place replacing is good - I would lean towards saving converted configuration to @.new@, leave old file as-is (and also print log entry with information).

Andrzej Wójcik (Tigase) commented 8 years ago

I added warning message

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
4565
Version
tigase-server-8.0.0
Spent time
8h 45m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#716
Please wait...
Page is in error, reload to recover