Git Product home page Git Product logo

Comments (15)

timurhai avatar timurhai commented on June 11, 2024

Hi!
You should run only start.cmd and it sources all other needed cmd files itself.
I think that "\cgru\lib\python was unexpected at this time." is a windows cmd.exe error output.
Check your custom setup_*.cmd files.
Some times it is very hard to find an error in cmd scripts as cmd.exe outputs not informative error messages.
Also spaces and quotes rules are not clean in windows os (as in unix).
Try to put cgru root folder in "c:" drive root and remove all spaces in it, if any. (simple place cgru in "c:\cgru" for example

from cgru.

ClonedPuppy avatar ClonedPuppy commented on June 11, 2024

That worked like a charm, thanks!

I have a question regarding path mapping. I have edited the pathmap.txt file in the afanasy directory. It's currently looking like this:

\192.168.200.96\mnt\media /mnt/media/

I'm not usre if I use this feature correctly, but I opened up a nuke script that was made on linux, and the readers / writers were pointing to /mnt/media/

Also, stupid question perhaps, but why not map it as Z: or whatever the nfs share is mounted at? Wouldn't that be easier?

Peter.

from cgru.

timurhai avatar timurhai commented on June 11, 2024

I did not got the question.
You can map anything you want to any drive.
Afanasy pathmap is just a strings searching&replacing mechanism.
It has one limitation only, it does not work with spaces. But in such "root" paths usually no spaces as root path usually are created not by users :)
Users can create paths with spaces and use afanasy, of course, but such paths are deeper in projects location and does not need replacement.

from cgru.

ClonedPuppy avatar ClonedPuppy commented on June 11, 2024

Oh I see, so if I would map Z: to /mnt/media that would work? Both ways so to speak? Nuke script made on linux versus a nuke script made on windows?

from cgru.

timurhai avatar timurhai commented on June 11, 2024

Yes. Path map on windows clients should be:

Z:\ /mnt/media

from cgru.

ClonedPuppy avatar ClonedPuppy commented on June 11, 2024

Hi, I can't seem to get this to work...

I have tried both Z:\ /mnt/media and /mnt/media Z:\ but Nuke doesn't seem to care at all...

The nuke script I'm testing with is made on linux, all readers have /mnt/media in their paths, I'm trying to get nuke on windows to change the /mnt/media to Z:\

The file I put the path mapping into is called pathmap.txt and is in the cgru/afanasy/ directory.

Each time I change the pathmap.txt file, i reload the config via the keeper.. no luck.

Any ideas what I'm doing wrong here..?

Peter.

from cgru.

ClonedPuppy avatar ClonedPuppy commented on June 11, 2024

I'm also getting a error in the terminal on the windows machine when I send a nuke job to it (from linux). It's telling me:

AFERROR: Working Directory does not exist:
/home/camper (our artists home directory)
Started PID=3700: [nuke:1000] afadmin: blackhawk_job.nk-Blackhawk Nuke Job 01[comp-preview][frame79]
Finished PID=3700: Exit Code=1

Not sure if this is related to the above..

Peter.

from cgru.

ClonedPuppy avatar ClonedPuppy commented on June 11, 2024

Mapping C:\temp /home/camper seem to work, so afanasy is reading the pathmap.txt correctly (I checked by writing some gibberish in the file, and afrender complained correctly). Now I don't have the "Working directory does not exist" error anymore, however it still won't render. Looking at the logs, this is what it tells me:

Fri 08 Jun 04:13.50 : Registered online.
Fri 08 Jun 04:44.47 : ZOMBIETIME: 60 seconds.
Fri 08 Jun 04:44.47 : Resources: la[0,0,0]; C2612x4 u3% n0% s5% i91% o0% r0% f0%; M6142 F4474 C0 B0 S12283/1820 H139/52 N28/896 D6"16:0%
Fri 08 Jun 04:44.47 : Offline.
Sun 10 Jun 22:50.37 : "nimby" set to false by Scott Test@scratch
Sun 10 Jun 22:57.18 : Online v'1.6.3'.
Sun 10 Jun 23:48.15 : Render deregister request.
Sun 10 Jun 23:48.15 : Resources: la[0,0,0]; C2612x4 u6% n0% s7% i86% o0% r0% f0%; M6142 F3965 C0 B0 S12283/2169 H139/51 N0/0 D0"10:0%
Sun 10 Jun 23:48.15 : Offline.
Sun 10 Jun 23:48.47 : Online v'1.6.3'.
Sun 10 Jun 23:50.58 : Render deregister request.
Sun 10 Jun 23:50.58 : Resources: la[0,0,0]; C2612x4 u0% n0% s1% i97% o0% r0% f0%; M6142 F3953 C0 B0 S12283/2203 H139/51 N4/39 D0"0:0%
Sun 10 Jun 23:50.58 : Offline.
...

My current mapping is:

Z:\CGRU\ /mnt/media/CGRU/ (all files and renders are going into the CGRU directory I created on the media server, just to make things simple for now)

C:\temp /home/camper

Peter.

from cgru.

timurhai avatar timurhai commented on June 11, 2024

"Render deregister request." - this log (on afserver render node) happens when render sends a special message on server on exit. For example if you run in terminal and press CTRL+C. Or if it launched as daemon and "/etc/init.d/afrender stop".

"Working Directory does not exist:" - this log produces afrender in stderr when it asked to start a process in a folder that does not exist. This is not a critical error. It just launch a process in with no working directory change. If you are not using relative paths you can ignore this error at all.

"ZOMBIETIME: 60 seconds." - this means that afrender did not send an update for this time. And by default config after 60 seconds afserver thinks that there is no network connection or render have hung. Server change render state to offline.

In your case, as i think, some other process sends afrender process a signal to exit. May be it sounds strange, but by logs it is so :)
This signal it sends in a class destructor https://github.com/CGRU/cgru/blob/master/afanasy/src/render/renderhost.cpp
And that is the only one place.

What do you mean under " it still won't render" exactly? It is online, ready to take a task and you have a job with ready tasks, but it does not take one? Or afrender always goes to 'offline' state?

from cgru.

ClonedPuppy avatar ClonedPuppy commented on June 11, 2024

Hi, thank you for your answer. I have to admit I don't fully understand how the path mapping works internally. In the end I entered every combination possible in both the windows clients pathmap.txt as well as the network wide pathmap.txt for the linux clients. It's as following:

Client: Server:

/mnt/hq/afanasy/centos/cgru/ C:\CGRU
/mnt/media/CGRU/ Z:\CGRU
/home/camper C:\Users\aftest

C:\cgru\ /mnt/hq/afanasy/centos/cgru/
Z:\CGRU\ /mnt/media/CGRU/
C:\Users\aftest /home/camper

And lo and behold, it worked. Not sure why.. ;)

Most of the linux machines render fine now when they get a nuke script from a windows machine, however I see about 10% of them failing to render, only thing it tells me is that they exit with error code: 256. Trying to figure out why this is happening at the moment. Getting closer to a 100% working setup!

Peter.

from cgru.

timurhai avatar timurhai commented on June 11, 2024

Hi!
As for your case:
on windows clients you should have:
C:\cgru\ /mnt/hq/afanasy/centos/cgru/
Z:\CGRU\ /mnt/media/CGRU/
C:\Users\aftest /home/camper
and on linux can have no path map at all

Paths map works on artist workstation on job submission at first, to translate every command and working folder from "client" to "server" side. Later, when server sends a task to render node it translates command and wdir back from "server" to "client side. Server does not case about any paths or commands at all. So "server" paths can be some fiction to translate too and to translate from only. But practically server paths are linux paths (and server usually on linux), windows workstations and render nodes have pathmap windows<->linux and linux workstations and render nodes does not translate paths at all.

All this paths map theme about afanasy tasks commands, working directories and job(block) post commands only. Your software scenes should case about same paths on different OSes itself. For example Houdini has $HIP variable, where scene is located and you can have all source files related to it. Only Nuke submission and render script translate paths, by parsing a scene (it has text format) and saving it translated: submission script saves scene to render in server paths, on render node nuke render script saves translated scene in temporary folder before start it to load to render.

If you are going to teach some your own submission (soft) to translate paths you can use the same afanasy python module.

Another good way to have the same paths in different OSes is to use relative paths. Launch soft in project folder for example.

Also windows7 allows to mount remote folder in some local folder, like other unixes. If you start path without a drive letter, it takes current process working folder drive. Most software and cmd.exe understand both "" and "/" slashes. So you can have the same paths in linux and windows!

from cgru.

ClonedPuppy avatar ClonedPuppy commented on June 11, 2024

Thank you Timur, very helpful!

Just one question, the path mapping I need to have to send a job FROM linux to Windows, would need to be on the linux workstation yes? Is the afanasy server smart enough to pathmap only the command strings that it send to it's windows nodes? (I guess so!)

Example:

On a linux nuke machine, I would have the following in my pathmap:

/mnt/hq/afanasy/centos/cgru/ C:\cgru\
/mnt/media/CGRU/ Z:\CGRU\
/home/camper C:\Users\aftest

Peter.

from cgru.

timurhai avatar timurhai commented on June 11, 2024

Afanasy server does not case about OSes too. Just client send some string that represent OS type, and a job can have a property "os_needed" to run on special OS(es) only.

If you have mostly linux farm, you can can have
/mnt/hq/afanasy/centos/cgru/ C:\cgru\
/mnt/media/CGRU/ Z:\CGRU\
/home/camper C:\Users\aftest
pathmap on linux and nothing on windows.

from cgru.

ClonedPuppy avatar ClonedPuppy commented on June 11, 2024

Hi, ok took us awhile but I think we got the hang of path mapping now ;)
Thanks for all your help so far, really appreciated!

Peter.

from cgru.

3dcoat avatar 3dcoat commented on June 11, 2024

Hi, windows > where is the pathmapping file set location ?
Trying to config set output folder = no luck
explorer "\IP#\folder name" works fine with winkey+R
Tkx !

from cgru.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.