'500 null' error on Publish

Started by mansley, September 18, 2020, 13:26:41 PM

Previous topic - Next topic

mansley

Hi all,

Sometimes, one of our team gets an error message when trying to Publish, with the text '500 null', diagram attached.

The problem happens after the local commit, when Archi is trying to send the commit to the repository.  After the error, the commit appears in my local git, apparently without any issues.

Once this happens, it will keep happening.  I have a recovery method, but it's less than perfect.

1) Has anyone else run into this problem?

2) If yes, any workarounds, and is there a defect logged on GitHub (I can't find anything).

Thanks,
Michael

Phil Beauvoir

Hi Michael, this is one of those cryptic error messages returned by JGit. Do you think it is some kind of connection response error from the Git server?

(Commits are local so will succeed without a server)
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Jean-Baptiste Sarrodie

Hi,

This really looks like your server is going mad and return an HTTP code 500 (Internal Server Error).

I'd suggest to look at your server's logs to see if it is the cause of this.

BTW, which git platform solution do you use ?

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

mansley

Hi Phil, JB,

Thanks for the responses... In answer to Phil's question, the error seems to happen when Archi tries to contact the git server (there is a dialog visible showing the activities related to the Publish), so I strongly suspect a server error starting the whole issue.  The dialog kind of pauses while trying to execute some action with the server, and after a few seconds, the error message appears.

JB, we are using Atlassian Stash, and it's a corporate server, for which I don't have access to the logs or any other internals.

What I can add to the original explanation is this:
1) The problem started yesterday late when I tried to Publish.
2) I had Published earlier in the day without problems.
3) After receiving the error, the problem recurred.
4) I noticed this particular message several times in the Archi log, logged during the same period that I have been getting the 500 null error, although I can't say how directly it is connected: Content is not allowed in trailing section.

It's not clear to me if the error message in point 4 is a cause of the 500 null error, a result of the 500 null error, or simply unconnected to it.

I can replicate the Content is no allowed error reliably from one of the commits in Stash, although I'm not sure how much help that is.

Regards,
Michael

mansley

Does JGit allow logging?  Is it possible for me to turn it on and get some additional logging info?

Phil Beauvoir

Quote from: mansley on September 21, 2020, 15:20:58 PM
Does JGit allow logging?  Is it possible for me to turn it on and get some additional logging info?

Unfortunately it doesn't.

"Content is not allowed in trailing section." is an XML parsing error that can happen if an XML is not properly formed or corrupt. What is triggering it in the stack trace in the error log?

I don't think it relates to the "500 null" error. I think the "500 null" error is probably a 500 Internal Server Error.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Jean-Baptiste Sarrodie

Hi,

Quote from: mansley on September 18, 2020, 15:52:36 PM
I can replicate the Content is no allowed error reliably from one of the commits in Stash, although I'm not sure how much help that is.

Are you sure you've never ever tried to merge the model outside Archi (through a manual git merge or through a pull request) ?

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

mansley

Hi Phil, JB,

I don't use pull requests at all and I am the Stash repository admin and I don't allow others to send PRs.

When I was trying Archi with Stash in the very early days, I may well have tried PRs a few times to try it out, before reading about how not to do it, but I really don't remember, and I'm pretty sure I started with a new repository once I'd figured out the basic management process (after trying out various things to test the basic workings of Archi+Git).

I've had a couple of occasions when I needed to fix up the model folder because of folder.xml error messages, which requires the use of command line Git.  I don't know if this falls into the category of tasks you mention, JB.

Is it possible to discover whether there is a clear problem?  If so, how?  And is it possible to recover?

Regards,
Michael

Phil Beauvoir

Michael,

it might be easier to diagnose if you could separate the xml issue from the "500" connection issue. I don't think that a malformed xml file should affect a git push action so maybe you could see if the "500" error happens with other models.

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

mansley

Hi Phil,

OK, I will spend some time today trying to replicate the 500 null issue using a different repo.

One thing I noticed is that the last time this happened (yesterday), the local Git repo already has the merge from Stash committed.  So the process is failing at the final hurdle, which is to push the final merge back to the origin.

I'll let you know when I have some more info from a test repo.

Regards,
Michael

mansley

I have tried to put a copy of the model into a new Stash repo (Collaboration | Add Local Model to Worksapce and Publish), and the first problem I have is that after the model is committed to the local repo (commit message=First Commit), then Archi tries to publish to Stash and I get a 502 bad gateway error.

For my existing 'production' model, I don't get this error message at all.  And I published changes to Stash yesterday afternoon without problems.  I've just Refreshed, no problem.

For info, my Stash server is inside the corporate network, no proxy required.  However, the proxy is required to access anything outside the corporate network.

Any ideas?  I can provide more info if required.

Phil Beauvoir

Can you try the same connection with a new, small model, to eliminate issues with model size and contents.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

mansley

Hi Phil,

Good idea.  I had to reduce the model to something very small, and then increased it to a moderate size (larger sizes continued with the 502 Bad Gateway issue), and I eventually managed to get two model files which trigger the 500 null error reliably when using a clean repo in the corporate Stash server (I use the first model file to create the model in the repo, and then Import the second file which is a superset of the first and try to Publish).

However, I tried this on Github, and the error does not appear; everything works as expected.

I don't have any idea what to do from here.  I can send you the two files, but I'm not sure that will be of any use as it's not clear whether the error would occur for you.  If you have any ideas, please let me know.

Regards,
Michael

Phil Beauvoir

Michael,

this is not something I can easily diagnose, even if you send me the files.

It sounds like  a configuration issue using Atlassian Stash.

I found this, don't know if it's something like this:

https://stackoverflow.com/questions/24322896/git-push-http-code-502-error

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

mansley

OK.  Thanks a ton for all the help.  I've managed to get another lead, which also points to a Stash configuration problem.  I'm going to chase it up with IT support.