Menu

Help ? cannot upload files

Help
2009-04-24
2013-05-21
  • pradeepta swain

    pradeepta swain - 2009-04-24

    Hi ,
          I found this tool very much interesting and I am trying to use it for one of my project . I have successfully installed ground report , I have run grinder and generated statistics file like data and out log files , and i want to upload files to the database , so that i'll be able to generate reports , but when I am trying to upload data files , it is saying that ..

    couldn't open file "d" for reading : No such file or directory

    I am using these properties in data.properties file

    fileType=data
    dataType=norm
    fileList = "data_grinder-agent-0.log","data_grinder-agent-1.log"

    Please Help ??

    Waiting for your reply

    Thanks
    Pradeepta

     
    • Calum

      Calum - 2009-07-06

      Hi Pradeepta,

      My apologies for not having got back to you sooner. For some reason I have only just seen you post!

      I am going to assume that you are using version 1.2.

      you need to change the filelist entry to be as follows:

      fileList = ["data_grinder-agent-0.log","data_grinder-agent-1.log" ]

      you were missing the square brackets [ ]

      My apologies again for having missed your post.

      Cheers
      Calum

       
    • Tree Lin

      Tree Lin - 2009-08-12

      Hi all,
      when I uploaded files, I encounted following problem:
      ERROR: extra data after last expected column [SQLCode: 0], [SQLState: 22P04]

      Accordingly, data.properties:
      # Set File Type (data or descr)
      #
      fileType=data
      #
      # Set Data Type (http or norm)
      #
      dataType=norm
      #
      # Set File List
      # NB : ensure that filenames are enclosed in quotes
      #      separate filenames with a comma "," and no whitespaces
      #      ensure that you always use a "/" for a directory separator even on Windows
      #
      #fileList=["/path/to/file"]
      fileList=["D:/program/ground_report-0.5/path/to/data/data_HIH-D-388-0.log"]

      When I changed the dataType into "http", following error happed.
      ERROR: value " 1250066206771" is out of range for type integer [SQLCode:0], [SQLState: 22003].
      why? How can I upload files successfully?

      Appreciate your help!

       
      • Calum

        Calum - 2009-08-12

        Hi,

        Is the data in your file from testing a website? In which case choosing http is the right option.

        I am curious as to why there is a 13 digit number in the data file. The type "integer" for postgresql only handles up to 12 digits in a number. This is the reason for the error.

        Which version of the Grinder are you using?
        On which OS are the Grinder agents being run?
        Under which column in the data file is the 13 digit number occurring?
        Would it be possible for you to attach a (small) data file so that I can investigate?

        Cheers
        Calum

         
        • Calum

          Calum - 2009-08-12

          Which version of the Ground report are you using?
          It appears that you are using 0.5 from the posted content.

          If you are using The Grinder 3.1 and above then you should be using the Ground Report 1.2

          If you are using The Grinder 3.0 and below then you should be using the Ground Report 0.5

          Cheers
          Cal

           
        • Tree Lin

          Tree Lin - 2009-08-12

          Hi Calum,
          Thank you for your replies.  I have updated related tools as follows.

          Jython 2.5.0
          Ground_report-1.2
          PostgreSQL 8.4

          And the data in my file is from website.

          But after that, I ran the databaseInterface script in the bin directory. Follwing error happened:
          D:\work\ground_report-1.2\bin>databaseInterface.bat
          *sys-package-mgr*: can't create package cache dir, 'D:\program\jython2.5.0 –Dpyt
          hon.cachedir=D:\work\ground_report-1.2\var\cache\cachedir\packages'
          Traceback (most recent call last):
          File "D:/work/ground_report-1.2/lib/databaseInterface.py", line 1, in <module>
                  import os
          ImportError: No module named os

          data.properties:
          # Set File Type (data or descr)
          #
          fileType=data
          #
          # Set Data Type (http or norm)
          #
          dataType=http
          #
          # Set File List
          # NB : ensure that filenames are enclosed in quotes
          #      separate filenames with a comma "," and no whitespaces
          #      ensure that you always use a "/" for a directory separator even on Windows
          #
          #fileList=["/path/to/data/data.log"]
          fileList=["D:/work/data_mycomputer-0.log"]

           
        • Tree Lin

          Tree Lin - 2009-08-12

          Sorry I want to say the data in my file was from testing a website not from websit.

          Attached part of log data:

          Thread, Run, Test, Start time (ms since Epoch), Test time, Errors, HTTP response code, HTTP response length, HTTP response errors, Time to resolve host, Time to establish connection, Time to first byte
          0, 0, 101, 1250092178421, 2266, 0, 200, 3484, 0, 2032, 2079, 2250
          0, 0, 100, 1250092178421, 2266, 0, 0, 0, 0, 0, 0, 0
          0, 0, 201, 1250092180687, 172, 0, 204, 0, 0, 0, 0, 172
          0, 0, 200, 1250092180687, 172, 0, 0, 0, 0, 0, 0, 0
          0, 0, 301, 1250092185078, 47, 0, 200, 252, 0, 0, 0, 31
          0, 0, 300, 1250092185078, 47, 0, 0, 0, 0, 0, 0, 0
          0, 0, 401, 1250092185265, 47, 0, 200, 232, 0, 0, 0, 47
          0, 0, 400, 1250092185265, 47, 0, 0, 0, 0, 0, 0, 0
          0, 0, 501, 1250092185968, 47, 0, 200, 252, 0, 0, 0, 47
          0, 0, 500, 1250092185968, 47, 0, 0, 0, 0, 0, 0, 0
          0, 0, 601, 1250092187234, 47, 0, 200, 236, 0, 0, 0, 47
          0, 0, 600, 1250092187234, 47, 0, 0, 0, 0, 0, 0, 0
          0, 0, 701, 1250092187312, 47, 0, 200, 256, 0, 0, 0, 47
          0, 0, 700, 1250092187312, 47, 0, 0, 0, 0, 0, 0, 0
          0, 1, 101, 1250092248531, 203, 0, 200, 3473, 0, 0, 31, 203
          0, 1, 100, 1250092248531, 203, 0, 0, 0, 0, 0, 0, 0
          0, 1, 201, 1250092248734, 156, 0, 204, 0, 0, 0, 0, 156
          0, 1, 200, 1250092248734, 156, 0, 0, 0, 0, 0, 0, 0
          0, 1, 301, 1250092252531, 31, 0, 200, 252, 0, 0, 0, 31
          0, 1, 300, 1250092252531, 31, 0, 0, 0, 0, 0, 0, 0

           
    • Tree Lin

      Tree Lin - 2009-08-12

      Hi all,
      when I uploaded files, I encounted following problem:
      ERROR: extra data after last expected column [SQLCode: 0], [SQLState: 22P04]

      Accordingly, data.properties:
      # Set File Type (data or descr)
      #
      fileType=data
      #
      # Set Data Type (http or norm)
      #
      dataType=norm
      #
      # Set File List
      # NB : ensure that filenames are enclosed in quotes
      #      separate filenames with a comma "," and no whitespaces
      #      ensure that you always use a "/" for a directory separator even on Windows
      #
      #fileList=["/path/to/file"]
      fileList=["D:/program/ground_report-0.5/path/to/data/data_HIH-D-388-0.log"]

      When I changed the dataType into "http", following error happed.
      ERROR: value " 1250066206771" is out of range for type integer [SQLCode:0], [SQLState: 22003].
      why? How can I upload files successfully?

      Appreciate your help!

       
      • Calum

        Calum - 2009-08-12

        Hi,

        You have just posted the same message again!?

        Please see my replies to your earlier posting.

        Cheers
        Cal

         
    • Tree Lin

      Tree Lin - 2009-08-13

      Hi Calum,
      The problem “*sys-package-mgr*: can't create package cache dir” has been solved. But the error “ERROR: value " 1250139552484" is out of range for type integer [SQLCode: 0], [SQLState: 22003]” still exists.

      A small data file:
      Thread, Run, Test, Start time (ms since Epoch), Test time, Errors, HTTP response code, HTTP response length, HTTP response errors, Time to resolve host, Time to establish connection, Time to first byte
      1, 0, 1, 1250139552484, 406, 0, 200, 73284, 0, 15, 15, 359
      0, 0, 1, 1250139552484, 469, 0, 200, 73284, 0, 15, 15, 437
      1, 1, 1, 1250139552953, 453, 0, 200, 73284, 0, 0, 0, 453
      0, 1, 1, 1250139552984, 453, 0, 200, 73284, 0, 0, 0, 453

      I appreciate your help.

       
      • Calum

        Calum - 2009-08-13

        what was the solution to the "can't create package dir" error?

        The issue you have is that the ids you have designated for your tests are 13 digits long. The column in the database is of type integer which only accepts numbers 12 digits long.

        Are you able to make your test id's 12 digits long or less?

        I will have to produce a patch to change the type to bigint (if the number can't be changed) and that may be a week or more as I am on vacation as of tomorrow for a week.

        I will add it as a change for 1.3 so that there can be test id's greater than 12 digits.....I thought I was the only one who used really large numbers for my test ids...guess you beat me on that :-)

         
        • Tree Lin

          Tree Lin - 2009-08-13

          The solution to the "can't create package dir" error is to remove the quotes in which the value of the variable JYTHON_JAVA_ARGS is quoted in the databaseInterface and generateReport scripts in the bin directory.

           
          • Calum

            Calum - 2009-08-13

            thanks for the feedback.

            I shall make the changes to the bat files for 1.3

            Cheers
            Calum

             
            • Tree Lin

              Tree Lin - 2009-08-13

              Hi Calum,
                  I tries to new a database and repeated those steps. Now following exceptions happened. What’s wrong with it?

              Enter action: 4

              Upload Files Selected

              Uploading Data Files

              Number of Uploaded Files = 1

              Time Taken = 00 Hours 00 Minutes 00 Seconds

              Refreshing Materialised Views:

              element_max_time_http_mv
              element_totalbandwidth_http_mv
              page_summary_http_mv
              element_min_time_http_mv
              element_summary_http_mv
              page_distribution_http_mv
              element_distribution_http_mv
              page_buckets_http_mv
              Exception in thread Thread-112:
              Traceback (most recent call last):
                File "D:\program\jython2.2.1\Lib\threading.py", line 414, in _Thread__bootstra
              p
                  self.run()
                File "D:\program\ground_report-1.2\lib\multithreadUtilities.py", line 63, in r
              un
                  self.finishedQueue.put(eval(self.sqlScript)(self.dbConn, self.sqlQueue.get_n
              owait()))
                File "D:\program\ground_report-1.2\lib\databaseFactory.py", line 921, in refre
              shMaterialisedView
                  c.execute('SELECT refresh_matview(\'' + mv + '\');')
              Error: ERROR: current transaction is aborted, commands ignored until end of tran
              saction block [SQLCode: 0], [SQLState: 25P02]

              Exception in thread Thread-113:
              Traceback (most recent call last):
                File "D:\program\jython2.2.1\Lib\threading.py", line 414, in _Thread__bootstra
              p
                  self.run()
                File "D:\program\ground_report-1.2\lib\multithreadUtilities.py", line 63, in r
              un
                  self.finishedQueue.put(eval(self.sqlScript)(self.dbConn, self.sqlQueue.get_n
              owait()))
                File "D:\program\ground_report-1.2\lib\databaseFactory.py", line 921, in refre
              shMaterialisedView
                  c.execute('SELECT refresh_matview(\'' + mv + '\');')
              Error: ERROR: current transaction is aborted, commands ignored until end of tran
              saction block [SQLCode: 0], [SQLState: 25P02]

              Exception in thread Thread-109:
              Traceback (most recent call last):
                File "D:\program\jython2.2.1\Lib\threading.py", line 414, in _Thread__bootstra
              p
                  self.run()
                File "D:\program\ground_report-1.2\lib\multithreadUtilities.py", line 63, in r
              un
                  self.finishedQueue.put(eval(self.sqlScript)(self.dbConn, self.sqlQueue.get_n
              owait()))
                File "D:\program\ground_report-1.2\lib\databaseFactory.py", line 921, in refre
              shMaterialisedView
                  c.execute('SELECT refresh_matview(\'' + mv + '\');')
              Error: ERROR: current transaction is aborted, commands ignored until end of tran
              saction block [SQLCode: 0], [SQLState: 25P02]

              Exception in thread Thread-114:
              Traceback (most recent call last):
                File "D:\program\jython2.2.1\Lib\threading.py", line 414, in _Thread__bootstra
              p
                  self.run()
                File "D:\program\ground_report-1.2\lib\multithreadUtilities.py", line 63, in r
              un
                  self.finishedQueue.put(eval(self.sqlScript)(self.dbConn, self.sqlQueue.get_n
              owait()))
                File "D:\program\ground_report-1.2\lib\databaseFactory.py", line 921, in refre
              shMaterialisedView
                  c.execute('SELECT refresh_matview(\'' + mv + '\');')
              Error: ERROR: count must be greater than zero [SQLCode: 0], [SQLState: 2201G]

              Exception in thread Thread-111:
              Traceback (most recent call last):
                File "D:\program\jython2.2.1\Lib\threading.py", line 414, in _Thread__bootstra
              p
                  self.run()
                File "D:\program\ground_report-1.2\lib\multithreadUtilities.py", line 63, in r
              un
                  self.finishedQueue.put(eval(self.sqlScript)(self.dbConn, self.sqlQueue.get_n
              owait()))
                File "D:\program\ground_report-1.2\lib\databaseFactory.py", line 921, in refre
              shMaterialisedView
                  c.execute('SELECT refresh_matview(\'' + mv + '\');')
              Error: ERROR: current transaction is aborted, commands ignored until end of tran
              saction block [SQLCode: 0], [SQLState: 25P02]

              individual_page_per_second_stats_http_mv
              static_element_per_second_stats_http_mv
              individual_element_per_second_stats_http_mv
              total_element_per_second_stats_http_mv
              concurrent_users_byrun_http_mv
              total_page_per_second_stats_http_mv
              dynamic_element_per_second_stats_http_mv
              element_95confidence_http_mv
              mean_load_throughput_stats_http_mv

              Time Taken = 00 Hours 00 Minutes 00 Seconds

              Upload Files Finished

               
      • Calum

        Calum - 2009-08-13

        what was the solution to the "can't create package dir" error?

        The issue you have is that the ids you have designated for your tests are 13 digits long. The column in the database is of type integer which only accepts numbers 12 digits long.

        Are you able to make your test id's 12 digits long or less?

        I will have to produce a patch to change the type to bigint (if the number can't be changed) and that may be a week or more as I am on vacation as of tomorrow for a week.

        I will add it as a change for 1.3 so that there can be test id's greater than 12 digits.....I thought I was the only one who used really large numbers for my test ids...guess you beat me on that :-)

         
    • Calum

      Calum - 2009-08-13

      This looks like a data issue (or lack of).

      Your file uploaded very quickly. How big was the file and how much data did it contain?

      The materialised views are created by running a view and then copying the contents to a table. One of these refreshes has objected to a lack of data "count must be greater than zero" and so caused the error that you see. The materialised view refreshes are concurrent where possible and that is why there were a number of other errors as well.

      I think I have seen this where the Grinder test run lasted for less than 1 second. If you are testing things out please ensure a Grinder test run of greater than 10 seconds. This should then allow you to test things out.

      Please could you reset the db and try again with a datafile contain results for a Grinder test run of >10 seconds.

      Cheers
      Cal

       
    • Tree Lin

      Tree Lin - 2009-08-13

      Calum, thanks for your help!

       
  • Anonymous

    Anonymous - 2011-03-16

    Hi,

    I have the same problem, grinder log file upload fails. Here si what happens:

     DATABASE CONTROL MENU
    -----------------------
     Select action to perform:
      1 ) install Database
      2 ) delete Database
      3 ) reset Database
      4 ) upload Files
      5 ) refresh Materialised Views
      6 ) drop Data
     Experimental
     ------------
      7 ) cluster Database
      8 ) refresh Extended Stats Materialised Views
     Information
     ------------
      9 ) show loadrun information
      10) show data file information
     Type 'exit' to escape the menu
     Enter action: 4
     Upload Files Selected
      Uploading Data Files
    Traceback (most recent call last):
      File "c:/xxx/tools/StressTest/yyy/ground_report-1.5/lib/databaseInterface.py", line 455, in <module>
        startDBMenu()
      File "c:/xxx/tools/StressTest/yyy/ground_report-1.5/lib/databaseInterface.py", line 258, in startDBMenu
        output = sql.uploadDataHTTP(fileArray)
      File "C:\xxx\tools\StressTest\yyy\ground_report-1.5\lib\databaseFactory.py", line 1311, in uploadDataHTTP
        c.execute("SELECT * FROM upload_http_data(ARRAY[%s]);" % (array))
    zxJDBC.Error: ERROR: could not open file "c:\xxx\tools\StressTest\yyy\grinder\agent\log\data_BUDW1945-1.log" for reading: No such file or d
    irectory [SQLCode: 0], [SQLState: 58P01]
    

    Environment:
    - client pc: Win7 Pro, Grinder 3.4, Ground Report 1.5, Jython 2.5.2
    - server: WinServer2008R2 x64, postgresql 9.0.3 64bit

    data.properties:

    #####################################
    #                                   #
    #   GROUND REPORT DATA PROPERTIES   #
    #                                   #
    #####################################
    #################
    #
    # Set Variables
    #
    #################
    # Data Options
    #################
    #
    # Set File Type (data or descr)
    #
    #fileType=descr
    fileType=data
    #
    # Set Data Type (http or norm)
    #
    dataType=http
    #
    # Set Upload Method (list or directory)
    # NB : When using the directory method ensure that the files in the directory are only of one type (either data or descr)
    #
    uploadMethod=directory
    #
    # Set File List 
    # NB : ensure that filenames are enclosed in quotes
    #      separate filenames with a comma "," and no whitespaces
    #      ensure that you always use a "/" for a directory separator even on Windows
    #
    fileList=['c:/xxx/tools/StressTest/yyy/grinder/agent/log/data_BUDW1945-1.log']
    #
    # Set File Directory 
    # NB : Put in the absolute path to the directory
    #      ensure that you always use a "/" for a directory separator even on Windows
    #
    fileDirectory='c:/xxx/tools/StressTest/yyy/grinder/agent/log'
    

    No file permission problem, tried with admin user and different data file path, and the same error occures.
    Any tips?

     
  • Calum

    Calum - 2011-03-16

    Hmm,

    This one looks a little tricky.
    Which version of Jython 2.5.2 are you using?
    There have been a couple of issues with jython where the files opened are not readable looking at the Jython Changelogs (http://www.jython.net/NEWS)
    Currently I am on Jython 2.5.1 and the ground report is working ok but I don't run windows OS.

    Looking at the output and data.properties file you have sent I can't see any particular issues at the moment. the script is obviously correctly reading the directory and picking up the file. The issue is coming with opening the file for reading.
    This is either a permissions issue or potentially a jython bug as mentioned above.

    Please change the jython version to 2.5.1, try again and let us know what happens.

    Cheers
    Cal

     
  • Anonymous

    Anonymous - 2011-03-17

    Hi,

    I've tried with jython 2.5.1, but the same error occured.
    Lately I've changed the postgresql-8.2-508.jdbc3.jar boundled with Ground Report with a newer one, postgresql-9.0-801.jdbc4.jar, and a more detailed error message was displayed:

    Traceback (most recent call last):
      File "c:/xxx/tools/StressTest/yyy/ground_report-1.5/lib/databaseInterface.py", line 455, in <module>
        startDBMenu()
      File "c:/xxx/tools/StressTest/yyy/ground_report-1.5/lib/databaseInterface.py", line 258, in startDBMenu
        output = sql.uploadDataHTTP(fileArray)
      File "C:\xxx\tools\StressTest\yyy\ground_report-1.5\lib\databaseFactory.py", line 1311, in uploadDataHTTP
        c.execute("SELECT * FROM upload_http_data(ARRAY[%s]);" % (array))
    zxJDBC.Error: ERROR: could not open file "c:\xxx\tools\StressTest\yyy\grinder\agent\log\data_BUDW1945-1.log" for reading: No such file or directory
      Where: SQL statement "COPY "raw_data_http" ("Thread","Run","Test","Milliseconds Since Epoch","Test Time","Errors","HTTP Response Code","HTTP Response Length","HTTP Response Errors","Time To Resolve Host","Time To Establish Connection","Time To First Byte") FROM $$c:\xxx\tools\StressTest\yyy\grinder\agent\log\data_BUDW1945-1.log$$  WITH CSV HEADER"PL/pgSQL function "upload_http_data" line 32 at EXECUTE statement [SQLCode: 0],[SQLState: 58P01]
    

    At the given line in the given pgsql stored proc, there is a "COPY" statement.
    I've checked the pgsql doc on the copy statement: http://www.postgresql.org/docs/9.0/interactive/sql-copy.html
    Quote from there:

    COPY with a file name instructs the PostgreSQL server to directly read from or write to a file. The file must be accessible to the server and the name must be specified from the viewpoint of the server.

    It seems that the Ground Report should reside on the same computer as the pgsql.
    So I'm installing now a local pgsql.

     
  • Anonymous

    Anonymous - 2011-03-17

    After installing Ground Report and PostgrSQL on the same machine, everything works fine!

     
  • Calum

    Calum - 2011-03-17

    Hiya,

    Great spot. I missed the fact that the db and the frontend were on different boxes.

    You can run the db and the front end on different boxes but the data files being uploaded always have to be on the box where the db is located. You must use fileList upload method in this scenario, as the dynamic file list functionality needs to see the directory in which the files are located to generate the file list. You could always use a shared filesystem to host the data files.

    I think the common scenario is to run the ground report frontend and db on the same box.

    I'm really glad you got your problem solved!

    Cheers
    Cal

     

Log in to post a comment.