Projects tigase _server server-core Issues #735
Tigase v7.2.0 Does not Start in Windows (#735)
Closed
Daniel Wisnewski opened 8 years ago

Tigase has the following error when trying to start v7.2.0:

2016-12-04 22:08:35.056 [WrapperSimpleAppMain] 
ConfigHolder.loadConfiguration()  SEVERE: could not replace
configuration file with file in DSL format
java.nio.file.FileSystemException: etc\init.properties ->
etc\init.properties.old: The process cannot access the file because it
is being used by another process.

    at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
    at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
    at java.nio.file.Files.move(Unknown Source)
    at tigase.conf.ConfigHolder.loadConfiguration(ConfigHolder.java:82)
    at tigase.server.Bootstrap.init(Bootstrap.java:63)
    at tigase.server.XMPPServer.start(XMPPServer.java:129)
    at tigase.server.XMPPServer.main(XMPPServer.java:111)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
    at java.lang.Thread.run(Unknown Source)

  --------------------------------------
  ERROR! Terminating the server process.
  Problem initializing the server: java.lang.RuntimeException:
java.nio.file.FileSystemException: etc\init.properties ->
etc\init.properties.old: The process cannot access the file because it
is being used by another process.

  Please fix the problem and start the server again.
java.lang.RuntimeException: java.nio.file.FileSystemException:
etc\init.properties -> etc\init.properties.old: The process cannot
access the file because it is being used by another process.

    at tigase.conf.ConfigHolder.loadConfiguration(ConfigHolder.java:86)
    at tigase.server.Bootstrap.init(Bootstrap.java:63)
    at tigase.server.XMPPServer.start(XMPPServer.java:129)
    at tigase.server.XMPPServer.main(XMPPServer.java:111)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.FileSystemException: etc\init.properties ->
etc\init.properties.old: The process cannot access the file because it
is being used by another process.

    at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
    at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
    at java.nio.file.Files.move(Unknown Source)
    at tigase.conf.ConfigHolder.loadConfiguration(ConfigHolder.java:82)
    ... 9 more

It would appear that re-writing init.properties to DSL configuration has some issues. Attached is process explorer in csv that reveals SHARING VIOLATION when attempting to re-write.

init.properties file does not seem to be converted, and init.properties.old is not created.

init.properties.CSV

Daniel Wisnewski commented 8 years ago

Some updates, this error does not occur if:

v7.1.0 is installed and setup, and 7.2.0 distribution is extracted into the same directory and then run. Although other unrelated errors occur (namely bean injection errors), the server can startup and generally run.

It seems likely that the stock configuration file causes these issues. Changing $HOST_NAME to a known variable results in the same issue, not sure where the error triggers in converting packaged configuration file.

config-type=--gen-config-def
--admins=admin@$HOST_NAME
--virt-hosts = $HOST_NAME
--debug=server

--comp-name-1=http
--comp-class-1=tigase.http.HttpMessageReceiver

http/setup/admin-credentials=admin:tigase

Again, once configuration file is setup in 7.1.0 conversion and execution is a success.

Andrzej Wójcik (Tigase) commented 8 years ago

I found issue in old block in ConfiguratorAbstract used to load old configuration format. In this code file handler was not closed properly and as I checked there is no longer issue with access to file during configuration conversion.

Daniel Wisnewski commented 8 years ago

Default configuration and custom configurations all convert successfully, error no longer shows.

Closing Issue.

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