BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AllanBowe
Barite | Level 11

Following the guidance in the SAS® Viya® 3.5 Administration: Configuration Properties guide to increase the timeout of the SAS Viya web applications, I created a global config in the `server` definition with the name / value pair:  

 

servlet.session.timeout: 3600

 

Ie0so2m

 

The documentation states that the global option can be used, eg here:

 

To specify the time-out interval for all applications, do not change the default value of Global in the Services field.

However - when restarting the services, a number of errors are thrown, the first one being:

 

WARNING: sas-viya-authorization-default has been started and died 4 times.  It will not be restarted.  

 

When I check the log under `/opt/sas/viya/config/var/log/authorization/default` I see:

Failed to bind properties under 'server.servlet.session.timeout' to java.time.Duration

 

aflNsrc

 

 

Now, I cannot open Environment Manager, nor any of the web apps (StudioV, JobExecution, SASDrive).  Is there any way to undo this change?

 

This stackoverflow post implies that it could be related to a space after the value.  I tried searching for a "bootstrapProperties-config" folder but nothing came up.

 

I also ran:

AllanBowe_0-1604844714537.png

Which returned:

yUpKww9

 

It would appear that this configuration change cannot be made through the filesystem.   I tried using the `sas-adm` CLI (configuration plugin) but I was not able to run `sas-admin auth login` - presumably for the same reason I cannot log into the web apps.  

 

When logging into the web apps I get:

> The system could not obtain group memberships for {myusername}

 

Most worryingly, down on page 71 of the aforementioned documentation, the below is mentioned.  This should probably be right up there on page 5 where the instructions are listed! 

> When adding a property, be extremely careful. Entering the wrong property name or an invalid data type can cause SAS Viya to become inoperable.

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
1 ACCEPTED SOLUTION

Accepted Solutions
CarmineVerrell
SAS Employee

Hi Allan,

   Please see below....  

 

1. at some point the wrong property was introduced:

    Property: server.servlet.session.timeout
    Value: 42000
    Origin: "server.servlet.session.timeout" from property source "bootstrapProperties-config/application/"
    Reason: failed to convert java.lang.String to @org.springframework.boot.convert.DurationUnit java.time.Duration


It should _not_ be:

     server.servlet.session.timeout


Instead, the property should be this without the "server" prefix:

     servlet.session.timeout



To remove server.servlet.session.timeout now, you can use sas-bootstrap-config as shown:
 
1. Set the env vars needed for sas-bootstrap-config with these commands:
source /opt/sas/viya/config/consul.conf
export CONSUL_HTTP_TOKEN=$(sudo cat /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/client.token)
 
2. Run sas-bootstrap-config and grep for the problem property  
/opt/sas/viya/home/bin/sas-bootstrap-config kv read --recurse config | grep "server.servlet.session.timeout"
 
3.  Based on the output returned, delete the key returned in #2
/opt/sas/viya/home/bin/sas-bootstrap-config kv delete --site-default <key>
 
So if #2 returned
config/example1/example2/server.servlet.session.timeout=14400
 
Use the key to the left of '=', e.g.,
/opt/sas/viya/home/bin/sas-bootstrap-config kv delete --site-default config/example1/example2/server.servlet.session.timeout
 
You can check it's gone by rerunning #2 again.
 
After this, restart Viya services following: https://go.documentation.sas.com/?cdcId=calcdc&cdcVersion=3.5&docsetId=calchkadm&docsetTarget=n00003...
 

View solution in original post

5 REPLIES 5
CarmineVerrell
SAS Employee

Hi Allan,

   Please see below....  

 

1. at some point the wrong property was introduced:

    Property: server.servlet.session.timeout
    Value: 42000
    Origin: "server.servlet.session.timeout" from property source "bootstrapProperties-config/application/"
    Reason: failed to convert java.lang.String to @org.springframework.boot.convert.DurationUnit java.time.Duration


It should _not_ be:

     server.servlet.session.timeout


Instead, the property should be this without the "server" prefix:

     servlet.session.timeout



To remove server.servlet.session.timeout now, you can use sas-bootstrap-config as shown:
 
1. Set the env vars needed for sas-bootstrap-config with these commands:
source /opt/sas/viya/config/consul.conf
export CONSUL_HTTP_TOKEN=$(sudo cat /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/client.token)
 
2. Run sas-bootstrap-config and grep for the problem property  
/opt/sas/viya/home/bin/sas-bootstrap-config kv read --recurse config | grep "server.servlet.session.timeout"
 
3.  Based on the output returned, delete the key returned in #2
/opt/sas/viya/home/bin/sas-bootstrap-config kv delete --site-default <key>
 
So if #2 returned
config/example1/example2/server.servlet.session.timeout=14400
 
Use the key to the left of '=', e.g.,
/opt/sas/viya/home/bin/sas-bootstrap-config kv delete --site-default config/example1/example2/server.servlet.session.timeout
 
You can check it's gone by rerunning #2 again.
 
After this, restart Viya services following: https://go.documentation.sas.com/?cdcId=calcdc&cdcVersion=3.5&docsetId=calchkadm&docsetTarget=n00003...
 

AllanBowe
Barite | Level 11

Hi Carmine - thanks for the fast and detailed response.  

I followed the steps you described, here are the results:

AllanBowe_0-1604908360370.png

 

I dug into this command a little more and found this extract (so was definitely submitted without a trailing space):

Xj8GxKT

 

I also tried `sas-bootstrap-config kv delete` without the `--site=default`.  I then tried to see if I could modify the value - and running _without_ the force flag threw up an interesting (connection refused) message.  Does this hold any clues?  
EqBcIPb

Any further tips?  I'm 100% certain that I originally typed it in without the server prefix, mainly because right after making the config change, I started getting login issues.

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
AllanBowe
Barite | Level 11

The issue is now fixed

 

I believe the problem was that it needed to run as sudo, however when I prefixed with sudo, the exported consul value was not available.

I ran `sudu su`, re-exported the consul token, and the command worked (I ran without `--site=default` as advised by Hywel from SAS UK).  

 

Thanks very much!!

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
liourik
Calcite | Level 5

I have a similar issue after changing "servlet.session.timeout" value on the "definitions -> server" page.

 

Getting the following response when starting services:

WARNING: sas-viya-authorization-default has been started and died 4 times. It will not be restarted.
Other services may fail to start due to this. Check logs, remedy the problem and try again.
WARNING: sas-viya-identities-default has been started and died 4 times. It will not be restarted.
Other services may fail to start due to this. Check logs, remedy the problem and try again.

 

The sas-bootstrap-config command returns:

[root@opcgg100000322 ~]# /opt/sas/viya/home/bin/sas-bootstrap-config kv read --recurse config | grep "servlet.session.timeout"
config/application/server/servlet.session.timeout=10800

 

However, the following delete command did not work:

[root@opcgg100000322 ~]# /opt/sas/viya/home/bin/sas-bootstrap-config kv delete --site-default config/application/server/servlet.session.timeout=10800

 

So, unfortunately, this approach did not work for me.

Any ideas?

BTW, I could not find any documentation on using sas-bootstrap-config for deleting configuration entries.  

 

 

 

The full content

gwootton
SAS Super FREQ
The kv delete command doesn't require a value, only the key. For example:

/opt/sas/viya/home/bin/sas-bootstrap-config kv delete config/application/server/servlet.session.timeout

Typically these failures are because a unit is expected and not provided, e.g. 10800s instead of 10800.

https://stackoverflow.com/questions/40974955/spring-boot-java-config-set-session-timeout
--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 4419 views
  • 2 likes
  • 4 in conversation