In src/exec/dpexec/dxmain.c (line 1283) it is doing

    gethostname(_dxd_exHostName, MAXHOSTNAMELEN);
    if ( ExHostToFQDN(_dxd_exHostName, _dxd_exHostName ) == ERROR )

the ExHostToFQDN does a 'gethostbyname' which fails.

Seems the gethostname does not return a valid hostname (which has been set by sethostname). I don't think it uses the 'HOSTNAME' environment variable at all.


Could it be that Apache is passing on a stripped 'environment'?

Can you explicitly provide a host on the command line when you invoke Dx?

Mattijs

Matthias Kraatz wrote:
Hello everyone,
I would like to provide a service to the collegues in my workgroup where there can upload a datafile and get a graphics image in return (since - unlike me - not everybody is thrilled by the hassle of working dx, though appriciating dx's superior graphics qualities).

Easy I thought, I just have to make a system call from a cgi-script like
"dx -script somescriptfile"
after appropriately modefying somescriptfile so it contains the correct name of the uploaded file.

But doing so I get this odd error message from dx:

<quote>

Starting DX executive
Open Visualization Data Explorer
More Info at www.research.ibm.com/dx
and www.opendx.org
Version - 4.3.0
Memory cache will use 256 MB (16 for small items, 240 for large)

0:  ERROR:  gethostbyname returned error
0: ERROR: Unexpected error: gethostbyname error--is it possible this machine doesn't have a DNS/host entry?
Error during Initialization
gethostbyname error--is it possible this machine doesn't have a DNS/host entry?
ExHostToFQDN failed

</quote>

This does not happen when I invoke the script manually from the shell. Maybe the root cause is not dx but the underlying system. I am using apache 1.3, cygwin 1.5, win2k pro as dev-environment. I have not checked if the same error occurs under solaris2.9. I am aware that the apache daemon receives only a limited environment variable set, but I have passed a whole lot I considered to be important like HOSTNAME, OSTYPE, the DX variables. Are the any other pertinent variables that I forgot? It would be interesting to know if anyone else has tried something similar like webinterfacing the script facility of dx or if anyone has the slightest idea where the error quoted above comes from.

Thanks and best regards,
Matthias Kraatz


--
/*---------------------------------------------------------*\
| ===========           Mattijs Janssens                    |
| \\        /           Development Engineer                |
|  \\      /                                                |
|   \\    /             Nabla Ltd.                          |
|    \\  /              The Mews, Picketts Lodge            |
|     \\/               Picketts Lane, Salfords,            |
|     F ield            Surrey RH1 5RG.                     |
|     O peration        Tel: +44 (0)1293 821272             |
|     A nd              Email: [EMAIL PROTECTED]       |
|     M anipulation     URL: http://www.Nabla.co.uk         |
\*---------------------------------------------------------*/

Reply via email to