-
I was trying to generate a HammerDB workload from a AWS Lambda function. Specifically running a tcl file to build a schema on a SQL Server database. I tested the ./hammerdbcli auto tcl-file.tcl in a Docker container, that works fine. However after building a AWL Lambda layer with a custom runtime (boostrap), the Lambda function executed ./hammerdbcli -help successfully, but got following error. Has anyone seen these before? { [49 bytes data]
Initialise our own env variables:variable PROMPT "hammerdb>" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I've not seen these before, however it looks like the issue is that the system does not have a home environment variable set. This is expected on both Linux and Windows e.g. Linux
Windows
It will then create a .tclline_history file in this home location to store the previous commands for recall. As a first step either see if a HOME environment variable can be set to a writable location or look in modules directory for the file tclreadline-1.2.tm and comment out where it uses $::env(HOME)
This will cause interactive mode to fail for now but may work for auto. There is also $::env(PATH) used later on so this could possibly fail as well. |
Beta Was this translation helpful? Give feedback.
-
Yes, by commenting out the following two lines, now it works in my AWS Lambda function: ./hammerdbcli auto my-tcl-script.tcl Thanks Steve. |
Beta Was this translation helpful? Give feedback.
-
Great, I will convert this into an issue and provide an adaptable fix in the next version. The history file is not needed if not running in interactive mode. Also, the interactive mode should be able to run if the history file is not found and just have no history of commands to recall. This will prevent anyone seeing the same error in future. The planned fix will check to see if the environment variables exist instead of expecting them to be there. |
Beta Was this translation helpful? Give feedback.
I've not seen these before, however it looks like the issue is that the system does not have a home environment variable set. This is expected on both Linux and Windows e.g.
Linux
Windows
It will then create a .tclline_history file in this home location to store the previous commands for recall.
As a first step either see if a HOME environment variable can be set to a writable location or look in modules directory for the file tclreadline-1.2.tm and comment out where it uses $::env(HOME)