CWMS Server & Database Software
The CWMS Server and Database Software and their configurations are usually the responsibility of your CWMS Administrator and the notes provided in the following link were prepared for them. However, all CWMS users should have an understanding of what software is running on your servers so it always good to learn about what your CWMS Admins are dealing with.
Administrators, please review the various notes described in the section below. After you have read the release notes and you are ready to upgrade run the following
- Log into your server as the 'cwp' user or 'cwt' user (if you are using test account)
StopCWMS/CWP (if wish to be thorough can follow-up with 'ps -ef | grep java' and verify no CWMS processes remain)
cd /wm/yyy/localsoft (where 'yyy' is your 3-letter District code)
- remove existing cwms link
- rm cwms
- ln -sf /wm/wmsoft/cwms/v3.3.1.231211 cwms
- **** Before running bootCWMS and after changing the link run the following to load the new java build java8_202 needed for the security fix.
- source .bashrc
- java -version
- confim that you see (build 1.8.0_202-b08) as the java version. If you see 1.8.0_131 contact HEC
- rm $CWMS_HOME/dated/logs/caviServers/loginServer.callbacks
- BootCWMS/CWP
- checkServers
Data Exchange
If you are an active user of the data exchange engine database changes will be needed for 3.3.X update. Please contact Eric Novotny and Mike Perryman for those changes after you update.
Server Files
ProcessSHEFIT
Login server for process shefit data streams can be defined individually in the cwms.properties file. i.e if you have a datastream call CEMVP_GOES that uses processSHEFIT you can define a login server
ProcessSHEFITCEMVP_GOES.loginServer.url=//xxx.xxx.xxx.xxx:65101/LoginServer
If a login serer is not defined the data stream will grab the login server from loginServerUrl.00.
*****Make sure that loginServerUrl.00 ends with /LoginServer in the cwms.properties file i.e.
loginServerUrl.00=//xxx.xxx.xxx.xxx:65101/LoginServer
You will get an error in processSHEFIT.dy. log files stating that "ERROR //xxx.xxx.xxx.xxx:65101/ isn't an RmiLogin Server" if you do not have the LoginServer tag after the IP:Port.
Comment out any referenced to otherServerUrlXX==. where XX is a number.
If you get the following error after starting up your data stream.
11:55:32:processSHEFIT:06Jul2023 11:55:32 SEVERE: ProcessCriteria.readCriteria Error reading Criteria Record from criteria: shefit-mbrfc.list. Shef Record key is: SBDW4.QI.CZZ.0. Error is: java.sql.SQLException: Cannot create connections . There are no available connections: oracle.ucp.NoAvailableConnectionsException
please add the following to your cwms.properties file:
cwms.oracle.caching.connectionwaittimeout.seconds=60
BootCWMS, BootCWP
StartDBI is no longer needed in the startup scripts. The below can be removed or commented out.
# Start the DBI interface to Oracle
/bin/echo +++ Starting Dbi
$CWMS_EXE/bin/startDbi >> $OUTFILE 2>> $ERRFILE
StopCWMS, StopCWP
All calls to stopDBi can also be removed from the stop script. The below can be removed or commented out.
# Stop the DBI interface to Oracle
/bin/echo +++ Stoping Dbi
$CWMS_EXE/bin/stopDbi
dbi.properities
the only parameters needed in the dbi.properties file are the following
- cwms.dbi.ConnectUsingUrl=
- cwms.dbi.OfficeId=
all other properties are no longer used. You can comment them out in the file.
cwms.properties
can remove/comment out reference to validate-transform.server.url. The below text can be commented out.
###
### Location of Validation/Transforation (V/T) server
###
validate-transform.server.url=rmi://155.83.201.141:65104/ValidateTransform
USGS update ratings script
A new version of updaterating.py is needed for 3.3.0. The older version will error out. Please download the new version from
https://cwms.usace.army.mil/dokuwiki/doku.php?id=usgs_data_retrieval:updateratings
Retired Programs
cwmsdb
cwmsdb jar retired and not longer available. If you have server side scripts that use the following:
from cwmsdb import CwmsTsJdbc
replace functionality with DBAPI.
Repgen 4 (and before) deprecated
Repgen 3 and 4 are no longer included. If you still require these you can snag the binaries from a previous CWMS install while you transition. However zero support can be provided. We longer have infrastructure setup to build these. If you're desperate we can maybe provide source, but you'll be on your own.
Repgen 5
Is now included.
Report issues directly to https://github.com/MikeNeilson/repgen5
To convert repgen4 reports automatically go to https://github.com/MikeNeilson/repgen5/tree/main/converter and download the two files.
The convert itself isn't perfect but should get you 90% there.
Currently it does not handle DSS files. Support can be added but it is preferred to move away from DSS for reporting.
Warning about parameters_units.def
Scripts on the server may show warnings that include a stack trace regarding the absence of $CWMS_HOME/config/db/definitions/parameters_units.def. This file allows customized definitions on a system. Since default definitions are built into CWMS, absence of the file is not a problem (unless your office actually requires custom definitions).
INFO: Reading parameter resource file from file system: {} Apr 12, 2021 2:07:05 PM hec.data.ResourceFileParameterLoader validate
WARNING: Error reading parameter resource file input stream
java.io.FileNotFoundException: /wm/xxx/yyyyyyy/config/db/definitions/parameters_units.def (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
. . .
The ugly logging has been updated