Commit Graph

2361 Commits

Author SHA1 Message Date
josecoll
f09bff9c0f
Make concurrent updates to contractStateTypeMappings thread safe. (#5410) 2019-08-29 09:55:21 +01:00
Dan Newton
8ac472b933 ENT-3504 Do not throw exception for missing fiber and log instead - OS version
Change to `SingleThreadedStateMachineManager`.

Instead of throwing an exception when a flow's fiber cannot be found,
just log the message at info level.

(cherry picked from commit 70b2a94fda)
2019-07-30 17:27:04 +01:00
Viktor Kolomeyko
3ceb242ee1 CORDA-2935 - Align timeouts for CRL retrieval and TLS handshake (#5126) 2019-06-21 09:34:15 +01:00
James Brown
0101cdbd56 ENT-3542 remove unused commons-codec dep (#5207) 2019-06-21 09:30:40 +01:00
Dan Newton
fa38012339 CORDA-2572 - Add peer information to stacktrace of received FlowException (#4998)
When a `UnexpectedFlowEndException` or a `FlowException` is received the
peer that the exception was thrown from will be added to the stacktrace.
This is due to it being easier to see and a field that developers
are much less likely to override.

A nullable field `peer` has been added to `FlowException` and
`UnexpectedFlowEndException`. This is read later on (when peer info
is not available) to append the peer info to the stacktrace.
2019-05-01 13:51:44 +01:00
Stefan Iliev
1802e48963 CORDA-2586 - explorer exception handling (#4957)
* Initial version of new(old) dialog that won't print a stacktrace for rpc exceptions.

* Decoupled CordaVersionProvider. Moved common files to common-logging to lower dependencies on the node explorer.

* Removed unused import and duplicate documentation comment.

* Moved error code rewrite policy in the new common/logging module according to PR review.

* Removed extra line.

* Updated log4j configurations with new package name where logging policies will be contained.

* Included common-logging module with cliutils.
2019-05-01 13:50:50 +01:00
Stefan Iliev
1128156153 CORDA-2821 Fix issue with Quasar errors redirecting to useless page (#4982)
* Changed dead url to the new location.

* Modified documentation. Linked new place for intelliJ guide.

* Changed url to the new link.
2019-05-01 11:21:13 +01:00
Bartman250
b4ba2ca4c1 CORDA-2834 Clarify error message when base directory doesn't exist (#4992)
* setting non existant base directory now yields suitable error message

* corrections to missing base directory message and comments added for clarity

* added check for valid base directory before node loggin and bootstrapping

* removed uneeded import

* quantum computer joke back by popular demand and not back at the same time
2019-05-01 11:20:33 +01:00
bpaunescu
95a3631628 CORDA-2861 - give the message executor its own Artemis session and producer (#5036) 2019-04-17 19:05:06 +01:00
Tudor Malene
21adcffd31 CORDA-2743 - utilities and test to show rpc operations that support disconnects (#5009) (#5015)
(cherry picked from commit 6771386b4b)
2019-04-15 10:25:55 +01:00
JamesHR3
ee884a92de CORDA-2522 - Improve error reporting around failed flows (#5016)
* [CORDA-2522] Improve error reporting around failed flows (#5000)

* Improve error reporting around failed flows

* Fix an index to start from 1 when printed

* Address first set of review comments

(cherry picked from commit 24699cd7f4)

* [CORDA-2522] Follow up changes to error reporting around failed flows (#5006)

* Follow up changes to error reporting around failed flows

* Have FinalityDoctor report stack trace

* Revert changes to the DumpHistoryOnErrorInterceptor

(cherry picked from commit 2da597a5b7)
2019-04-15 10:25:18 +01:00
Tudor Malene
43e3755c6f CORDA-2621 - change message when rpc/p2p login fails (#4994) (#5020)
(cherry picked from commit d15699289c)
2019-04-15 10:23:30 +01:00
Thomas Schroeter
e0f19ca70b CORDA-2647 ROLLBACK (#4964)
* Revert "Address comments"

This reverts commit f884d112c3.

* Revert "CORDA-2647 - Prevent registration when previous state exists"

This reverts commit 4e9d1f1924.
2019-03-29 18:06:12 +00:00
josecoll
add380b135
Merge pull request #4963 from corda/colljos-backport-secfix-serializer
(BACKPORT) ENT-3121 restrict custom serializers
2019-03-29 16:51:44 +00:00
Christian Sailer
9668b8530a CORDA-2813 Handle loss of database (#4962)
* CORDA-2813 Add DbException handler to terminate process when the DB goes away or gives up.
Also add a helper to terminate the node and use it instead of calling Runtime.halt() in random places.

* CORDA-2813 Address threading/blocking concerns raised during review
2019-03-29 16:47:38 +00:00
Dominic Fox
17e7cd3abc ENT-3121 - restrict custom serializers (#1852)
* Tests for custom registry restrictions

* ENT-3121 restrict custom serialisation

* Remove redundant code

* Only count declared annotations

* Check annotation on superclasses, remove annotation from ByteArray

* Forbid custom serialization of primitive types

* Remove @CordaSerializable from another class that is always handled by custom serialisation

* Add log warnings to aid diagnosis of custom serialization issues

* Remove another annotation

* Remove another annotation

* Remove another annotation

* Remove another annotation

* Fixup api-current

* Fixup api-current

* KDocs on exceptions
2019-03-29 14:48:07 +00:00
Thomas Schroeter
dc46446432 [CORDA-2807] Don't retry db transaction in AbstactNode start (#4942)
Retries can lead to confusing error messages in case the CFT notary is
misconfigured and throws a SQLException causing a retry.
2019-03-29 09:41:39 +00:00
Dimos Raptis
328becb2d3 Introduce global port allocation 2019-03-27 12:30:40 +01:00
Dimos Raptis
f884d112c3 Address comments 2019-03-27 12:30:40 +01:00
Dimos Raptis
4e9d1f1924 CORDA-2647 - Prevent registration when previous state exists 2019-03-27 12:30:40 +01:00
Tudor Malene
b0cf41ef58 CORDA-2615 - add fix for serialization failure on relevancy check.
CORDA-2615 - add fix for serialization failure on relevancy check.

CORDA-2615 - add fix for serialization failure on relevancy check.

CORDA-2615 - add fix for serialization failure on relevancy check.

CORDA-2615 - fix test

Create reconnecting proxies
2019-03-27 11:51:36 +01:00
Dominic Fox
c2ad64ccde CORDA-2802 use eventually to wait (#4932)
* CORDA-2802 use eventually to wait

* Catch Exception, not Throwable
2019-03-26 16:01:06 +00:00
Tommy Lillehagen
48e008d271
CORDA-2783 - Improve error message for initial registration with devMode=true (#4928) 2019-03-25 15:16:58 +00:00
Jonathan Locke
07031ae0fe CORDA-2786 - Certificates directory is only required for node startup. This was causing problems with initial registration. (#4926)
Addressed review comments - removed nested if and added parameter name for the usage of requiresCertificates.

Removed unnecessary import and white space.
2019-03-25 15:14:13 +00:00
Chris Rankin
d9a67d7426 BUILD: Use global port allocator for flaky HardRestartTest. (#4921) 2019-03-23 19:32:39 +00:00
Shams Asari
acd2f8bce4
CORDA-2683: Requests to start unknown flows can be deleted using killFlow (#4903)
Normally, these requests are left unacknowledged in the MQ broker to allow recovery via installing the missing CorDapp. If this is not applicable then the request be dropped (and the other side informed of the error).
2019-03-22 14:46:02 +00:00
alexeykorening
57d0040b7b PR review fixes 2019-03-22 14:58:24 +01:00
alexeykorening
4f812bbd90 Preconditions draft 2019-03-22 14:58:24 +01:00
dazraf
a5dd23dd43 CORDA-2770 - file watcher subscription in NetworkMapUpdater should be unsubscribed on close (#4914) 2019-03-22 09:42:29 +00:00
Jonathan Locke
2777e32a1c ENT-3327: Check for missing certificates directory (#4905)
While the node is starting up, we now check for the presence of the certificates directory. This allows us to print out an easily understandable error message if the directory is not present. An exception is made for devMode, as devMode will result in the directory being created in any case.
2019-03-21 16:56:18 +00:00
dazraf
52ec48d63d CORDA-2653 - ensure that during initialisation of a Corda Service, the current thread has a context classloader. (#4907) 2019-03-20 16:42:37 +00:00
Tommy Lillehagen
eb7928d761
CORDA-2763 - Log censored config at startup (#4906) 2019-03-20 15:30:20 +00:00
Chris Rankin
3333464c39 BUILD: Fix some warnings about @BelongsToContract in tests. (#4902) 2019-03-19 18:16:24 +00:00
Jonathan Locke
dc179d4ea1 ENT-3057: Log hibernate warns and errors in different log (#4889)
* ENT-3057: Log hibernate warns and errors in different log

If a hibernate error occurs (deadlock, for example) that would cause a flow to be sent to the hospital, hibernate logs the warnings and errors before we do. This results in duplication in the logs, and pollutes the log. To solve this, we create a new log appender named diagnostic-{node-name}.log and log any org.hibernate messages of warn and above to that file. This way, messages are not lost, which means that the information can be retrieved if need be.

* Corrected indentation of comment (changed tab to space)

* Updated node-administration document to mention diagnostic logging change

* Fixed integration test. It was breaking because it was fetching the first log file in the folder, assuming there would be only one. This assumption is now invalid because the diagnostic log file that was introduced. Two tests were found that used similar logic to find a log file to examine, hence both were corrected to look for log files beginning with "node"

* Updated documentation as per review comments.
2019-03-18 17:08:13 +00:00
Chris Rankin
1fc8e1d7ae CORDA-2759: Use GlobalTestPortAllocation for Node's integration tests. (#4899) 2019-03-18 14:48:13 +00:00
Rick Parker
31100cd708
CORDA-2748 Always set the ThreadLocal in the Fiber from the Thread, even if not yet set in the Thread. (#4896) 2019-03-18 11:51:08 +00:00
Tommy Lillehagen
fb4dc0a6ac
ENT-3060 - Change log level in transition executor (#4898)
CORDA-2757 / ENT-3060 - Change log level in flow transition executor
2019-03-18 10:29:23 +00:00
Andrius Dagys
e3ada049d4
CORDA-2745: Cache notary identity lookups (#4892)
Add a cache for notary identities in the PersistentIdentityService. This
solves a reported problem where notary identity lookup fails if its network
map entry is missing, which results in an exception when trying to insert
a state into the vault after recording a transaction.
2019-03-15 11:14:48 +01:00
Jonathan Locke
82c45c6f83 CORDA-2506: Better handling of invalid log path (#4895)
Test if we have access to the logging path (baseDirectory/logs) before attempting to write to them. This allows us to shut down gracefully with an easily understandable error message.
Without doing this, the log4j2 will attempt to access the logPath when it first uses the logger in the call() function.
2019-03-15 09:54:53 +00:00
JamesHR3
76dc981b91 [CORDA-2737] Buffer events from observables in ProgressTracker until subscribed to (#4882) 2019-03-13 16:33:29 +00:00
Dimos Raptis
9a2c474996 Make debug lazy 2019-03-12 16:41:15 +01:00
Dimos Raptis
3c1a8b3de1 Remove redundant transaction 2019-03-12 16:41:15 +01:00
Dimos Raptis
5f7f809084 CORDA-2705 - Prevent duplicates in cache and fix the mappings persisted for confidential identities 2019-03-12 16:41:15 +01:00
Jonathan Locke
ed2fe13436 CORDA-2629: Provide a better error msg when notary type misconfig (#4864)
* CORDA-2629: Provide a better error msg when notary type misconfig

If a notary service is misconfigured with the type (either validating or not validating) stored in the node's configuration not matching that advertised in the network map cache, the notary will throw an exception and fail on startup.
Previously, this misconfiguration would result in an exception being thrown when attempting to notarise a transaction. This change results in the exception being thrown at node startup and the node operator being aware of the misconfiguration earlier.

* Corrected exception message when the notary does not have a party

* Changed exception message to include configured and advertised values.
Fixed unit test that was failing because of the new check.
2019-03-12 13:45:25 +00:00
Rick Parker
061db8b1a1
ENT-3256 Cleaner way to override (#4862) 2019-03-08 17:14:14 +00:00
Chris Rankin
ea263b3e54 CORDA-2569: Add "flow kill <ID>" command to Corda's shell. (#4861)
* CORDA-2569: Add "flow kill <ID>" command to Corda's shell.

* Add testing and documentation for RPC killFlow operation.
2019-03-08 16:39:22 +00:00
JamesHR3
b3b184c93e [CORDA-2701] Ensure crlCheckSoftFail config option is respected (#4854)
* Plumb through the crlCheckSoftFail configuration option to bridge manager

* Add crlCheckSoftFail test to bridge manager and fix equivalent proton wrapper test

* Update documentation and set the node configuration default to true

* Revert default change and clarify consequences of setting option to false

* Remove NodeConfiguration default to leave only AMQPConfiguration default
2019-03-08 16:23:07 +00:00
Florian Friemel
65e7886168 Fix flaky test. (#4851) 2019-03-08 15:15:40 +00:00
Mike Hearn
785755067a Docs: use version numbers read from the build system, not duplicated. 2019-03-07 16:44:50 +01:00
Rick Parker
1c38ecee7b
ENT-3256 Small performance enhancement and OS preparation for ENT changes (#4857) 2019-03-07 14:47:51 +00:00