[vtkusers] [ParaViewWeb] compile problem with class vtkJPEGWriter and function SetInput

Sebastien Jourdain sebastien.jourdain at kitware.com
Fri Apr 20 12:39:51 EDT 2012


You are welcome Tuan,

that setting really depend on where you deploy ParaViewWeb. On our
server, we do have a X server on our machine so the GPU can be used
for the rendering.

On Fri, Apr 20, 2012 at 11:11 AM, Tuan Ha Tran
<tuan-ha.tran at insa-lyon.fr> wrote:
> Seb,
>      So I found the solution, I think that is obvious to you but however,
> I'll write out my solution so it could be useful later.
>      In CCMake of ParaView, because there is "bad X server connection", so
> we must disable X
>      - VTK_OPENGL_HAS_OSMESA            ON
>      - VTK_USE_OFFSCREEN                        ON
>      - VTK_USE_X                                           OFF
>
>      And then bingo.
>      So thank you very much for helping me all these times.
>
>
> ----- Original Message -----
> From: Sebastien Jourdain <sebastien.jourdain at kitware.com>
> To: Tuan Ha Tran <tuan-ha.tran at insa-lyon.fr>
> Cc: vtkusers at vtk.org, Frederic Cervenansky
> <frederic.cervenansky at creatis.insa-lyon.fr>
> Sent: Fri, 20 Apr 2012 14:11:37 +0200 (CEST)
> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class
> vtkJPEGWriter and function SetInput
>
> Sure I do.
>
> The PWServer process need to have access to the X server as it is
> using OpenGL to do the rendering.
> Basically tomcat need to run on a graphical session, and that session
> needs to remains open. Otherwise, you will need to build ParaView with
> OSMesa. OSMesa will use the CPU instead of of the GPU and therefore
> will be slower but then you will be able to run the server without any
> graphical session.
>
> That's the whole purpose of that wiki section which is meant to
> advanced user that have some constraints on their deployment... (No
> GPU and want to use system package)
>
> ParaViewWeb with system tomcat package: This section explain how to
> use a system tomcat package with ParaViewWeb on headless server.
> (Offscreen rendering + system security setting)
>
> Seb
>
> On Fri, Apr 20, 2012 at 3:57 AM, Tuan Ha Tran wrote:
>> Hi Seb,
>>    So, in the log file, it "bad X server connections"
>> with "vtkXOpenGLRenderWindow".
>>    I checked the configuration of pw-config.properties but nothing
>> abnormal.
>>    If you have any idea ...
>>
>>
>> ----- Original Message -----
>> From: Sebastien Jourdain
>> To: Tuan Ha Tran
>> Cc: vtkusers at vtk.org, Frederic Cervenansky
>>
>> Sent: Thu, 19 Apr 2012 15:30:40 +0200 (CEST)
>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class
>> vtkJPEGWriter and function SetInput
>>
>> Try to stop all the services (tomcat + activemq). Remove all the logs
>> of tomcat and the one that are inside WORK_DIR/logs that you setup in
>> CMake and that is specified inside the pw-config.propertie.
>>
>> Once done, start again activemq and tomcat. Test again and if it
>> fails, you will have to look at all those logs to see if you have any
>> feedback of the reason of the issue...
>>
>> Seb
>>
>> On Thu, Apr 19, 2012 at 4:43 AM, Tuan Ha Tran wrote:
>>> Seb,
>>> All theses problems are gone, but now, the latest :
>>> When I tried to create a new session, now nothing appears, and I have, in
>>> my
>>> "Apache-activemq" shell "INFO | Transport failed: java.io.EOFException"
>>> If you can help me ..... thank you very much indeed
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>> From: Sebastien Jourdain
>>> To: Tuan Ha Tran
>>> Cc: vtkusers at vtk.org, Frederic Cervenansky
>>>
>>> Sent: Wed, 18 Apr 2012 19:01:48 +0200 (CEST)
>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class
>>> vtkJPEGWriter and function SetInput
>>>
>>> What do you mean by "my apache-tomcat-7.0.26" ?
>>> If it's a tgz file that you download with your user, you DO NOT HAVE
>>> TO read the documentation
>>> "http://www.paraview.org/Wiki/ParaViewWeb_with_system_tomcat_package"
>>>
>>> By system tomcat, I mean: "apt-get install tomcat"
>>> And with system tomcat, it is trickier to install ParaViewWeb due to
>>> security reason... (class path, security grant...)
>>> That's why a custom read me is provided otherwise, you just setup a
>>> path where you want tomcat to write its data and that's it...
>>>
>>> Seb
>>>
>>>
>>> On Wed, Apr 18, 2012 at 12:52 PM, Sebastien Jourdain
>>> wrote:
>>>> How did you installed tomcat ?
>>>>
>>>> Seb
>>>>
>>>> On Wed, Apr 18, 2012 at 11:59 AM, Tuan Ha Tran
>>>> wrote:
>>>>> So the result is "No", always the same error.
>>>>> Yes, another information : I didn't find any file named
>>>>>              /etc/init.d/tomcat6,
>>>>>              /var/lib/tomcat6/conf/policy.d/03catalina.policy,
>>>>>              /var/lib/tomcat6/conf/policy.d/04webapps.policy
>>>>> so I went to conf folder in my apache-tomcat-7.0.26 and added all in
>>>>> "catalina.policy"
>>>>>
>>>>>
>>>>>
>>>>> ----- Original Message -----
>>>>> From: Tuan Ha Tran
>>>>> To: Sebastien Jourdain
>>>>> Cc: vtkusers at vtk.org, Frederic Cervenansky
>>>>>
>>>>> Sent: Wed, 18 Apr 2012 17:53:48 +0200 (CEST)
>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class
>>>>> vtkJPEGWriter and function SetInput
>>>>>
>>>>> Thank you for your reponse.
>>>>> As I said, I followed the tutorial in the
>>>>> "http://www.paraview.org/Wiki/ParaViewWeb_with_system_tomcat_package"
>>>>>
>>>>> cd ..
>>>>> chown -R tomcat6 paraviewweb-work
>>>>> chgrp -R tomcat6 paraviewweb-work
>>>>>
>>>>>
>>>>> And, the right is set to tomcat (because there is an error "no user
>>>>> named
>>>>> tomcat6") (I don't know if we can use root)
>>>>> However, I will try with root and we'll see.
>>>>> Thank again Seb
>>>>>
>>>>>
>>>>> ----- Original Message -----
>>>>> From: Sebastien Jourdain
>>>>> To: Tuan Ha Tran
>>>>> Cc: vtkusers at vtk.org, Frederic Cervenansky
>>>>>
>>>>> Sent: Wed, 18 Apr 2012 17:31:51 +0200 (CEST)
>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class
>>>>> vtkJPEGWriter and function SetInput
>>>>>
>>>>> Hi Tuan,
>>>>>
>>>>> Those your local tomcat that run under your user has the right to
>>>>> write in that directory ?
>>>>>
>>>>> /var/lib/tomcat6/paraviewweb-work/ ?
>>>>>
>>>>> Seb
>>>>>
>>>>> On Wed, Apr 18, 2012 at 11:10 AM, Tuan Ha Tran
>>>>> wrote:
>>>>>> Hi Seb,
>>>>>>     I have another thing to ask you (I'm sorry if this question is
>>>>>> already
>>>>>> asked, but I found my problem different)
>>>>>>     I use super build to build ParaViewWeb with all the settings by
>>>>>> default.
>>>>>> It's done.
>>>>>>
>>>>>>     Next :
>>>>>>     - I downloaded the apache-tomcat-7.0.26
>>>>>>     - Copied all the *.war generated by the SuperBuild into
>>>>>> tomcat7.0.26's
>>>>>> webapps folder
>>>>>>     - Copied pw-config.properties into apache-tomcat-7.0.26/lib
>>>>>>
>>>>>>     To run PWApps,
>>>>>>     - I started JMS broker d4apache Activemq, the latest version is
>>>>>> 5.5.1
>>>>>> (./activemq-admin start)
>>>>>>     - I started server Tomcat (./catalina.sh start)
>>>>>>
>>>>>>     Result: when I tried to open a session in PWApps @
>>>>>> http://localhost:8080/PWApp/
>>>>>>     the error appeared : An error occured during the loading.
>>>>>> org.hibernate.exception.GenericJDBCException: Cannot open connection
>>>>>>
>>>>>>
>>>>>>     It's absolutely a problem with hibernate, the connection with the
>>>>>> database. But I don't quite understand how to fix this.
>>>>>>     Do we have to modify pw-config.properties? What do we have to do?
>>>>>>
>>>>>>     About the working directory, I followed the tutorial @
>>>>>> http://www.paraview.org/Wiki/ParaViewWeb_with_system_tomcat_package.
>>>>>>     Thank you for your help.
>>>>>>
>>>>>>
>>>>>> ********************************************************************
>>>>>> ***************** pw-config.properties
>>>>>> **********************************
>>>>>> ********************************************************************
>>>>>>
>>>>>> # Directory used to store application files
>>>>>> pw.working.directory=/var/lib/tomcat6/paraviewweb-work/
>>>>>>
>>>>>> # Logging level that should be used [DEBUG, INFO, WARNING, ERROR,
>>>>>> CRITICAL]
>>>>>> pw.logging.level=ERROR
>>>>>>
>>>>>> # Do we enable logging [on, off, yes, no]
>>>>>> paraview.logging=OFF
>>>>>> pw.logging=ON
>>>>>>
>>>>>> # Inactivity timeout for garbage collecting PWServer applications
>>>>>> # time is given in minute
>>>>>> pw.garbage.collector.timeout=5
>>>>>>
>>>>>> # Administration page user credentials
>>>>>> pw.admin.login=admin
>>>>>> pw.admin.password=admin
>>>>>>
>>>>>> # Total number of resources available
>>>>>> pw.max.resources=5
>>>>>>
>>>>>> # PWServer executable path settings
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> pw.executable.path.default=/var/lib/tomcat6/paraviewweb-work/bin/PWServer.sh
>>>>>> #
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> pw.executable.path.parallel=/home/thtran/projects/ParaViewWeb/install-pw/bin/PWServer
>>>>>> # pw.executable.path.manta=/home/seb/tmp/ParaWeb-work/exec/manta.sh
>>>>>>
>>>>>> # pvserver executable path settings
>>>>>> #
>>>>>> pvserver.executable.path.demo=/home/seb/tmp/ParaWeb-work/exec/demo.sh
>>>>>>
>>>>>> # Plugin directory settings
>>>>>> pw.plugins.default=/var/lib/tomcat6/paraviewweb-work/plugins
>>>>>> # pw.plugins.parallel=/usr/local/PVW/PWSer_WD/plugins
>>>>>> # pw.plugins.manta=/usr/local/PVW/PWSer_WD/plugins
>>>>>>
>>>>>> # Resource consumption definition
>>>>>> pw.resource.consumption.default=1
>>>>>> # pw.resource.consumption.parallel=4
>>>>>> # pw.resource.consumption.manta=2
>>>>>>
>>>>>> # Optional thirdpart properties
>>>>>> pw.gwt-app.data=/var/lib/tomcat6/paraviewweb-work/data
>>>>>> pw.gwt-app.states=/var/lib/tomcat6/paraviewweb-work/states
>>>>>> # pw.gwt-app.webgl=/usr/local/PVW/PWSer_WD/webgl
>>>>>> pw.gwt-app.confs=default
>>>>>> # Optional PWApp upload properties
>>>>>> # - size in MegaBytes
>>>>>> # - timeout in minute
>>>>>> # - types provides the set of extension allowed
>>>>>> pw.gwt-app.upload.size=10
>>>>>> pw.gwt-app.upload.timeout=2
>>>>>> pw.gwt-app.upload.types=vtp:vtk
>>>>>>
>>>>>> # Remote server command line
>>>>>> #  * Tomcat will call any script in the following directory and will
>>>>>> execute
>>>>>> the
>>>>>> #    following command line where portnumber is an available
>>>>>> portnumber:
>>>>>> #       > fullScriptPath username password
>>>>>> #  * Documentation on How to start a pvserver
>>>>>> #    - http://www.cmake.org/Wiki/Setting_up_a_ParaView_Server
>>>>>> # pw.remote.settings=/usr/local/PVW/PWSer_WD/remote-settings
>>>>>>
>>>>>> pw.remote.log.dir=/var/lib/tomcat6/paraviewweb-work/logs
>>>>>>
>>>>>> # Optional PWStateApp working directory
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> pw.state.working.directory=/var/lib/tomcat6/paraviewweb-work/states-workdir
>>>>>>
>>>>>> ***********************************************************
>>>>>> ************ end of pw-config.properties*************************
>>>>>> ***********************************************************
>>>>>>
>>>>>>
>>>>>> ----- Original Message -----
>>>>>> From: Sebastien Jourdain
>>>>>> To: Tuan Ha Tran
>>>>>> Cc: vtkusers at vtk.org
>>>>>> Sent: Fri, 06 Apr 2012 19:33:40 +0200 (CEST)
>>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class
>>>>>> vtkJPEGWriter and function SetInput
>>>>>>
>>>>>> You should use ParaView 3.14.
>>>>>>
>>>>>> I'm sure you are doing something wrong that I'm not aware of, because
>>>>>> I'm using ParaViewWeb with ParaView 3.14 myself. So if I managed to
>>>>>> build it, you should too, unless we are doing something different.
>>>>>>
>>>>>> What did you do with the SuperBuild ? Did it manage to fetch ParaView
>>>>>> and ParaViewWeb and start building those as well as their dependency
>>>>>> like apr ?
>>>>>>
>>>>>> Seb
>>>>>>
>>>>>> On Fri, Apr 6, 2012 at 11:04 AM, Tuan Ha Tran wrote:
>>>>>>> Hi,
>>>>>>>  I tried your solution with SuperBuild but the problem still exist.
>>>>>>>  I wonder if I should reuse ParaView 3.10.1?
>>>>>>>
>>>>>>>  Thank you Seb
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> From: "Sebastien Jourdain"
>>>>>>> To: "Tuan Ha Tran"
>>>>>>> Cc: vtkusers at vtk.org
>>>>>>> Sent: Friday, April 6, 2012 4:53:43 PM
>>>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class
>>>>>>> vtkJPEGWriter and function SetInput
>>>>>>>
>>>>>>> Hi Tuan Ha Tran,
>>>>>>>
>>>>>>> The documentation was written when ParaView 3.10 was out and that
>>>>>>> version was lacking some fixed that were on git/master at that time
>>>>>>> but I should definitely update the documentation to recommend to use
>>>>>>> ParaView 3.14 and not git/master.
>>>>>>> In fact, two weeks ago the latest changes in VTK that breaks its
>>>>>>> backward compatibility went into ParaView and for which I didn't get
>>>>>>> the time to update ParaViewWeb.
>>>>>>>
>>>>>>> Regarding your ParaView build issue, I'm wondering what you did...
>>>>>>> But
>>>>>>> anyway, if you want to ease the build process, you should definitely
>>>>>>> try to use the SuperBuild package so every third party get
>>>>>>> automatically compiled for you with the correct arguments and
>>>>>>> options.
>>>>>>>
>>>>>>> http://www.paraview.org/Wiki/ParaViewWeb_SuperBuild
>>>>>>>
>>>>>>> Seb
>>>>>>>
>>>>>>> On Fri, Apr 6, 2012 at 9:25 AM, Tuan Ha Tran wrote:
>>>>>>>> Seb,
>>>>>>>> Thank you for your reply. I just followed the instructions in the
>>>>>>>> ParaViewWeb site.
>>>>>>>> - Mkdir ParaViewWeb
>>>>>>>> - Clone git from it address
>>>>>>>>
>>>>>>>> I used the Ccmake command (in build-pw) for the source in the
>>>>>>>> ParaViewWeb
>>>>>>>> directory (build-pw is a sub-directory of ParaViewWeb). I compiled
>>>>>>>> and
>>>>>>>> then
>>>>>>>> the errors.
>>>>>>>> I used the latest release (3.14) of ParaView.
>>>>>>>>
>>>>>>>> there was a problem with ParaView, it is the problem of share
>>>>>>>> library.
>>>>>>>> but I resolved this by adding -fPIC in the CFLAGS and CXXFLAGS, I
>>>>>>>> don't
>>>>>>>> know
>>>>>>>> if that is the problem.
>>>>>>>>
>>>>>>>> so, the vtkJPEGWriter is in the ParaView folder?
>>>>>>>>
>>>>>>>> Thank you once more.
>>>>>>>>
>>>>>>>> ----- Original Message -----
>>>>>>>> From: "Sebastien Jourdain"
>>>>>>>> To: "Tuan Ha Tran"
>>>>>>>> Cc: vtkusers at vtk.org
>>>>>>>> Sent: Friday, April 6, 2012 3:11:17 PM
>>>>>>>> Subject: Re: [vtkusers] [ParaViewWeb] compile problem with class
>>>>>>>> vtkJPEGWriter and function SetInput
>>>>>>>>
>>>>>>>> Hi Tuan Ha Tran,
>>>>>>>>
>>>>>>>> how did you build ParaViewWeb ? Did you do from the super build or
>>>>>>>> from the main repository ?
>>>>>>>> ParaViewWeb basically rely on ParaView that embed VTK which embed
>>>>>>>> that
>>>>>>>> vtkJPEGWriter.cxx
>>>>>>>> Which version of ParaView did you used ? The latest release (3.14)
>>>>>>>> is
>>>>>>>> known to work...
>>>>>>>>
>>>>>>>> Seb
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Apr 6, 2012 at 5:12 AM, Tuan Ha Tran wrote:
>>>>>>>>> Hi everybody,
>>>>>>>>>   I have a problem when trying to compile ParaViewWeb
>>>>>>>>>   This is the detail of my problem
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ***********************************************************************
>>>>>>>>> %] Built target ParaWebPlugin
>>>>>>>>> Scanning dependencies of target PWServer
>>>>>>>>> [ 30%] Building CXX object
>>>>>>>>> ParaViewAdapter/CMakeFiles/PWServer.dir/vtkPWProcessingEngine.cxx.o
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> /home/thtran/projects/ParaViewWeb/ParaViewAdapter/vtkPWProcessingEngine.cxx:
>>>>>>>>> In member function ‘double
>>>>>>>>> vtkPWProcessingEngine::ProcessAndSendImage(const
>>>>>>>>> char*, vtkImageData*)’:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> /home/thtran/projects/ParaViewWeb/ParaViewAdapter/vtkPWProcessingEngine.cxx:439:19:
>>>>>>>>> error: ‘class vtkJPEGWriter’ has no member named ‘SetInput’
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> /home/thtran/projects/ParaViewWeb/ParaViewAdapter/vtkPWProcessingEngine.cxx:448:18:
>>>>>>>>> error: ‘class vtkPNGWriter’ has no member named ‘SetInput’
>>>>>>>>> make[2]: ***
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> [ParaViewAdapter/CMakeFiles/PWServer.dir/vtkPWProcessingEngine.cxx.o]
>>>>>>>>> Error
>>>>>>>>> 1
>>>>>>>>> make[1]: *** [ParaViewAdapter/CMakeFiles/PWServer.dir/all] Error 2
>>>>>>>>> make: *** [all] Error 2
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *************************************************************************
>>>>>>>>>
>>>>>>>>> When I went to the "wtkPWProcesingEngine.cxx", I found out that
>>>>>>>>> wtkJPEGWriter is included by #include vtkJPEGWriter.h". But I
>>>>>>>>> couldn't
>>>>>>>>> find
>>>>>>>>> wtkJPEGWriter.h neither vtkJPEGWriter.cxx.
>>>>>>>>>
>>>>>>>>> When I tried to look for vtkJPEGWriter.cxx by Google, I found this
>>>>>>>>> file
>>>>>>>>> but I couldn't find any function "SetInput".
>>>>>>>>>
>>>>>>>>> When I tried to deactivate the line where SetInput is located,
>>>>>>>>> ParaViewWeb compile, but I think there are some problems with it.
>>>>>>>>>
>>>>>>>>> I want to know if someone has the same problem? How to fix that?
>>>>>>>>> Thank you all.
>>>>>>>>>
>>>>>>>>> Ha
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Powered by www.kitware.com
>>>>>>>>>
>>>>>>>>> Visit other Kitware open-source projects at
>>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>>>
>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>>>>>
>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>>>
>>>>>
>>>
>>
>



More information about the vtkusers mailing list