Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connections aren't closed on CAT_INVALID_USER #133

Closed
bh9 opened this issue Dec 16, 2019 · 7 comments
Closed

connections aren't closed on CAT_INVALID_USER #133

bh9 opened this issue Dec 16, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@bh9
Copy link
Contributor

bh9 commented Dec 16, 2019

metalnx doesn't always close failed connections immediately. Our dev irods database was effectively DOS'd by metalnx creating too many connections. A lot (possibly all) of the connections which don't get cleared up have fail with CAT_INVALID_USER, something like

Dec  9 05:39:18 pid:1948 NOTICE: Agent process 21497 started for puser=rods and cuser=rods from 172.27.84.193
Dec  9 05:39:18 pid:21497 NOTICE: rsAuthCheck: chlCheckAuth status = -827000
Dec  9 05:39:18 pid:21497 ERROR: [-]	iRODS/server/api/src/rsAuthResponse.cpp:74:rsAuthResponse :  status [CAT_INVALID_USER]  errno [] -- message []
Dec  9 09:22:56 pid:1948 NOTICE: Agent process 21497 exited with status 24576

note that a connection which has clearly failed is open for 4 hours, when it should have been closed immediately.

@bh9
Copy link
Contributor Author

bh9 commented Dec 16, 2019

Worth noting the CAT_INVALID_USER was triggered by the fact that I didn't notice the jobs config, so as a side point, could the entries in metalnx.properties be documented please?

@trel trel added the bug label Apr 10, 2020
@trel trel added this to the Backlog milestone Apr 10, 2020
@trel
Copy link
Contributor

trel commented Dec 5, 2024

jobs are now gone since #214... so perhaps this is moot?

@trel trel modified the milestones: Backlog, 3.0.0 Dec 5, 2024
@JustinKyleJames
Copy link
Contributor

jobs are now gone since #214... so perhaps this is moot?

I believe this is still an issue with the login page. When logging in using valid credentials, the ips does not show a hung agent connected from jargon. I see the same when navigating around.

When trying to login with an invalid user, I see the agent alive with jargon.

Every 5.0s: ips                                                                                                                                                28a3e492c919: Mon Jan  6 20:54:59 2025

Server: irods-catalog-provider
    28478 dne#tempZone  0:00:53  jargon  172.18.0.4
    28711 rods#tempZone  0:00:00  ips  172.18.0.2

@trel
Copy link
Contributor

trel commented Jan 6, 2025

ah, good find.

@JustinKyleJames
Copy link
Contributor

I finally found what was causing the CAT_INVALID_USER to leave connections open. When I updated the following code to catch InvalidUserException as well as AuthenticationException the connection closed as expected.

Note that prior to making this change the agent stayed open for a while but garbage collection would clean up that connection when it ran. Now it will clean it up immediately.

https://github.com/DICE-UNC/jargon/blob/5076fce55d858a6e2431fcbdf3a78b34a6af5f20/jargon-core/src/main/java/org/irods/jargon/core/connection/AbstractIRODSMidLevelProtocolFactory.java#L98-L102

@trel
Copy link
Contributor

trel commented Jan 8, 2025

Full explanation of behavior and fix. Excellent.

JustinKyleJames added a commit to JustinKyleJames/jargon that referenced this issue Feb 11, 2025
korydraughn pushed a commit to DICE-UNC/jargon that referenced this issue Feb 11, 2025
@trel
Copy link
Contributor

trel commented Feb 11, 2025

complete - closing.

@trel trel closed this as completed Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants