cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Appdynamics agent cannot be initialized

Santosh.Hegde
New Member

I'm getting the below error when I initialize appdynamics.

 

 

Appdynamics agent cannot be initialized due to Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /src/node_modules/appdynamics-protobuf/build/Release/protobuf_for_node.node)
Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /src/node_modules/appdynamics-protobuf/build/Release/protobuf_for_node.node)
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at tryRequire (/src/node_modules/appdynamics-protobuf/index.js:15:11)
    at requireProtobufBinding (/src/node_modules/appdynamics-protobuf/index.js:23:18)
    at Object.<anonymous> (/src/node_modules/appdynamics-protobuf/index.js:33:18)
    at Module._compile (module.js:652:30)

 

 

And My Node.js code looks like this.

require("appdynamics").profile({
	controllerHostName: 'host',
	controllerPort: 8090,
	accountName: 'ac-name',
	accountAccessKey: 'I-Have-Token',
	applicationName: 'csc',
	tierName: 'TEST',
	nodeName: 'process', // The controller will automatically append the node name with a unique number
	debug: true
});

 

What's the issue here?

Any dependency required?

node module version: 4.5.2
9 REPLIES 9

Kyle.Furlong
AppDynamics Team (Retired)

Hi Santosh,

 

Where did you run npm install? Was it the same system which runs the app?

 

Regards,

Kyle

Thanks,
Kyle Furlong, Technical Lead (C++ and Dynamic Languages)




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Yes!!!

Hi Santosh,

 

What linux distribution are you using here to run the app?

 

As the agent is only compatible with Linux distribution based on glibc 2.5+. Distribution based on musl_libc such as Alpine is not supported directly. 

 

Regards

Abhimanyu



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

I'm deploying app to Docker pod.
Using node:8.10.0 image.

Hi Santosh,

 

Can you share the content of your docker file here? We want to understand how exactly are you trying to build the application. 

 

Thanks

Abhimanyu



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

FROM node:8.10.0 as ubuntu

VOLUME /root/.npm
ADD .npmrc /root/.npmrc

WORKDIR /src
ADD package.json /src/package.json

RUN npm install

FROM node:8.10.0-alpine as alpine
RUN npm install -g nodemon
COPY --from=ubuntu /src /src

WORKDIR /src

EXPOSE 8888 8889
CMD [ "node", "app.js" ]

 

Do you see any issues here?

Hi Santosh,

 

So here we see the problem. You are running the application on Alpine based nodejs docker image; Alpine uses musl_libc, but our agent requires glibc 2.5+. You can try using node:8-slim,which is a debian-based

image and uses glibc

 

Thanks

Abhimanyu



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Hi Abhimanyu,

 

Is there any enhancements or look back to develop agent using Alpine based images or developing musl_libc for agent.

 

Thanks,

Santhosh

Hi Santosh,

 

Unfortunately, there is nothing for now that is in the roadmap, as far as I know. But may you can give a try to glibc contained version of Alpine - https://hub.docker.com/r/frolvlad/alpine-glibc/ - if this fits your use-case. Also, a document to run glibc based programs on Alpine : - https://wiki.alpinelinux.org/wiki/Running_glibc_programs 

 

In case you wish to try these route and hitting issues, please let me know if I can be of any help.

 

Thanks

Abhimanyu

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.