GenericMappingTools / gmtserver-admin

Cache data and script for managing the GMT data server
GNU Lesser General Public License v3.0
7 stars 3 forks source link

The data server fails to update #91

Closed seisman closed 2 years ago

seisman commented 3 years ago

waveform_AV.DOL.txt is still not available in cache. Checking the GMT data server log, I see

Start Time: Thu Mar 18 03:00:01 HST 2021
fatal: Not a git repository (or any parent up to mount point /export/gmtserver)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /export/gmtserver)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /export/gmtserver)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
/export/gmtserver/gmt/gmtserver-admin/scripts/srv_git_update.sh: line 19: [: : integer expression expected
End Time: Thu Mar 18 03:00:01 HST 2021

Something wrong?

PaulWessel commented 3 years ago

Strange. I an logged into gmtserver and doing this manually:

-bash-4.2$ cd /export/gmtserver/gmt/gmtserver-admin
-bash-4.2$ pwd
/export/gmtserver/gmt/gmtserver-admin
-bash-4.2$ git fetch -v origin
fatal: Not a git repository (or any parent up to mount point /export/gmtserver)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

There is a .git directory there so not sure why it says it is not a git repository. Have not logged in here in some time. ANy thoughts?

PaulWessel commented 3 years ago

https://stackoverflow.com/questions/16853624/git-discovery-across-filesystem-not-set

I have asked IT staff if they have changed anything - but not sure why they would have. Should we try to set that parameter?

seisman commented 3 years ago

I just tried to set the parameter but still have the 'not a git repo' error:

export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
-bash-4.2$ git fetch -v origin
fatal: Not a git repository (or any of the parent directories): .git
PaulWessel commented 3 years ago

Maybe best if I su to gmt and remove the gmtserver-admin local workspace and clone it again?

PaulWessel commented 3 years ago

OK done, and running the srv_git_update script manually gives no failiures like those above. the waveform file is there now.

PaulWessel commented 3 years ago

OK, found this - after emailing you. Seems we need a more permanent solution then having to clone the repo .

seisman commented 3 years ago

https://stackoverflow.com/a/40118899

In my case our sys admin had decided that the apache2 directory needed to be on a mounted filesystem in case the disk for the server stopped working and had to get rebuilt.

Is this also our case?

PaulWessel commented 3 years ago

I found some other and learned that our problem is a damaged or emtpy .giot/HEAD file. On my own machine I see

cat .git/HEAD 
ref: refs/heads/master

but on the gmtserver it is present but empty. According to this page it will give the same error. So the issue is why does it become empty? If I add the "expected" iinfo to the HEADS file I get

fatal: index file smaller than expected. So I removed it back to empty. Still no solution here

PaulWessel commented 3 years ago

Is this also our case?

I think not - I asked them last time before we gave up and cloned it again.

PaulWessel commented 3 years ago

I also tried

git init Reinitialized existing Git repository in /export/gmtserver/gmt/gmtserver-admin/.git/

but does not fix the problem. Then I updated the HEAD file again as above and this time also deleted .git/index (which was also empty) and now git pull works etc. So lets leave this issue open since we clearly do not understand why this happens.

seisman commented 2 years ago

Closing the issue because the data server works fine recently.