Archi Forum

Archi Plug-ins => coArchi => Topic started by: mansley on September 18, 2020, 13:26:41 PM

Title: '500 null' error on Publish
Post by: mansley on September 18, 2020, 13:26:41 PM
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
Title: Re: '500 null' error on Publish
Post by: Phil Beauvoir on September 18, 2020, 13:34:31 PM
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)
Title: Re: '500 null' error on Publish
Post by: Jean-Baptiste Sarrodie on September 18, 2020, 14:25:26 PM
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
Title: Re: '500 null' error on Publish
Post by: mansley on September 18, 2020, 15:52:36 PM
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
Title: Re: '500 null' error on Publish
Post by: 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?
Title: Re: '500 null' error on Publish
Post by: Phil Beauvoir on September 21, 2020, 15:26:33 PM
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.
Title: Re: '500 null' error on Publish
Post by: Jean-Baptiste Sarrodie on September 21, 2020, 15:44:20 PM
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
Title: Re: '500 null' error on Publish
Post by: mansley on September 22, 2020, 16:19:48 PM
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
Title: Re: '500 null' error on Publish
Post by: Phil Beauvoir on September 22, 2020, 16:42:23 PM
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
Title: Re: '500 null' error on Publish
Post by: mansley on September 23, 2020, 08:02:39 AM
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
Title: Re: '500 null' error on Publish
Post by: mansley on September 25, 2020, 10:02:31 AM
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.
Title: Re: '500 null' error on Publish
Post by: Phil Beauvoir on September 25, 2020, 10:09:06 AM
Can you try the same connection with a new, small model, to eliminate issues with model size and contents.
Title: Re: '500 null' error on Publish
Post by: mansley on September 25, 2020, 12:36:32 PM
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
Title: Re: '500 null' error on Publish
Post by: Phil Beauvoir on September 25, 2020, 12:42:52 PM
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

Title: Re: '500 null' error on Publish
Post by: mansley on September 25, 2020, 13:16:08 PM
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.