1.4.0.4 API-service and command line

Here you can submit bugreports
Post Reply
Richyy
Posts: 13
Joined: Sat Aug 29, 2015 9:08 am

1.4.0.4 API-service and command line

Post by Richyy »

Hello! I have an interesting problem in the latest version. When the api service is running our FFmpeg command lines fail with either "drive not found" or "username or password is incorrect". Network drives are in the workflow. I tried several users for the API service. I tried mapped drives. Downgrade to 1.3.1 solved the issue. Also stoping the web service solves the problem. Any idea what causes this?
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: 1.4.0.4 API-service and command line

Post by emcodem »

Hi Richyy,

So there are 2 things of interest in this situation:
1) the service credentials: after re-installing the service you will need to go to services and set the username/password freshly
2) "run as application" and "process as application" checkboxes in Options->Config->Host settings. Both should be unchecked when you run as a service.

It was a topic internally that the application should NEVER automatically run jobs if the service is installed because it would run the jobs with different credentials than the service would do and this could lead to unexpected behaviour and even data loss in worst case. Unfortunately it looks like there went something wrong in 1.4.0.4 in that direction... @admin?
emcodem, wrapping since 2009 you got the rhyme?
Richyy
Posts: 13
Joined: Sat Aug 29, 2015 9:08 am

Re: 1.4.0.4 API-service and command line

Post by Richyy »

Hi emcodem!

The credentials: Yes I noticed. I tried every possible combination of restart service, full reboot, remove and install service with different users. To your second point: as soon as the api starts those settings are inactive.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: 1.4.0.4 API-service and command line

Post by emcodem »

Richyy wrote: Mon Mar 04, 2024 5:37 pm To your second point: as soon as the api starts those settings are inactive.


I checked this before i wrote my answer and for me the settings were not inactive even when the service was running. Maybe i was too fast tough. Now i see that the behaviour depends on if one actually closes and restarts the main application after service install. There is however still some confusion if you install the service and NOT close the workflow manager gui, in that case, if the service is installed but not running it will execute the jobs. If you however manage to start the service somehow, you can still see the 2 checkboxes checked even if the local application will not execute jobs.


Anyway, so there is no magic in ffastrans regarding file access, if the jobs run under the correct username, they will have access to the files.
What you can do to verify is open task manager and check under which username "ffastrans_queuer.exe" is running as. It should be the username you know that has access to the shares. Also, when submitting a job (e.g. using sleep 60 seconds), you will see an exe_manager.exe under the same credentials (because it is a child of the other process).
Note that ffastrans_queuer.exe is "new" since 1.4, in 1.3 it was named exe_manager.exe.

It depends also a little on what you do. E.g. it is interesting thhat you write a message saying "drive not found", this makes me wonder how you work because you would not usually get that message when working with UNC paths. Do you use UNC paths in your workflows or you got a SAN with SCSI and emulated local drives or how does it work for you? Are you maybe trying to access "mapped network drives"?
Maybe in the end it is like in 1.3 it never really ran as service but as local application instead?
emcodem, wrapping since 2009 you got the rhyme?
Richyy
Posts: 13
Joined: Sat Aug 29, 2015 9:08 am

Re: 1.4.0.4 API-service and command line

Post by Richyy »

UNC pathes everywhere. I hate mapped drives.

The first thing I checked was the running user name. It was the user with the correct credentials when 1.4 failed.

1.3.1 works fine for a few days now with the same settings that caused 1.4 to fail. It is a 3 host farm that was running without major problems for more then a year. Jobs are submited through the API although there is a failsafe watched folder. We stay at this version with this workflow.

Thanks for the help, I too was dumbfounded because I knew that what I had been seeing should have been impossible.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: 1.4.0.4 API-service and command line

Post by emcodem »

Hehe you are just like me :D
I only use the newest release for complete new installations and also only if the features that i need are tested and proven to work for my usecase. If you don't have the need to update then there is no reason to do it.
Anyway, maybe next time you can also monitor the running processes and see if they all run under the credentials you desire. We got a wiki page for processes (one that needs to be updated to match 1.4): https://ffastrans.com/wiki/doku.php?id=system:processes
emcodem, wrapping since 2009 you got the rhyme?
Post Reply