Any ideas what a result code of 9 for the AppDynamics Apache module means?
I'm going to hazard a guess from the SDK file sdk_lib/include/appdynamics_sdk.h:
typedef enum APPD_SDK_API
{
APPD_STATUS(success) = 0
,APPD_STATUS(fail) /* 1 */
,APPD_STATUS(proxy_failed_to_start) /* 2 */
,APPD_STATUS(proxy_failed_to_stop) /* 3 */
,APPD_STATUS(unspecified_environment_variable) /* 4 */
,APPD_STATUS(environment_variable_invalid_value) /* 5 */
,APPD_STATUS(environment_records_are_invalid) /* 6 */
,APPD_STATUS(environment_record_name_is_not_specified_or_empty) /* 7 */
,APPD_STATUS(environment_record_value_is_not_specified_or_empty) /* 8 */
,APPD_STATUS(no_log_config) /* 9 */
,APPD_STATUS(log_init_failed) /* 10 */
,APPD_STATUS(invalid_bt_type) /* 11 */
,APPD_STATUS(invalid_backend_type) /* 12 */
,APPD_STATUS(bt_name_invalid) /* 13 */
,APPD_STATUS(uninitialized) /* 14 */
,APPD_STATUS(wrong_handle) /* 15 */
,APPD_STATUS(cannot_create_handle) /* 16 */
,APPD_STATUS(already_initialized) /* 17 */
,APPD_STATUS(payload_reflector_is_null) /* 18 */
,APPD_STATUS(backend_reflector_is_null) /* 19 */
,APPD_STATUS(handle_pointer_is_null) /* 20 */
,APPD_STATUS(invalid_input_string) /* 21 */
,APPD_STATUS(uninitialized_input) /* 22 */
,APPD_STATUS(bt_detection_disabled) /* 23 */
,APPD_STATUS(wrong_process_id) /* 24 */
I will work on the assumption the error message from the SDK was "no_log_config".
So what I keep forgetting (because this is the first application I've ever encountered this behaviour) is that all AppDynamics agents (Java, Machine, and Apache) assume that the configuration files are located in a directory relative to the location of the agent (or, in this case, SDK) binary (be it a .jar or .so).
Instead of being able to keep the binary, which does not change, in a read-only common store - I must make a copy available on my read-write media and locate the configuration files relative to this.
The reason I'm writing this up is that I expect others will encounter this unusual issue as there are no options to specify the location of the configuration file during instrumentation.
Hey Peter,
Yes, we do do autodiscovery of paths. And yes, these paths lead us to the configs and logs which need to be R/W.
Have you resolved the 'result code 9' error?
Your <agent-install-directory>/logs must be R/W for the user apache (and it's children) run as at the very least. We generally recommend 777 for logs, but I can understand that that might seem too open.
The configs (conf and proxy/conf) need to be readable by the user apache (and it's children) run as.
Thanks,
Brennan