Hi Guys
I am having trouble accessing the SAS Web Applications like Stored Process, Environment Manager etcc.
And what I found while debugging is that the Web Infrastructure Platform is not Starting after restoring Backup.
and when i checked the log for it I found this error
cat webinfdsvrc-2017-05-09_080124.log
2017-05-09 08:01:24.074 CDTLOG: database system was shut down at 2017-04-20 08:29:50 CDT
2017-05-09 08:01:24.074 CDTLOG: could not open file "pg_xlog/000000010000006600000053" (log file 102, segment 83): No such file or directory
2017-05-09 08:01:24.074 CDTLOG: invalid primary checkpoint record
2017-05-09 08:01:24.074 CDTLOG: could not open file "pg_xlog/000000010000006600000053" (log file 102, segment 83): No such file or directory
2017-05-09 08:01:24.074 CDTLOG: invalid secondary checkpoint record
2017-05-09 08:01:24.074 CDTPANIC: could not locate a valid checkpoint record
2017-05-09 08:01:24.762 CDTLOG: startup process (PID 18527) was terminated by signal 6: Aborted
2017-05-09 08:01:24.762 CDTLOG: aborting startup due to startup process failure
$ cat webinfdsvrc-2017-05-06_000000.log
Any Idea what the problem might be
Hi,
a few questions:
You are working with Tech Sup on this, correct?
Since the backup might not be a good one (meaning, restore did not work 100%), you could try a pg_xlog reset.
PLEASE NOTE:
If you do go that route, do run a backup of your environment please. Also, resetting the pg_xlog might
cause some data loss. Is this a test environment? If yes, it might be a quick and save fix (try) to
reset the pg_xlog.
Steps:
(Note: Please substitute <sasconfig> with your SAS configuration directory))
1. Stop all (!!) SAS services that are running:
$ <sasconfig>/Lev1/sas.servers stop
2. Ensure there are no PostgreSQL servers still running: (Env Manager and web apps use postgres as
data store)
$ ps -ef | grep -i post
If there are any and they are SAS related, you may need to kill them.
3. Take a full backup of the <sasconfig> directory.
$ cp -rfp <sasconfig>/Lev1 /<sasconfig>/Lev1.orig
4. Set your environment to run the commands:
$ export PATH=/<SASHOME>/SASWebInfrastructurePlatformDataServer/9.4/bin:$PATH
$ export LD_LIBRARY_PATH=/<SASHOME>/SASWebInfrastructurePlatformDataServer/9.4/lib:$LD_LIBRARY_PATH
(Substituting <SASHOME> with your SAS home directory)
5. Reset the PG_XLOG
$ pg_resetxlog /<sasconfig>/Lev1/WebInfrastructurePlatformDataServer/data
Note: If pg_resetxlog complians, you may be able to force it using the -f option:
$ pg_resetxlog -f /<sasconfig>/Lev1/WebInfrastructurePlatformDataServer/data
More information about pg_restxlog can be found here:
https://www.postgresql.org/docs/9.1/static/app-pgresetxlog.html
6. Start just the WIP DS
$ /<sasconfig>/Lev1/WebInfrastructurePlatformDataServer/webinfdsvrc.sh start
7. Vacuum and reindex the WIP DS
$ psql -d SharedServices -h localhost -p 9432 -U dbmsowner
# delete from serviceticket;
# delete from ticketgrantingticket;
# truncate sas_service_url;
# delete from pg_statistic;
$ vacuumlo -h localhost -p 9432 -U dbmsowner -v SharedServices
$ psql -d SharedServices -h localhost -p 9432 -U dbmsowner -c "vacuum full verbose analyze;"
$ psql -d SharedServices -h localhost -p 9432 -U dbmsowner -c 'reindex database "SharedServices";'
$ psql -d SharedServices -h localhost -p 9432 -U dbmsowner -c 'reindex system "SharedServices";'
**NOTE** At this point you can redo the last 4 steps (vacuum, psql, psql, psql) and substitute "SharedServices"
for "EVManager"
8. Stop the WIP DS
$ /<sasconfig>/Lev1/WebInfrastructurePlatformDataServer/webinfdsvrc.sh stop
9. Restart all SAS Services and check your clients
$ <sasconfig>/Lev1/sas.servers start
Hi,
a few questions:
You are working with Tech Sup on this, correct?
Since the backup might not be a good one (meaning, restore did not work 100%), you could try a pg_xlog reset.
PLEASE NOTE:
If you do go that route, do run a backup of your environment please. Also, resetting the pg_xlog might
cause some data loss. Is this a test environment? If yes, it might be a quick and save fix (try) to
reset the pg_xlog.
Steps:
(Note: Please substitute <sasconfig> with your SAS configuration directory))
1. Stop all (!!) SAS services that are running:
$ <sasconfig>/Lev1/sas.servers stop
2. Ensure there are no PostgreSQL servers still running: (Env Manager and web apps use postgres as
data store)
$ ps -ef | grep -i post
If there are any and they are SAS related, you may need to kill them.
3. Take a full backup of the <sasconfig> directory.
$ cp -rfp <sasconfig>/Lev1 /<sasconfig>/Lev1.orig
4. Set your environment to run the commands:
$ export PATH=/<SASHOME>/SASWebInfrastructurePlatformDataServer/9.4/bin:$PATH
$ export LD_LIBRARY_PATH=/<SASHOME>/SASWebInfrastructurePlatformDataServer/9.4/lib:$LD_LIBRARY_PATH
(Substituting <SASHOME> with your SAS home directory)
5. Reset the PG_XLOG
$ pg_resetxlog /<sasconfig>/Lev1/WebInfrastructurePlatformDataServer/data
Note: If pg_resetxlog complians, you may be able to force it using the -f option:
$ pg_resetxlog -f /<sasconfig>/Lev1/WebInfrastructurePlatformDataServer/data
More information about pg_restxlog can be found here:
https://www.postgresql.org/docs/9.1/static/app-pgresetxlog.html
6. Start just the WIP DS
$ /<sasconfig>/Lev1/WebInfrastructurePlatformDataServer/webinfdsvrc.sh start
7. Vacuum and reindex the WIP DS
$ psql -d SharedServices -h localhost -p 9432 -U dbmsowner
# delete from serviceticket;
# delete from ticketgrantingticket;
# truncate sas_service_url;
# delete from pg_statistic;
$ vacuumlo -h localhost -p 9432 -U dbmsowner -v SharedServices
$ psql -d SharedServices -h localhost -p 9432 -U dbmsowner -c "vacuum full verbose analyze;"
$ psql -d SharedServices -h localhost -p 9432 -U dbmsowner -c 'reindex database "SharedServices";'
$ psql -d SharedServices -h localhost -p 9432 -U dbmsowner -c 'reindex system "SharedServices";'
**NOTE** At this point you can redo the last 4 steps (vacuum, psql, psql, psql) and substitute "SharedServices"
for "EVManager"
8. Stop the WIP DS
$ /<sasconfig>/Lev1/WebInfrastructurePlatformDataServer/webinfdsvrc.sh stop
9. Restart all SAS Services and check your clients
$ <sasconfig>/Lev1/sas.servers start
Hi Anja,
Yes i started working with Tech support yesterday
But to answer your question It was just a partial restore just the sasconfig and the sashome directory
and yesterday we found out that the web infrastructure data platform is not running so tech support suggested a restore of the data directory under there
In a way they said as it is not running it might be out of sync.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
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.