Rest-Api service stops | Submit jobs via Web Interface

Here you can submit bugreports
ausmetal
Posts: 5
Joined: Fri Oct 08, 2021 12:30 am

Rest-Api service stops | Submit jobs via Web Interface

Post by ausmetal »

Hello,

Long time user of FFAStrans and long time lurker of the forum.
Haven't had any issues that I didn't figure out with the help of these forums, up until now.

I've setup a test bench on my PC to test out the Web Interface.
PC Specs:
Windows 10 Pro
AMD 2700x CPU
Nvidia 2080 GPU
16GB RAM

I've installed FFAStrans and set it up to run as a service and installed the Web Interface module and installed it to run as a service.
I open the Web Interface http://localhost:3002/webinterface/ and I can see my manually submitted jobs (from the Workflow Manager) They update as the job is transcoding, all is good there.

It's when I want to submit a job by the Web Interface, but when I go to select the profile from the Workflows window/tab in the bottom right, the FFAStrans REST-API Service stop abruptly and I get an error in Web Interface (ERROR in getworkflowdetails for ****) Screenshot attached. I can restart the Rest-Api service no problem, but if I go to select a Workflow profile, the same thing happens.

If more information is required, let me know, I am more than happy to share.

webinterface-01.jpg
webinterface-01.jpg (105.18 KiB) Viewed 6758 times
webinterface-02.jpg
webinterface-02.jpg (112.29 KiB) Viewed 6758 times
- Anthony
Sydney, Australia.
admin
Site Admin
Posts: 1680
Joined: Sat Feb 08, 2014 10:39 pm

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by admin »

Hi ausmetal, thank you for lurking the forum and for using FFAStrans! :-)

Can you please run FFAStrans as application instead of service, then try to hit the same bug? When you run as appliaction and if the rest service crash you will probably see some kind of debug window that might help us to find the issue. Also, I would like to know what version you're running.

-steinar
ausmetal
Posts: 5
Joined: Fri Oct 08, 2021 12:30 am

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by ausmetal »

Thanks for the reply Steinar,

I'm almost willing to bet that this error is occuring because I'm probably missing something, but if there are other logs you'd like me to extract, let me know.
Thanks mate.



FFASTrans Version:

Version: 1.2.2.0

Workflow manager (FFAStrans.exe, x64) 1.2.2.9
Workflow processor (exe_manager.exe, x64) 1.2.2.18
REST-API service (rest_service.exe, x64) 1.2.2.4



I've taken the following steps:

1 - I've made FFASTrans run as an application.
2 - The Web Interface service is still running.
3 - I open the Web Interface find the file I want to submit for processing.
4 - On the Workflows tab, I go to click on either workflow (mp4/proxy-mp4) A little error message pops up: "ERROR in getworkflowdetails for 20211008-1013-3698-3edd-396d2bf5df77".

5 - When the FFASTrans was running as a service, it was at this point the service would cease to run.
But now, I just get the error.
FFASTrans-overview.jpg
FFASTrans-overview.jpg (249.48 KiB) Viewed 6704 times
aftermath.jpg
aftermath.jpg (173.32 KiB) Viewed 6704 times
- Anthony
Sydney, Australia.
admin
Site Admin
Posts: 1680
Joined: Sat Feb 08, 2014 10:39 pm

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by admin »

Hi ausmetal,

I'm suspecting there is a corruption in the user_variables.json file in \processors\db\configs. Could you send it so we can take a look?

-steinar
emcodem
Posts: 1749
Joined: Wed Sep 19, 2018 8:11 am

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by emcodem »

As you are on the other side of the world, i'll try to save us one full rotation :D
In case there is an issue with the json structure of the file user_variables.json you might easily be able to detect and repair yourself by just pasting the contents of the file into some online json validator.
Anyway, no matter if you are able to solve it this way or not, please upload the file so we can look at it too :geek:

On a sidenote, i guess all of us are very happy to hear from Australia here, amazing! You know, we do not really have any insight who/where FFAStrans is used at all...
emcodem, wrapping since 2009 you got the rhyme?
ausmetal
Posts: 5
Joined: Fri Oct 08, 2021 12:30 am

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by ausmetal »

Hello Emcodem and Steinar,

I massively appreciate the help. I work for a company that does a bit of everything in broadcast television. I'm an engineer, mainly looking after the post production side of things. Since the Corona Virus world tour is taking place, a lot of my home projects with FFASTrans and AVI Synth, automation and all things cloud/AWS are merging with with my occupation rapidly.

Anyways, back to problem at hand.
I went to the the location \processors\db\configs and the strangest thing, is that I don't see a user_variables.json file.
db-configs.jpg
db-configs.jpg (42.44 KiB) Viewed 6653 times
I don't know enough to tell if that's normal because I haven't configured any user variables yet? e.g. Audio Loudness/normalisation variables.

I'll leave it as is, I have no worries in reinstalling FFAStrans + web interface. This is just test bench stuff to see how the web interface works, so am happy to do whatever and take notes and share information.

Thank you again.
- Anthony
Sydney, Australia.
admin
Site Admin
Posts: 1680
Joined: Sat Feb 08, 2014 10:39 pm

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by admin »

Well that IS a bit strange...it should have been auto created :shock:

Anyway, could you just make a dummy variable and see if that helps?

-steinar
emcodem
Posts: 1749
Joined: Wed Sep 19, 2018 8:11 am

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by emcodem »

So we played a little bit and accidently found something but not sure if this is what affects you because it would not cause a crash in the "rest_service.exe" application.
Anyway, it could be very helpful to see what the webinterface says when ffastrans is running as application and you clicked one workflow in the webint (first screenshot from you).
To see the webint log output, stop the service and just start server.exe by doubleclick. after you clicked the workflow and see the error msg, copy about the last 50 lines please.

For example, what we found today was something like this:

Code: Select all

[[14:02:00.644]] [LOG]   calling  http://localhost:65445/api/json/v2/workflows/20211012-1041-4709-252a-c0e0e8b0a5c1/user_variables
[[14:02:00.653]] [LOG]   --------------------
[[14:02:00.654]] [LOG]   Response body:  File was empty : "C:\dev\ffastrans_1.2.1\FFAStrans\processors\db\configs\workflows\20211012-1041-4709-252a-c0e0e8b0a5c1.json "
Also, please zip and send the full /db directory, it should be easy for us to recreate your issue then.

EDIT:
It looks like there is a series of unfortunate events here :D First, the crash seems to be caused by the user_variables.json file not being existent, you can create it by just accessing the variable editor interface (maybe create some user_var), just hit the "<" button in any processor near to most text inputs and select the user_variables tab. After that check if the file exists as described above.
So, this is to fix the crash hopefully.
Second, the error message that you see when selecting some workflow comes down to a bug in ffastrans actually. Workflow submission should work as expected tough, you just cannot use the feature to expose variables to the user. Let me know if you need a quick solution for that and i'll send you a patched version of rest_service.exe.
emcodem, wrapping since 2009 you got the rhyme?
ausmetal
Posts: 5
Joined: Fri Oct 08, 2021 12:30 am

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by ausmetal »

Hello Emcodem and Steinar,

You guys have solved it. It was just as simple as you both had suggested; create a dummy variable json file and it then became happy.
I've now successfully submitted a job via the Webinterface and it has processed as it should.

Thanks again for the help,
Would you still like the db directory for future reference or anything else for future reference?
- Anthony
Sydney, Australia.
emcodem
Posts: 1749
Joined: Wed Sep 19, 2018 8:11 am

Re: Rest-Api service stops | Submit jobs via Web Interface

Post by emcodem »

Aye Anthony,

yeah i guess we already know whats the problem here, so no need for you to send us further files but thanks a lot for asking.
One thing that bugs me tough: you still see the yellow warning on the webinterface when you select a workflow for job submission, right?

By the way, also thanks for your quick introduction :D i guess it is just natural in your job that one steps over ffastrans at some point in time hehe... After at least all team members are working in a quite similar position as you are.
emcodem, wrapping since 2009 you got the rhyme?
Post Reply