pulibrary / aspace_helpers

methods and reports to support common SC activities in ArchivesSpace
1 stars 0 forks source link

The as_marcao plugin can't connect to lib-sftp #540

Closed regineheberlein closed 2 weeks ago

regineheberlein commented 3 weeks ago

The marc_ao plugin sends component/archival_object records for select collections to Alma via lib-sftp. It last succeeded on March 8.

This code is an ArchivesSpace plugin that connects to our sftp server from Lyrasis.

Statussftp_fail
Errornet.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods
Last Success At2024-03-08 22:22:00 -0500
Started At2024-04-22 22:22:00 -0400
Completed At2024-04-22 22:29:14 -0400

Configuration:

Schedule22 22 * * *
Resource Selectorboolean_1
SFTP Hostlib-sftp-prod1.princeton.edu
SFTP Userlib-aspacesftp@pu.win.princeton.edu
SFTP Password********
SFTP Path/alma/aspace/

This corresponds to the last file saved to lib-sftp on March 9 (server time): Mar 9 03:22 marcao_export.xml

regineheberlein commented 3 weeks ago

possible things to pursue, as far as @maxkadel and I have been able to look into this:

regineheberlein commented 3 weeks ago

Lyrasis confirms we have the correct IP address and nc succeeds.

We need to change the directory owner to lib-aspacesftp and check that the password hasn't changed.

kayiwa commented 2 weeks ago

I am able to successfully connect when I remove the pu.win.princeton.edu suffix

regineheberlein commented 2 weeks ago

Excellent! I haven’t heard back from Lyrasis yet but know Blake is around (working on something else for us), so expect the config change to be put in place later today.

Regine Heberlein (she/her) Library IT Data Analyst 609-258-6156 @.**@.>

My working day may not be your working day. Please do not feel obliged to reply to this email outside of your regular working hours.

From: Francis Kayiwa @.> Date: Friday, April 26, 2024 at 2:24 PM To: pulibrary/aspace_helpers @.> Cc: Regine I. Heberlein @.>, Assign @.> Subject: Re: [pulibrary/aspace_helpers] The as_marcao plugin can't connect to lib-sftp (Issue #540)

I am able to successfully connect when I remove the pu.win.princeton.edu suffix

— Reply to this email directly, view it on GitHubhttps://github.com/pulibrary/aspace_helpers/issues/540#issuecomment-2079911758, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABNKKU7JEACM5LDPLSOURATY7KLU3AVCNFSM6AAAAABGVQ7BOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZZHEYTCNZVHA. You are receiving this because you were assigned.Message ID: @.***>

regineheberlein commented 2 weeks ago

FYI Blake didn't get to it over the weekend but is going to put that in tonight.

regineheberlein commented 2 weeks ago

Ok, that's in place, here's to hoping for tonight's run!

Configuration
Schedule 22 22 * * *
Resource Selector boolean_1
SFTP Host lib-sftp-prod1.princeton.edu
SFTP User lib-aspacesftp
SFTP Password ********
SFTP Path /alma/aspace/
regineheberlein commented 2 weeks ago

@kayiwa : the ssh failed again, with the new sftp username in place:

Last Export
Status sftp_fail
Error net.schmizz.sshj.sftp.SFTPException: Permission denied
Last Success At 2024-03-08 22:22:00 -0500
Started At 2024-04-29 22:22:00 -0400
Completed At 2024-04-29 22:28:15 -0400
Resource IDs 2168, 2214, 3950
AOs Exported 3970
Export File Path /archivesspace/data/shared/marcao/marcao_export.xml

Configuration
Schedule 22 22 * * *
Resource Selector boolean_1
SFTP Host lib-sftp-prod1.princeton.edu
SFTP User lib-aspacesftp
SFTP Password ********
SFTP Path /alma/aspace/
regineheberlein commented 2 weeks ago

I'm noticing that the directory is owned by lib-aspacesftp on staging but almasftp on prod. Could it be as simple as setting it to lib-aspacesftp on prod?

regineheberlein commented 2 weeks ago

Update: @kayiwa updated the owner.

regineheberlein commented 2 weeks ago

This is now working again, thanks @kayiwa and @maxkadel !