Spark don't read settings from spark.propertis

Hi,

Spark don’t read some settings from spark.propertis file.

I set this settings in file by GPO bat file, looks like this:

@echo off

SET SERVER=srv.domain

IF EXIST “%appdata%\Spark\spark.properties” GOTO END

:PROFILE

ECHO.

mkdir “%appdata%\Spark”

*SET SPARKPREFS="%appdata%\Spark\spark.properties" *

ECHO #Spark Settings >> %SPARKPREFS%

ECHO # %DATE% %TIME% >> %SPARKPREFS%

ECHO server=%SERVER% >> %SPARKPREFS%

ECHO username=%USERNAME% >> %SPARKPREFS%

ECHO startOnStartup=true >> %SPARKPREFS%

ECHO autoLoginEnabled=true >> %SPARKPREFS%

ECHO ssoEnabled=true >> %SPARKPREFS%

ECHO ssoMethod=file >> %SPARKPREFS%

ECHO showHistory=true >> %SPARKPREFS%

ECHO chatNotificationOn=true >> %SPARKPREFS%

ECHO timeDisplayed=true >> %SPARKPREFS%

ECHO showEmptyGroups=true >> %SPARKPREFS%

ECHO showOfflineUsers=true >> %SPARKPREFS%

ECHO offlineGroupVisible=false >> %SPARKPREFS%

:END

Spark don’t read this setings:

ssoEnable, ssoMethod, autoLoginEnable, why?

Please help.

Regards

Robert

Compare the resulting spark.properties file to one created manually by selecting settings. Maybe this script adds something additionally.

I create manually settings. Compare file spark.propertis created manualy with file created by my script nad my script don’t adds something additionally.

I noticed something else, when I set file spark.propertis with my script, on log on spark windows I sometimes can’t get to advancet setings.

Any ideas?

There may be something additional, which can’t be seen on a glance (like different blank space or break row symbols). Can you attach an example of your generated spark.properties file here? Obviously without any personal information.

Hi,

Stupid question, how I can attach file?

OK, some information about my adventure with OpenFire and Spark.

I run OpenFire on CentOS7 deploy Spar by gpo with no problem. My users log on to Spark with password, but my CO wont to users log on to Spark with SSO.

This is my history with SSO: https://community.igniterealtime.org/thread/57515, finally its work.

Now I must change spark.properties in my environment and my script looks like that:

@echo off

SET SERVER=srv.domain

IF EXIST “%appdata%\Spark\spark.properties” GOTO DELPROF

:PROFILE

ECHO.

mkdir “%appdata%\Spark”

*SET SPARKPREFS="%appdata%\Spark\spark.properties" *

ECHO #Spark Settings >> %SPARKPREFS%

ECHO # %DATE% %TIME% >> %SPARKPREFS%

ECHO compressionOn=false >> %SPARKPREFS%

ECHO offlineGroupVisible=true >> %SPARKPREFS%

ECHO useVersionAsResource=false >> %SPARKPREFS%

ECHO username=%username% >> %SPARKPREFS%

ECHO hostAndPort=false >> %SPARKPREFS%

ECHO autoLoginEnabled=true >> %SPARKPREFS%

ECHO timeout=10 >> %SPARKPREFS%

ECHO useHostnameAsResource=false >> %SPARKPREFS%

ECHO debuggerEnabled=false >> %SPARKPREFS%

ECHO showEmptyGroups=true >> %SPARKPREFS%

ECHO loginAsInvisibleEnabled=false >> %SPARKPREFS%

ECHO proxyEnabled=false >> %SPARKPREFS%

ECHO showOfflineUsers=true >> %SPARKPREFS%

ECHO server=%SERVER% >> %SPARKPREFS%

ECHO ssoMethod=file >> %SPARKPREFS%

ECHO pkiEnabled=false >> %SPARKPREFS%

ECHO sslEnabled=false >> %SPARKPREFS%

ECHO ssoEnabled=true >> %SPARKPREFS%

ECHO passwordSaved=true >> %SPARKPREFS%

ECHO pkiStore=JKS >> %SPARKPREFS%

:DELPROF

DEL /F /Q “%appdata%\Spark”

mkdir “%appdata%\Spark”

*SET SPARKPREFS="%appdata%\Spark\spark.properties" *

ECHO #Spark Settings >> %SPARKPREFS%

ECHO # %DATE% %TIME% >> %SPARKPREFS%

ECHO compressionOn=false >> %SPARKPREFS%

ECHO offlineGroupVisible=true >> %SPARKPREFS%

ECHO useVersionAsResource=false >> %SPARKPREFS%

ECHO username=%username% >> %SPARKPREFS%

ECHO hostAndPort=false >> %SPARKPREFS%

ECHO autoLoginEnabled=true >> %SPARKPREFS%

ECHO timeout=10 >> %SPARKPREFS%

ECHO useHostnameAsResource=false >> %SPARKPREFS%

ECHO debuggerEnabled=false >> %SPARKPREFS%

ECHO showEmptyGroups=true >> %SPARKPREFS%

ECHO loginAsInvisibleEnabled=false >> %SPARKPREFS%

ECHO proxyEnabled=false >> %SPARKPREFS%

ECHO showOfflineUsers=true >> %SPARKPREFS%

ECHO server=%SERVER% >> %SPARKPREFS%

ECHO ssoMethod=file >> %SPARKPREFS%

ECHO pkiEnabled=false >> %SPARKPREFS%

ECHO sslEnabled=false >> %SPARKPREFS%

ECHO ssoEnabled=true >> %SPARKPREFS%

ECHO passwordSaved=true >> %SPARKPREFS%

ECHO pkiStore=JKS >> %SPARKPREFS%

*:END
*

OK, now I have problem with force spark to switch to use SSO.

I am waiting for info how to attach file.

Regards

Robert

After pressing Reply, press “Use advanced editor” in the top right. Then you will find “Attach” link below.

Thank you for help.

spark.properties in Attachment.
spark.properties.zip (411 Bytes)

What i see, is that every line in your file has a 3 spaces at the end. There is no spaces at the end of the lines in a normal spark.properties file. This might be the cause of your issue.

Try adding the lines like that:

echo something>>%something%

Thank you for the tip of the spaces. I solved the problem.