System Profile
System Full Name | Canadian Port State Control System |
Product Owner(s) | Bill Henderson |
Business Owner | Naim Nazha |
Technology Assessment
Database Platform and Version | Oracle 18c |
Development Language and Framework | Classic ASP Javascript HTML Visual Basic 6 (COM) Fytek PDF Writer DLL |
Operating System and Version | Windows Server 2016 |
Environment Access Information
DEV
User (admin): greenj
Pass: See RDIMS #13232403
UNC: \\wwwapps2mssdev\wwwappsroot\saf-sec-sur\4\cpscs-scepc
URL: http://wwwapps2mssdev/saf-sec-sur/4/cpscs-scepc/
DB: CPSCS_EXTA@CPSCSD.WORLD, CPSCSW_USER@CPSCSD.WORLD
Web Services:
- CPSCS-INNAV web service: http://wwwappsmssdev/Saf-Sec-Sur/4/tc-cpscs-ws/service.asmx (used for internal testing only - does not communicate with INNAV)
- CPSCS-THETIS web service: http://wwwappsmssdev/saf-sec-sur/4/cpscs-ws/service.asmx (which communicates with THETIS pre-prod site - https://portal-pp.emsa.europa.eu/)
- CPSCS-APCIS web service: http://wwwappsmssdev/saf-sec-sur/4/cpscs-apcis-ws/apcisproxyws.asmx (which communicates with APCIS test site - https://apcis.tmou.org/APCIS-TEST/)
ACC
User (admin): greenj
Pass: See RDIMS #13232403
UNC: \\wwwapps2test\wwwappsroot\saf-sec-sur\4\cpscs-scepc
URL: https://wwwapps2test.tc.gc.ca/saf-sec-sur/4/cpscs-scepc/
DB: CPSCS_EXTA@CPSCSA.WORLD
Web Services:
- CPSCS-INNAV web service: https://wwwappstest/Saf-Sec-Sur/4/tc-cpscs-ws/service.asmx (used for internal testing only - does not communicate with INNAV)
- CPSCS-THETIS web service: https://wwwappstest/saf-sec-sur/4/cpscs-ws/service.asmx (which communicates with THETIS pre-prod site - https://portal-pp.emsa.europa.eu/)
- CPSCS-APCIS web service: https://wwwappstest/saf-sec-sur/4/cpscs-apcis-ws/apcisproxyws.asmx (which communicates with APCIS test site - https://apcis.tmou.org/APCIS-TEST/)
PROD
User (admin): greenj
Pass: See RDIMS #13232403
UNC: \\wwwapps2\wwwappsroot\saf-sec-sur\4\cpscs-scepc
URL: https://wwwapps2.tc.gc.ca/saf-sec-sur/4/cpscs-scepc/
LogFiles: \\ncrws554\wwwfiles\cpscs\logs
Web Services:
- CPSCS-INNAV web service: https://wwwapps.tc.gc.ca/Saf-Sec-Sur/4/tc-cpscs-ws/service.asmx (used for internal testing only - does not communicate with INNAV)
- CPSCS-THETIS web service: https://wwwapps.tc.gc.ca/saf-sec-sur/4/cpscs-ws/service.asmx (which communicates with THETIS production site - https://portal.emsa.europa.eu/)
- CPSCS-APCIS web service: https://wwwapps.tc.gc.ca/saf-sec-sur/4/cpscs-apcis-ws/apcisproxyws.asmx (which communicates with APCIS production site - https://apcis.tmou.org)
Source Code:
Dev
System
Overview
<…either point to some document or put some info / diagram here>
Good To Know
Installation of new THETIS certificate
When the THETIS certificate, issued by EMSA, is about to expire, EMSA will contact the CPSCS stakeholders to begin the process of getting a new server-side THETIS certificate created. Here are the steps required to generate and install the new certificate.
- Ask Web Group to create a valid CSR that can be sent to EMSA. This CSR is used by EMSA to generate a new certificate to allow communication with THETIS.
- Send the CSR to EMSA along with any provided forms filled out in conjunction with the CPSCS business owner.
- EMSA will create a signed digital certificate (*.pem) and send that back to the CPSCS business owners.
- Send the PEM file to the Web Group and ask them to use the PEM file to generate the PFX file.
- Using the PFX file, the certificate can be installed on the appropriate servers. Be sure to refer to "CPSCS - <NO IM> - CPSCS-THETIS web service cannot access THETIS web service" below for further instructions when installing the certificate on the server. Long story short: explicit permission must be given to the app pool requesting to use the certificate for communication with THETIS.
- Ask the Web Group to install the certificate on ACC servers (wwwappstest).
- Ask the Web Group to send us the PFX file and password so that we can install the certificate on the appropriate dev server (hosting the CPSCS-THETIS web service).
- Note: latest certificates for CPSCS-THETIS web service can be found in the following directory and subdirectories: \\tc4s0b\groups\AFCCB\MS_APPS\CPSCS\THETIS\Certificates.
Test Vessel
When performing testing, particularly in production, care must be taken to avoid corrupting or polluting the CPSCS database. Testing is generally performed using the Douglas Bay (or Douglas Bay - Test) vessel - IMO number 7411636. This vessel and its inspections are ignored in reporting - and should be ignored if you are creating new reports for the CPSCS stakeholders.
If you need an account for user testing, you should log into the CPSCS web application as an admin user (see RDIMS #13232403) to locate a test user account. When in doubt, contact the client admin to identify a good account to use for testing.
Log Files
Log files for CPSCS and its associated web services and can be found in the following locations:
- \\ncrws536\wwwfiles\cpscs-ws\logs
- \\ncrws537\wwwfiles\cpscs-ws\logs
- \\ncrws538\wwwfiles\cpscs-ws\logs
- \\ncrws536\wwwfiles\cpscs-apcis-ws\logs
- \\ncrws537\wwwfiles\cpscs-apcis-ws\logs
- \\ncrws538\wwwfiles\cpscs-apcis-ws\logs
- \\ncrws554\wwwfiles\cpscs\logs
CPSCS-INNAV web service log file directories:
- \\ncrws536\wwwfiles\tc-cpscs-ws\logs
- \\ncrws537\wwwfiles\tc-cpscs-ws\logs
- \\ncrws538\wwwfiles\tc-cpscs-ws\logs
CPSCS-VTP (Vessel Traffic Processor) log file directory:
- \\tcwebscripts\wwwfiles\cpscs\logs
- \\wwwapps2\wwwfiles\cpscs\logs
Testing: Inspection Types
When creating test inspections, it is best to stick with the following inspection types:
- Initial
- More Detailed
- Expanded
- Canadian Tanker (for tanker vessel types)
All other inspection types may result in testing issues and are not compatible with THETIS and APCIS (as of October 2019).
Testing: Operational Controls
Please note that operational controls can not be selected for Initial inspections. In addition, changing the inspection type to Initial will clear all currently selected operational controls associated with the inspection you are working with on the CPSCS web site.
How-To and Fixes
CPSCS - IM295914 - PAC - NADKARC - urgent - CPSCS Inspection creation (submission) error
Problem: Client got an error trying to submit a saved inspection:
Solution:
CPSCS - <NO IM> - CPSCS-THETIS web service cannot access THETIS web service
Problem:
On calling the thetis webservice this error is returned: [GetShipParticulars Error] Unexpected error has occured: '(5): The request was aborted: Could not create SSL/TLS secure channel.
This error was caused by 2 issues:
- The cpscs-ws.tc.gc.ca.pfx appeared to not have been properly installed, there was no key found in the C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\ on server.
- The account under which the CPSCS-Thetis web service runs IIS AppPool\CPSCS-Thetis did not have read permission on the key file above.
Solution involved deleting and reinstalling the certificate, and granting read permission to service account on all 3 servers: ncrws536, ncrws537, ncrws538:
To install certificate:
- Start - Run "mmc".
- Add snap-ins for Certificates: LocalComputer Account.
- For Local Computer Account:
- Right-click Personal - All Tasks - Import.
- Browse and select "cpscs-ws.tc.gc.ca.pfx".
- Web team will provide you the password
- Next right-click > All Tasks> Manage Private Keys
- Add 'iis apppool\cpscs-ws'
- That should be it. Test the certificate by running the web service
To grant access:
- Use elevated powershell to find the Guid key for this certificate inC:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\
- $Cert = Get-Item Cert:\LocalMachine\My\<Thumbprint of Certificate>
- $Cert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName
<Thumbprint of Certificate> can be found from MMC: Certificates(Local Computer)->Personal->Certificates->cpscs-ws.tc.gc.ca
In Certificate property window, it’s at the bottom of the Details tab
If a key is not returned, the certificate may not have been properly installed and need to be reinstalled.
- Full path to key is C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\<key returned>
- To to grant access, run following with key returned:
ICACLS <Full path to key> "IIS AppPool\CPSCS-Thetis:R"
Info from DOS:
"errNum":"0",
"errMsg":"[GetShipParticulars Success] Ok"
},
"Receipt":{
"ShipParticulars":{
"Name":{
"Value":"SLOMAN HELIOS",
"EffectDate":"2016-08-31T20:00:00-04:00",
"EffectDateSpecified":true
}
- Install Certificate in Dev LocalMachine
- Instructions located here:\\tc4s0b\groups\AFCCB\MS_APPS\CPSCS\THETIS\Certificates\March 2018
- If this certificate is not installed, you'll get: Unexpected error has occured: '(91): Object reference not set to an instance of an object. when service is called.
- It is possible for a certificate to exist in MMC console but missing a file entry in C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys
- Find certificate path using tool FindPrivateKey.exe
- Copy the tool FindPrivateKey.exe from\\tc4s0b\groups\AFCCB\MS_APPS\CPSCS\THETIS\Certificates\March 2018 to a location on Dev server
- open command prompt as administrator, navigate to location of tool.
- Run command: FindPrivateKey.exe My LocalMachine -n "MarApps Production Intermediate - SHA256" -a
- Copy and save the result: C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\ff85bd97ae6a76c3dcbc4925e3eb6ca3_518d76a8-4ded-49de-b4a9-d981cc355562
- Use ICALS to grant IIS AppPool access to the .cer file, with path:
- ICACLS C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\ff85bd97ae6a76c3dcbc4925e3eb6ca3_518d76a8-4ded-49de-b4a9-d981cc355562 /grant "IIS AppPool\CPSCS-Thetis:R"
- Confirm result: Successfully processed 1 files; Failed processing 0 files
"errNum":"-1",
"errMsg":"[GetShipParticulars Error] Unexpected error has occured: '(5): The request was aborted: Could not create SSL/TLS secure channel.'"
}
$Cert = Get-Item Cert:\LocalMachine\My\<Thumbprint of Certificate>
$Cert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName
Where <Thumbprint of Certificate> can be found from MMC: Certificates(Local Computer)->Personal->Certificates->cpscs-ws.tc.gc.ca
In Certificate property window, it’s at the bottom of the Details tab. See attached image.
If a key is not returned, the certificate may not have been properly installed.
Right click and delete it from the console. Install the certificate again. Instructions can be found here:
Once the certificate is installed, this command should be able to return a full path to the key:
FindPrivateKey.exe My LocalMachine -n "MarApps Production Intermediate - SHA256" -a
To to grant access, run following with key returned:
ICACLS <Full path to key> "IIS AppPool\CPSCS-Thetis:R"
- Install Certificate in Prod LocalMachine
- Instructions located here:\\tc4s0b\groups\AFCCB\MS_APPS\CPSCS\THETIS\Certificates\March 2018
- If this certificate is not installed, you'll get: Unexpected error has occured: '(91): Object reference not set to an instance of an object. when service is called.
- Find certificate path using tool FindPrivateKey.exe
- Copy the tool FindPrivateKey.exe from\\tc4s0b\groups\AFCCB\MS_APPS\CPSCS\THETIS\Certificates\March 2018 to a location on server
- open command prompt as administrator, navigate to location of tool.
- Run command: FindPrivateKey.exe My LocalMachine -n "MarApps Production Intermediate - SHA256" -a
- Copy and save the result: C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\ff85bd97ae6a76c3dcbc4925e3eb6ca3_518d76a8-4ded-49de-b4a9-d981cc355562
- Use ICALS to grant IIS AppPool access to the .cer file, with path:
- ICACLS C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\ff85bd97ae6a76c3dcbc4925e3eb6ca3_518d76a8-4ded-49de-b4a9-d981cc355562 /grant "IIS AppPool\CPSCS-Thetis":R
- Confirm result: Successfully processed 1 files; Failed processing 0 files
Error: Call Sign must confirm to Basic and ITU data validation standards
Problem:
On updating Vessel Tombstone page user getting error, Call Sign must confirm to Basic and ITU data validation standards, for the call sign J8QY1.
Solution:
Details from the backlog: see below for an appropriate The call sign should be formatted according to ITU Radio Regulations. The last digit for the call sign J8QY1 is "1" which is invalid as per the regulation.
THETIS Export Error: Invalid Procedure Call or argument
Problem:
While user export the inspection to THETIS its throwing error Invalid Procedure Call or argument. Issue occurs only if no deficiency has been reported in the inspection.
Solution:
This issue has been resolved by the code fix.
Here are the list of IMO with the error “Invalid Procedure call or argument “ and have no deficiencies. These were failing to export due to the code error “If i > 0 Then dictDeficiencies.Add "deficiency", dictDefs “
- 9400370 CHEMBULK JAKARTA
- 9496135 JAG RADHA
- 9748564 MICHELE FOSS
- 9846079 LA LUNA
- 9241061 QUEEN MARY 2
- 9660085 EAGLE I-STAR
- 9433274 HUMBERGRACHT
- 9590735 GLOBAL TRINITY
- 9746231 OBSIDIAN
- 9364992 CMA CGM ORFEO
- 9200419 FEDERAL ASAHI
- 9629885 RAMFORM TITAN
- 9512331 NBA MAGRITTE
- 9484493 MARIVICTORIA
- 9457024 NAVE COSMOS
- 9800051 NORDIC AMI
- 9546461 TAAGBORG
- 9740342 TRF HORTEN
CPSCS-IM287825-NCR - Tower C 10-D125 -JONESSI- CPSCS glitch - ORIENT SKY (IMO 9792022)
Problem:
- 0 of 1 inspections successfully sent to THETIS
- Inspection ID 731326: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Deficiencies: ISM deficiency 15150 - ISM but no deficiency marked as ISM Related (IMO: 9792022)
Solution:
See solution :
- 0 of 1 inspections successfully sent to THETIS
- Inspection ID 731326: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Deficiencies: ISM deficiency 15150 - ISM but no deficiency marked as ISM Related (IMO: 9792022)
CIC Questionnaire Glitch: when NO or N/A is selected as answer its not saving
Problem:
While adding new inspection if user select No or N/A as the answer of CIC Questionnaire, the info doesn't save.
Solution:
While setting up the Questionnaire, if Admin has put the spaces between the answers for the “Possible values if you selected radio buttons” then the selected option will not be populated.
- Assigned the Vessel to Inspector and add the inspection.
- Click on the CIC Performed as Yes which prompt the questionnaire which seems different than the production one.
- Login to the CPSCS Production as Admin user.
- From the Menu Select Admin
- Click on the Questionnaire Button from the left panel.
- Click on the Action button for CIC on Emergency Systems and Procedures which populate the cic questions.
- Here, the issue is with the first question. Click on modify Action Button.
- For the "Possible values if you selected radio buttons " there is a space between the answers. i.e. YES; NO; N/A
- Remove the spaces, Click Update and checked in the inspection. Now its showing the option N/A is selected.
- Because of the space the correct data was not retrieved and selection was not populated.
- Send email to the user about resolution.
APCIS Export Error A.IE.2: : Conversion failed when converting date and/or time from character string.
Problem:
The inspection could not be exported to APCIS and giving APCIS Export Error A.IE.2: Conversion failed when converting date and/or time from character string. (IMO: 9433315)<br />WARNING: Certificate code 524 is not a valid APCIS certificate.
Solution:
Typo error in Date of Issue of one of the certificates.
0 of 1 inspections successfully sent to APCIS<br /><hr width="100%">Inspection ID 731507: ERROR: APCIS Export Error A.IE.2: Conversion failed when converting date and/or time from character string. (IMO: 9433315)<br />WARNING: Certificate code 524 is not a valid APCIS certificate.
(IMO: 9433315)
- Open the cpscsfroup.vbg project form CPSCSDLL and debug through.
- Uncomment the line Call apc.InspectionExport("731507", "E") on CPSCSTest
- Update the path for logfile and set the path for local folder.
- Put the breakpoint on Function PostWebservice to stop accidentally send data to APCIS web-service.
- Get the value of strParam from the InspectionExport function
- Export to JSON. Check the JSON file for the value of Date fields.
- Found that a typo error in entering date. (CertDateOfIssue)
- Able to reach PostWebService and inspection is ready to export. Now stop debugging and check log file.
- The log file showing that some certificates are not valid APCIS certificates(See attached log file) ehich are 524,525,526,528,524,527,531 and 524.
- Login to CPSCS website and go to certificates.
- Check for the value of APCIS code and certificate title.
- SELECTsct.title_id,sct.code,sct.english_value,sct.apcis_cd APCIS_CODEFROMs_certificate_title sct,certificates cWHEREc.title_id = sct.title_idAND c.inspection_id = 731507;
- Here some APCIS_CODE are found with value n/a.
- Here are the code with value null.
THETIS Export Error: Deficiencies: value of Default Description is not valid
Problem:
The inspection could not be exported to THETIS because Deficiencies: value of Default Description is not valid (IMO:XXXXXXX)
Solution:
Date of Issue of certificate is after the Date of Inspection which cause this issue.
CPSCS :APCIS webservice Ro Related Detainable Defects Bug
Problem:
On exporting detention inspection to APCIS, its sending RO related deficiencies even though inspector has not selected RO related deficiency.
Solution:
Starting in 2016, APCIS required that ALL detainable deficiencies reported be marked as “RO related”. If inspectors do not mark the inspection as RO related in CPSCS, the upload process sets the flag automatically and uses the vessel’s recognized organization (RO) for the reported detainable deficiency.
Problem:
Client needs to update Vessel Name in CDN Tanker Inspection 2018 11 05 - CHAMPION CONTEST - IMO 9272199
Solution:
Run queries to locate, update and verify affected rows in database. Verify results on web page.
from vessel where vessel_id = 743759
from vessel where vessel_id = 743759
APCIS Export Error: APCIS asking for certificate which is not on the inspection report
Problem:
The inspection could not be exported to APCIS because APCIS asking for certificate 530 when there is no Code 530 certificate in the inspection report.
Solution:
Date of Issue of certificate is after the Date of Inspection which cause this issue.
- Login as CPSCS admin and search for IMO 9794680. From the URL get the inspection id = 729870
- SELECTsct.title_id,sct.code,sct.english_valueFROMs_certificate_title sct,certificates cWHEREc.title_id = sct.title_idAND c.inspection_id = 729870;
- The result contains certificate 530 Civil Liability for Oil Pollution Damage. Title_ID=600126
- select * from certificates where title_id = 600126 and inspection_id = 729870;
- Check the date of Inspection.
- select DATE_OF_INSPECTION from inspection where inspection_id = 729870;
- So here date of issue is after date of first visit. Lets search for the certificate where issue date is higher than date of inspection.
- SELECTc.certificate_id,c.title_id,c.date_issued,i.date_of_inspection,sct.title_id,sct.code,sct.english_valueFROMcertificates c,inspection i,s_certificate_title sctWHEREc.inspection_id = i.inspection_idAND c.date_issued > i.date_of_inspectionAND c.title_id = sct.title_idAND i.inspection_id = 729870;
- These both certificates are not showing up on the inspection report. Lets reset the date and inform the client to correct the date of certificate issue.
- update certificates set date_issued = to_date('2019-01-01','YYYY-MM-DD') where certificate_id in(904712,904713);
commit; - Now verify both the certificates are shows up in CPSCS (https://wwwapps2.tc.gc.ca/saf-sec-sur/4/cpscs-scepc).
Multiple issues, one after the other was fixed:
Problem:
- 0 of 1 inspections successfully sent to APCIS<br /><hr width="100%">Inspection ID 729507: ERROR: APCIS Export Error A.IE.2: Inspection Actions shall not be empty (IMO: 9283538)<br />WARNING: Certificate code 526 is not a valid APCIS certificate. (IMO: 9283538)
- 0 of 1 inspections successfully sent to APCIS<br /><hr width="100%">Inspection ID 729507: ERROR: APCIS Export Error A.IE.2: Invalid Deficiency Convention Code '5001' shall not according code deficiency '1209' (IMO: 9283538)
- 0 of 1 inspections successfully sent to APCIS<br /><hr width="100%">Inspection ID 729507: ERROR: APCIS Export Error A.IE.2: There are more than one certificate with code '510' (IMO: 9283538)
Solution:
Get all the deficiencies and their associated default descriptions
Solution:
CPSCS: Duplicate MMSI Numbers.
Problem:
Client want to change the MMSI number to 371518000 for vessel SALINAS, IMO 9805324. But MMSI 371518000 is already using by some other vessel.
Solution:
CPSCS: Export Error - THETIS certificates [DOS 2267]
Problem:
Client gets and invalid certificate error when exporting to THETIS:
ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Statutory Certificates: value of Issuing Authority is not valid
Solution:
THETIS export issue: THETIS Export Error T.IE.5: Deficiencies: The Convention SOLAS ch. II-1 Parts C, D, E, F is not valid for deficiency 04111- Damage control plan
Problem:
Client encounters an issue when attempting to export an inspection to THETIS. Error code T.IE.5 (convention issue).
Solution:
- Let's get the inspection ID from the CSPCS Web site and Login as Admin.
- Go to Vetting - Export Queue. Look for IMO 9397858 under THETIS heading and click on the inspection..
- Grab the inspection id from the URL. Here IID=729867
- Check all the conventions associated with inspection ID 729867:
- SELECTsdc.code DEFCODE,sdc.thetis_cd,sc.convention_id,sc.english_value Convention,sc.reference Reference,sc.thetis_cd Con_Thetis_CdFROMdeficiency d,s_deficiency_code sdc,s_convention scWHEREd.inspection_id = 729867AND d.def_code_id = sdc.def_code_idAND sc.convention_id=d.convention_id;
- For the deficiency 04111 the convention_id 2117 and THETIS_CODE=01022, Convention Detail= SOLAS ch. II-1, Reference=SOLAS CHII-1 Reg 19.
- Let's check for this code in \\tc4s0b\Groups\ MS_APPS\CPSCS\CODE EXTRACTS\THETIS\JULY 4 2019 (PROD)\Conventions.xls does the code refers to correct description.
- In the Convention table the description is The Convention SOLAS ch. II-1 Parts C, D, E, F refers to THETIS CODE 01022 .
- Now lets check the deficiency exist for thetis_code 01022.
- Select def_code_id,english_value from s_convention where thetis_cd = '01022' and def_code_id='04111';
- The result shows the there is no record found.
- The Inspection has SOLAS ch. II-1 selected. Let's check how many times this convention is used? Convention_Id=2117
- select * from deficiency where convention_id=2117;
- Result shows this convention is used two times.
- SOLAS 06 Amend / II-1 / Reg. 19 (IID=724131, Date_Created=19-02-21)
SOLAS 89/90 Amend / II-1 / Reg. 23-1 (IID=729867, Date_Created=19-08-01) - 724131 was inspected in February. Was this sent to THETIS? Yes.
- What conventions are valid for deficiency code 04111?
- Check \\tc4s0b\Groups\AFCCB\MS_APPS\CPSCS\THETIS\Paris MoU Deficiencies 01112016.pdf
- According to that document, only SOLAS ch. II-1 Parts A, A-1, B, B-1,B-2, B-3, B-4 is valid. This maps to THETIS_CODE 01021.
- def_code_id = 245 (select def_code_id from s_deficiency_code where code=04111;)
- Can we change the convention_id for 245? How many times is 245 used?
- select * from deficiency where def_code_id = 245;
Used a lot. Convention reference (Paris MoU Deficiencies 01112016.pdf) is dated 2016. When were the deficiencies (245) recorded?
select * from inspection i, deficiency d where d.def_code_id = 245 and d.inspection_id = i.inspection_id;
Three inspections recorded after 2016: 729867,724812,724131
- To fix this issue, we need to change the mapping in s_convention:(But after consulting with Product owner)
- update s_convention set thetis_cd='01021', apcis_cd='01021' where convention_id = 2117;
commit; - Received confirmation from the client so lets apply the above query.
THETIS export issue: THETIS Export Error T.IE.5: Statutory Certificates: value of Title is not valid
Problem:
Client encounters an issue when attempting to export an inspection to THETIS (or APCIS). Error code T.IE.5 (certificate title issue).
Solution:
- Go to https://portal.emsa.europa.eu/login.html
- Login using the username/password to access the EMSA THETIS portal. Credentials found in RDIMS 13232403: see the Prod App Credentials for the CPSCS-THETIS WS.
- Using the menu towards the top of the screen, click Portals - THETIS - Homepage.
- Click "Documents" in the menu bar.
- Click the "Code Extracts" link.
- Click the "Background Tables DDMMYYYY.zip" link. The associated date in the link changes monthly to reflect the current codes in use by THETIS.
- Click the Download link.
- Extract the download ZIP file to a new CODE EXTRACT folder: \\tc4s0b\groups\afccb\ms_apps\cpscs\CODE EXTRACTS\{Month Day Year).
THETIS export issue: THETIS Export Error T.IE.2 (and possibly other issues related to THETIS and APCIS inspection exports):
Problem:
Client encounters an issue when attempting to export an inspection to THETIS (or APCIS). Error code T.IE.2.
Solution:
How-To Publish PMOU Manual Revision
Problem:
CPSCS client needs to update the PMOU Manual Revision in CPSCS production.
Solution:
CPSCS: How-to add a new PMOU manual revision
How-To: Get latest code extracts from EMSA THETIS portal
- Go to https://portal.emsa.europa.eu/login.html
- Login using the username/password to access the EMSA THETIS portal. Credentials found in RDIMS 13232403: see the Prod App Credentials for the CPSCS-THETIS WS.
- Using the menu towards the top of the screen, click Portals - THETIS - Homepage.
- Click "Documents" in the menu bar.
- Click the "Code Extracts" link.
- Click the "Background Tables DDMMYYYY.zip" link. The associated date in the link changes monthly to reflect the current codes in use by THETIS.
- Click the Download link.
- Extract the download ZIP file to a new CODE EXTRACT folder: \\tc4s0b\groups\afccb\ms_apps\cpscs\CODE EXTRACTS\{Month Day Year).
How-To: Get latest code extracts from APCIS portal
- Contact product owner / business owner for CPSCS and ask for the latest code extract from APCIS.
- Product owner / business owner identified in RDIMS #14140748.
- Once extracts are received, create a new directory (Current Month + Year) in the following directory: \\tc4s0b\Groups\AFCCB\MS_APPS\CPSCS\CODE EXTRACTS\APCIS
- Place the code extracts in that folder.
To: Step through and debug the CPSCS VB6 dll
1. Open cpscsgroup.vbg.
Oracle Database Account Locked
Problem:
Clients appear to be locked out of the web application due to the following error: ORA-28000: the account is locked.
Solution:
Oracle database accounts can become locked for any number of reasons. After verifying that the application is using the correct database username and password, contact the DBA group and ask them to unlock the account. Efforts should also be made to discover why the account was locked and make the necessary changes to prevent future recurrences.
See below for an example of this issue and the steps taken to resolve it.
THETIS Export: The MMSI contains too many digits when exporting, inspection stuck in THETIS export queue.
Problem:
Client is locked out of the vessel tombstone and cannot complete the export due to issue above.
Solution:
Generate XML for inspection sent to APCIS
Problem:
Client needs to have the XML for an inspection exported to APCIS.
Solution:
- Visual Basic 6 dev environment (https://tcmarin.atlassian.net/wiki/spaces/MAR/pages/176685067/Install+Visual+Basic+6+in+Windows+10)
- A copy of the CPSCS VB6 DLL (TFS: $/CPSCS-SCEPC/CPSCS-SCEPC/RELEASE/v6.0.10/cpscsdll)
- Grab a copy of the CPSCSDLL directoy - do not update the code in the TFS (or DevOps) repository.
- Open the project: cpscsgroup.vbg
- Double-click on the CPSCSTest form in Project1.
- Double-click the CPSCS Test button: this should place you in the cmdTest_Click function.
- Starting at the beginning of the function, local variables, settings, and database connections will be created. After the IF - ELSEIF - ELSE block for setting up the connnections, driven by the optDB(0).Value, you can comment out the rest of the code in the function.
- FSL PERTH – IMO 9299355
- BBG INTEGRITY, IMO 9789867
- Back in the cmdTest_Click function, you'll want to make a call to the APCIS object's InspectionExport function: call apc.InspectionExport("727050","E") - make sure that all other function and sub-procedure calls are commented out. You do not want to accidentally run any further code.
- In the InspectionExport function, place a breakpoint on the following line: strResult = PostWebservice(strAPCISServer, strSoapAction, strXML)
- Go back to the cmdTest_Click function in Project1 and click the Start button.
- When the form opens, be sure to select the PROD database radio button then click CPSCS Test button.
- Step-through until you hit the breakpoint in the InspectionExport function.
- In the Immediate window, type "?strParam" and hit Enter: this will display the full JSON call for the current inspection being exported. Grab a copy of that JSON data and save it elsewhere.
- Stop the debugger: you will not actually send anything to APCIS at this time.
- Back in the cmdTest_Click function, you'll want to make a call to the APCIS object's InspectionExport function: call apc.InspectionExport("727159","E") - make sure that all other function and sub-procedure calls are commented out. You do not want to accidentally run any further code.
- In the InspectionExport function, place a breakpoint on the following line: strResult = PostWebservice(strAPCISServer, strSoapAction, strXML)
- Go back to the cmdTest_Click function in Project1 and click the Start button.
- When the form opens, be sure to select the PROD database radio button then click CPSCS Test button.
- Step-through until you hit the breakpoint in the InspectionExport function.
- In the Immediate window, type "?strParam" and hit Enter: this will display the full JSON call for the current inspection being exported. Grab a copy of that JSON data and save it elsewhere.
- Stop the debugger: you will not actually send anything to APCIS at this time.
THETIS Export: Place of last survey is not valid
Problem:
Client gets the following error when attempting to upload an inspection to THETIS: "Inspection ID XXXXX: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Statutory Certificates: value of Place of last survey is not valid (IMO: YYYYYYY)", where XXXXXX is the inspection ID and YYYYYYY is the vesssel IMO number.
Solution:
- Admin - Vetting - Export Queue
- Click on the Modify button for the Augusta Mars inspection in the THETIS section.
- Go to Certificates tab (to review Statutory Certificates).
- Click the Modify for each certificate listed. We're looking for a certificate that had a survey done (date of last survey is not blank) that has a missing or invalid Country of Last Survey.
Values provided for the following attributes are not valid (Date of the first visit is between Creation Date and Expiry Date) or don't exist in the system:
- Certificate Title
- Issuing authority - Flag
- Issuing authority - RO
- Surveying authority - Flag
- Surveying authority - RO
- Place of last survey
THETIS Export: Date of issue must be before date of first visit
Problem:
Client gets the following error when attempting to upload an inspection to THETIS: "Inspection ID XXXXX: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Statutory Certificates: Date of issue must be before date of first visit (IMO: YYYYYYY)", where XXXXXX is the inspection ID and YYYYYYY is the vesssel IMO number.
Solution:
APCIS Export: Empty Deficiency Action List error
Problem:
Client gets the following error when attempting to export a CPSCS inspection to APCIS: "APCIS Export Error A.IE.1: Empty deficiency action list () for deficiency #YY (IMO: XXXXXXX)" (where XXXXXXX is the inspection vessel's IMO number and YY is the number of the deficiency as reported by the CPSCS).
Solution:
Delete a CPSCS Inspection
Problem:
Delete an inspection from CPSCS given IMO number and inspection date.
Solution:
See TFS 14178 for an appropriate solution.
Default Descriptions listing Error on THETIS export
Problem:
0 of 1 inspections successfully sent to THETIS<br /><hr width="100%">Inspection ID 724621: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Deficiencies: value of Default Description is not valid (IMO: 9321914)
Solution:
See TFS 14115 or TFS 14005 for appropriate solutions.
Deficiency Action Error on THETIS Upload
Problem:
Inspection ID 724621: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Deficiencies: Deficiency Actions is missing (IMO: 9321914)
Solution:
See TFS 14165 for an appropriate solution.
Nature of Defect Issue
Problem:
Inspection ID 723726: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Deficiencies: The Nature of Defect Fee not paid for delivery cargo residues is not valid for deficiency 01102 - Cargo Ship Safety Construction (including exempt.) (IMO: 6725432)
Solution:
http://tfsprod:8080/tfs/Marine Safety/Marine Safety Portfolio/_workitems?id=14006
Default Descriptions Error on THETIS Export
Problem:
Receiving the following error on export to THETIS:
Inspection ID 723666: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Deficiencies: value of Default Description is not valid
(IMO: 9312664)
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=14005
CPSCS - IM268001 - VTP Issues
Problem:
Last week we had our CPSCS - VTP finally come back as there was problem since the ORCALE Migration and now over the weekend there was the “Security Patch” and systems went down. CPSCS’s VTP did not come back up.
As reference her is e- mails to DBA Group. Which may help to fix the problem.
This is causing over 100 Marine Inspectors access to Vessel arrivals to assist in targeting vessel for inspection and therefore can not perform their duties.
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13995
CPSCS - IM267488 - CPSCS Active Port Calls not working
Problem:
Please pass on to Marine Safety IT to investigate why the Active Port Calls are not working in CPSCS, I have checked a number of the regions and district offices and no port calls are being displayed. See below Vancouver.
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13942
CPSCS - <NO IM> - THETIS and APCIS Export/Import not working following DB migration
Problem:
Client reports that THETIS and APCIS exports are not working following the Oracle migration on January 19, 2019.
Possible tests:
- Verify that the global.asa for CPSCS is using a valid connection string.
- Verify that the web services are up and running (https://wwwapps.tc.gc.ca/saf-sec-sur/4/cpscs-apcis-ws/ApcisProxyWs.asmx and https://wwwapps.tc.gc.ca/saf-sec-sur/4/cpscs-ws/service.asmx)
- Check log files on NCRWS333/334/335 to see what is being reported in terms of errors.
- Attempt to export an inspection to THETIS (try to use an inspection that previously failed - we don't want to export an inspection that is not ready for export)
- Worst-case: load up CPSCS DLL for version 6.0.10, connect to production database, and step through the export process to see where things are failing.
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13901
CPSCS-EXCEL: Spreadsheet not working following DB migration
Problem:
Spreadsheet stopped responding after Oracle migration. See Discussion for steps used to solve the issues and Acceptance criteria for solution.
Things to check:
- Is the correct version of the spreadsheet in RDIMS?
- Is the correct version of the spreadsheet in CPSCS?
- Is the spreadsheet version number in the database correct?
- Is the connection string correct in the spreadsheet?
- Can we connect to the CPSCS database with the credentials in the spreadsheet?
Once the spreadsheet was fixed, need to correct specific instances of the spreadsheet as identified by Bill.
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13889
CPSCS - IM263543 - NCR - Tower C - 10 - D127 - HENDERW - Issue With Link in RuleCheck
Problem:
Hello,
The Transport Canada Marine Inspectors are all currently experiencing an error with the ‘EMSA RuleCheck’ hyper-link.
The link seems to be broken and does not take them to the right place. Currently the link goes to https://rulecheck.emsa.europa.eu/emsaweb/srcweb/checkdeficiencies/RcCheckItems.jsp?shipType=340&constructionDate=29/10/2003&deficiencyCode=04118
This appears to go nowhere and none of the inspectors are able to access RuleCheck.
Al Rushwan suggested that I could contact you for assistance in this case. Here is an image with the hyperlink in blue.
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13522
CPSCS - IM263215 - GOTLAN SOFIA - IMO 9328144 - Export Error URGENT
Problem:
Fixed initial error but new error on upload:
Inspection ID 722331: ERROR: THETIS Export Error T.IE.5: [PostInspectionResultsJson Error] Unexpected error processing inspection. message.inspection-visit.visitDate-after-last-inspection-visit (IMO: 9328144)
Dear Service Desk:
THIS is URGENT as is a DETENTION.
Please pass on to Marine Safety IT to investigate and fix why the inspection for the Detention of the GOTLAND SAFIA, IMO 9328144 which was detained in Quebec, that I am getting Error deficiency action is Missing, but all deficiency action codes are entered.
See error message attached.
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13456
CPSCS- IM261825 - QUE - RMK - NM - CPSCS - Guay, Mathieu - Port de Rimouski disparu de la liste.
Problem:
24 hours as important in Rimouski office as not getting the arrival information to target vessels.
From: Green, Justin
Sent: Wednesday, November 28, 2018 11:27 AM
To: Henderson, William <william.henderson@tc.gc.ca>
Subject: RE: L'Interaction SD1045782 a été enregistrée pour vous avec les détails suivants /Interaction SD1045782 has been added for you with the details as follows
Thanks Bill.
That may be the cause of the issue and gives me a good starting point. I’ll try and take a look soon. If you had to pick – when would you need this resolved: 24 hours, few days, 1 week, or 1 month? Sorry – we’re stretched very thin at the moment but I’d like to do what I can to help.
Regards,
Justin
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13292
CPSCS - IM261581 - NCR - Tower C - 10 - D127 - HENDERW - Error Submitting ATENI, IMO 9656175 - Prince Rupert to CPSCS
Problem:
NCR - Tower C - 10 - D127 - HENDERW - Error Submitting ATENI, IMO 9656175 - Prince Rupert to CPSCS
William D Henderson - 6139797809
IMO 9656175 is not allowing submission to CPSCS.
Attached is email with error message in it.
Solution:
NCR - Tower C - 10 - D127 - HENDERW - Error Submitting ATENI, IMO 9656175 - Prince Rupert to CPSCS
William D Henderson - 6139797809
IMO 9656175 is not allowing submission to CPSCS.
Attached is email with error message in it.
CPSCS - IM261600 - Submission Reports in CPSCS Web (SALDANHA BAY, IMO 9458377)
Problem:
Dear Service Desk:
Please pass on to Marine Safety IT – Inspector in Sept-iles second one in last couple days can not submit completed inspection reports into CPSCS. The vessel in question is SALDANHA BAY, IMO 9458377 - user Denis Rodrigue. The error message returned is below.
Inspection is in User’s saved inspections. I tried it here at HQ and get the same error.
Regards
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13107
CPSCS - IM260498 - NCR - Tower C - 10 - D127 - HENDERW - Connection with APCIS Webservice - URGENT
Problem:
NCR - Tower C - 10 - D127 - HENDERW - Connection with APCIS Webservice - URGENT
William Henderson - 6139797809
Solution:
NCR - Tower C - 10 - D127 - HENDERW - Connection with APCIS Webservice - URGENT
William Henderson - 6139797809
CPSCS - IM258313 - NCR - Tower C-8-D101-HENDERW-APCIS error reporting - Defect Photos
Problem:
Could you let me know before I go to TMOU meeting the problem we are having with the uploading of Deficiency photos is it our side or APCIS side.
Example of the error follows:
4 of 6 inspections successfully sent to APCIS<br /><hr width="100%">Inspection ID 720769: ERROR: APCIS Export Error A.IE.2: Error : UploadInspectionReport : ??????? "http://server.soap.apcis.tmou.org/inspection/v1:ShipDeadweight" ??????????????: ????????
"0" ??????????????? ? ????? ?????? ??? ???? ?????? "http://server.soap.apcis.tmou.org/inspection/v1:T_ShipDeadweight" — ???? ??????????? MinInclusive. (IMO: 7235707)<br /><hr width="100%">Inspection ID 720771: OK (IMO: 9597563)<br /><hr width="100%">Inspection ID 720773: ERROR: APCIS Export Error A.IE.2: Invalid Surveying Authority value in certificate with code '503' (IMO: 9679799)<br />WARNING: Certificate code 528 is not a valid APCIS certificate.
(IMO: 9679799)<br /><hr width="100%">Inspection ID 720787: OK (IMO: 9537628)<br /><hr width="100%">Inspection ID 720786: OK (IMO: 9207443)<br /><hr width="100%">Inspection ID 720770: ERROR: APCIS Export Error A.IE.3: Error : UploadDeficiencyImages :
Access Denied for putReportDeficiencyPhotos methodERROR: APCIS Export Error A.IE.3: Error : UploadDeficiencyImages : Access Denied for putReportDeficiencyPhotos method (IMO: 9595888)<br />WARNING: Certificate code 531 is not a valid APCIS certificate.
(IMO: 9595888)
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12679
CPSCS - IM257341 - CPSCS list of Vessel with Defect Photos - URGENT
Problem:
Dear service Desk:
Could you please pass on to Marine Safety IT to have a list of Vessel Inspections over the last Three years which have Photos attached to Deficiencies. As required for PSC Refresher training Oct 9-11
Regards
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12421
CPSCS - IM256472 - ATL NS DAR - George M Anderson - CPSC Report List of Vessels
Problem:
ATL NS DAR - George M Anderson - CPSC Report List of Vessels
Attached full email.
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12395
CPSCS - IM256403 - Three uploads to THETIS failed due to Default Description errors
Problem:
See attached THETIS error:
These are all in Export Queue.
Three uploads to THETIS failed due to Default Description errors.
IMO 9446726 had defect codes 11101, 13199, 07115 and 07124
IMO 9359600 had defect codes: 04114, 07114, 11113, 11101 and 14501
IMO 9239800 had defect codes: 10136, 08101, 11101 and 11101
I don’t know which is causing the problem and when I look under Defect codes in ADMIN there is nothing that shows the THETIS Code.
Regards
Bill
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12262
CPSCS - IM256332 - COSRICH Lake IMO 9646986 - MMSI Duplicate - URGENT
Problem:
Dear Service Desk:
Please pass on to Marine Safety IT to have the MMSI changed for the vessel COSRICH LAKE IMO 9646986 from 373442000 to 373442002 as vessel changed flag and mmsi and it is being used by another vessel EMERALD STAR imo 9623738.
Please inform me when done.
Regards
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12248
CPSCS - IM256232 - PSC Inspection Changes - Error Message - Can't change deficiency action code
Problem:
Please pass on to Marine Safety IT to investigate why I can not change a deficiency action taken code from code 17 to Code 15 and add the next port. See attached what should be changed to and the error message.
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12244
CPSCS - IM256258 - CPSCS inspection submission error - MESABI, IMO 9359600
Problem:
Dear Service desk:
Please pass on to Marine Safety IT to investigate why the submission of the inspection report for the vessel MESABI, IMO 9359600 is getting the attached error. Also I have included the EXCEL spreadsheet for reference.
Regards
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12235
CPSCS - IM255238 - NCR - Tower C - 10 D127 - HENDERW - APCIS Export Error investigate why
Problem:
NCR - Tower C - 10 D127 - HENDERW - APCIS Export Error investigate why
William D Henderson - 61397978
See attachment
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12203
CPSCS - IM255287 - NCR - Tower C - 10 - D127 - HENDERW - APCIS EXPORT FOR Detention CAP PASADO, IMO 9311799 - -RO RELAT
Problem:
Dear Service Desk:
Could you please pass this on to Marine Safety IT to determine why RO Related was uploaded to APCIS via the batch as per comments from APCIS (attached) when in fact looking at the report in CPSCS the related Deficiencies does not have RO related checked.
Please determine why and let us know the result.
Regards
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=12201
CPSCS - IM267488 - CPSCS Active Port Calls not working
Problem:
Dear service Desk:
Please pass on to Marine Safety IT to investigate why the Active Port Calls are not working in CPSCS, I have checked a number of the regions and district offices and no port calls are being displayed. See below Vancouver.
Regards
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13942
CPSCS - IM261600 - Submission Reports in CPSCS Web (SALDANHA BAY, IMO 9458377)
Problem:
Dear Service Desk:
Please pass on to Marine Safety IT – Inspector in Sept-iles second one in last couple days can not submit completed inspection reports into CPSCS. The vessel in question is SALDANHA BAY, IMO 9458377 - user Denis Rodrigue. The error message returned is below.
Inspection is in User’s saved inspections. I tried it here at HQ and get the same error.
Regards
Solution:
http://tfsprod:8080/tfs/Marine%20Safety/Marine%20Safety%20Portfolio/_workitems?id=13107
CPSCS - IM310089 - CPSCS: Server Certificate Expiring
Problem:
The SSL certificate for apcis.tmou.org which is installed on our web servers – for the CPSCS web application - will expire on June 11, 2020.
Solution:
Provide a replacement certificate before it expires:
In Dev
- Create a new folder under \\tc4s0b\groups\AFCCB\MS_APPS\CPSCS\CERTIFICATES\ and store the new APCIS certificate (apcis.tmou.org.cer) in that folder, ex. July 2021.
- Ensure that you can access the file when you Remote into NCRWS535
- Remote into NCRWS535.
- From NCRWS535, open the Certificate Manager, under Personal/Certificates, find the existing apcis.tmou.org
- Install new apcis.tmou.org certificate in Current User and Local Computer certificate stores (Personal and Trusted Root) by right clicking on the Personal/Certificates → All Tasks → Import
- Double click on the apcis.tmou.org. On the Details Tab. Notice the Subject info and the Issuer info. Those elements are what is used to populate the keys in the config below in GREEN.
- Update web.config (\\ncrws535\wwwappsroot\saf-sec-sur\4\cpscs-apcis-ws\web.config) as follows:
- Comment out the last entry that has the serverCertificateSubject and serverCertificateIssuer
<add key="serverCertificateSubject" value="CN=apcis.tmou.org, OU=IT, O=FGBU AMP Primorskogo Kraya i Vostochnoy Arktiki, L=Vladivostok, S=Primorskiy kray, C=RU"/>
<add key="serverCertificateIssuer" value="CN=GeoTrust RSA CA 2018, OU=www.digicert.com, O=DigiCert Inc, C=US"/>
2. Add the following three lines to the web.config below the removed keys. Note that the info in Green is taken from
<!-- CERT UPDATE - DOS 110024-->
<add key="serverCertificateSubject" value="CN=apcis.tmou.org, O=FSI PRIMORSKY REGION MARITIME PORT ADMINISTRATION, L=Vladivostok, S=Primorsky Krai, C=RU"/>
<add key="serverCertificateIssuer" value="CN=GeoTrust RSA CA 2018, OU=www.digicert.com, O=DigiCert Inc, C=US"/>
1. Go to http://wwwappsmssdev/saf-sec-sur/4/cpscs-apcis-ws/apcisproxyws.asmx?op=GetLatestVesselInfo
2. Enter "7411636" into the IMO field.
3. Click Invoke.
4. You should receive the following return message signifying that APCIS was successfully contacted.
<?xml version="1.0" encoding="UTF-8"?>
<string xmlns="http://tempuri.org/">{"ErrCode":2,"Result":"Inspection information not found."}</string>
After confirming that Dev is working, make a request to the web team that the new certificate be installed in ACC. Edit the config in ACC and test accordingly.
To verify in ACC, go to the Vetting.Export Queue Tab and select one of the vessels, then click export
After ACC confirmed, request that the certificate be installed in PROD by the web team. Also request access to the web.config to make changes (compare/kdiff) etc.
To verify in PROD, ask the client to check in CPSCS
CPSCS - IM312504 - A list of the inspectors in Marine Safety (by specific role, or for all).
Problem:
Is there a way of getting a list (Excel or CV) all of the inspectors in Marine Safety with a designation of “Port State Control Officer”?
Solution:
This solution could apply to any specific type of inspector role, or for all.
The list of possible inspector roles can be found in the S_USER_ROLE table in the CPSCSP database. In the case of this ticket we were looking for the "PSCO" (Port State Control Officer) role.
One of the roles you'll see is the "PSCO" / ROLE_ID = 3. Knowing the role Id allows for the following:
The SQL above can be modified to drill for as much data on the PSCO inspectors as required, based on the information available in the USER_PROFILE table.
The returned data from the above can then be exported or copied into whatever file format the requester is asking for.
CPSCS - IM312526 - Remove (or modify) a deficiency. Find a deficiency in the DB from the website or client given deficiency #
Problem:
The client will give you a deficiency # that is not the same as what you need to drill for in the database to get to the same record.
" I am attempting to modify two deficiencies in the 2020-07-02 inspection report for the GOLDEN ARCUS (IMO 9743162). I am trying to delete deficiency 15150, and I am trying to remove the “ISM-related” mark from deficiency 10138. "
Solution:
Log into CPSCSWEB : https://wwwapps2.tc.gc.ca/saf-sec-sur/4/cpscs-scepc/ using the login/pw from the password file.
Click on "Vessel Search" and search the IMO# given in the ticket.
Click on the Details button:
Click on the Inspections button:
Click on the Details button:
Click on the Deficiencies tab:
Look for the deficiencies # that client stipulated and press the details button:
The pop-up will have the actual DB value ("DID") to query against:
Logged into CPSCSP.world:
(as per the example above)
From this point the deficiency record can be modified or deleted.
To delete a deficiency (deletes done in order below):
CPSCS - IM321375 - APCIS Export Failure: "Empty deficiency action list() for deficiency #xxxxx (IMO XXXXXXX)"
Problem:
Export failure for an inspection with deficiencies.
"Inspection report for the CALLISTO (IMO 9040077) failed to export to APCIS."
Solution:
The solution is based on a previous one described above.
APCIS does not allow Code 30 (“Grounds for detention") and Code 17 (“Rectify deficiency before departure”) on the same deficiency.
Advise client that the code 17 (“Rectify deficiency before departure”) should be removed from all deficiencies where both it and "Grounds for detention" are used, and then try the export to APCIS again.
CPSCS - Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed
Problem:
When running CPSCS locally in Visual Studio you get the following error: Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed
Solution:
The solution is to open a command prompt 'run as administrator' and unregister and re-register the DLL using the following commands:
regsvr32 -u C:\Users\graingm\source\repos\CPSCS\src\CPSCS_ROOT\CPSCS\CPSCS_Objects\cpscs6010.dll regsvr32 C:\Users\graingm\source\repos\CPSCS\src\CPSCS_ROOT\CPSCS\CPSCS_Objects\cpscs6010.dll
Then rerun the application.
CPSCS - Application is down
Problem:
CPSCS is down
Solution:
Contact the web services team. They will do the following to resolve the issue:
1- Restarted App Pool that did not fix the issue so I
2- Restarted WPAS Service this also did not work I then verified the COM+ I notice that that service was hung so i
3- Restarted Component Service and then verified the COM+ and the list was empty so I
4- Restarted Server then verified everything when all came back on and all was fixed and working since your application relies on .dll’s and that the COM+ was having issues I suspect that the problem was with the Component Service being hung and a reboot fixed the issue.
Step #3/4 seems to be the common fix for this type of problem: the component services are being hung-up, so the team restarts the server
CPSCS - Application is down - EXPLAINED
Problem:
CPSCS is down
Solution:
CPSCS might have become inaccessible because the printing function will sometimes freeze up and stall the entire website. In this case, we follow the steps provided in solution, above.
Long-term solution:
Remove the COM+ components permanently and register the website’s dll (CPSCS6010.dll) through command prompt:
Stop application pool (Also, ensure that 32 bit application support is enabled in the application pool settings)
End the running process for the application in question (CPSCS): COM+ Applications > Running Processes > CPSCS> Right-click > Shut Down
Delete all CPSCS COM+ Components from COM+ Applications > CPSCS > Components
Delete aspSmartUpload (if applicable) COM+ Component from COM+ Applications > Common Components > Components
Delete build.Report.1 (if applicable) COM+ Component from COM+ Applications > Common Components > Components
Register CPSCS6010.dll by opening command prompt : regsvr32 {PATH TO DLL}\CPSCS6010.dll
Register build.Report.1 by opening command prompt : regsvr32 D:\WWWROOT\CommonApps\pdfrwr.dll
Register aspSmartUpload by opening command prompt : regsvr32 D:\WWWROOT\CommonApps\aspSmartUpload.dll
Start application pool
Note* You will not be able to see the application under Running Process anymore, as it relies on the COM+ Component to view
To summarize, we want to remove and conflicting COM+ Components from the server (build.Report.1 / aspSmartUpload / CPSCS6010.dll) and utilize these dlls by registering them in CMD Prompt instead: regsvr32 [path to dll]. You will need to shut down the application pool and running components before attempting.
CPSCS - Vetting Vessel Needs to be put back in the Export Queue
Problem:
ON occasion, we may need to put a record back in the APCIS Export Queue, to do so Bill H will provide the IMO NO and the Inspection ID. Make sure they are both in the select otherwise you will get several records that shouldn't be processed
Solution:
-- 1. Select the set of records and confirm
select * from INSPECTION
where imo_no in (9413913,9323065,9566382)
and inspection_id in(754927,754987,755087)
order by export_to_apcis desc;
-- 2. Update the flag and set export_to_apcis to 1
update inspection
set export_to_apcis = 1
where imo_no in (9413913,9323065,9566382)
and inspection_id in(754927,754987,755087);
CPSCS - DLL register Failed
Problem:
When running regsvr32 cpscs6010.dll returns error:
Error "The module "cpscs6010.dll" was loaded but the call to DllRegisterServer failed with error code 0x80004005"
Solution:
1. Click Start and type command in the Search box
2. Right-click command prompt and click Run as administrator
3. Change folder by issuing the following command :
For Windows 32-bit: cd C:\windows\System32
For Windows 64-bit: cd C:\windows\SysWow64
4. Type the following command and press Enter:
regsvr32 jscript.dll
5. Type the following command and press Enter:
regsvr32 vbscript.dll
6. Attempt to install the program again
regsvr32 C:\Users\xxx\source\repos\CPSCS\src\CPSCS_ROOT\CPSCS\CPSCS_Objects\cpscs6010.dll