- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Unable to connect to DB when run from inetd on...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2011 08:15 PM
09-27-2011 08:15 PM
Unable to connect to DB when run from inetd on HPUX
OS - HPUX11.1 and 11.31
I am running my service and it connects with the DB and it is run under inetd. The ODBC driver is loaded dynamically through dlopen. When I run from the commandline it is running properly but when run as a service the dlopen is not able to load the shared library. It fails with an error unable to open the shared library. . The same library gets loaded through dlopen without any issue if invoked on a commandline. dlopen is supposed the search the shlib_path and others but it does not seem to do when invoked from a inetd service. Is there a way I can set the environment for dlopen when invoked from a service. Please advice
Thanks
P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2011 02:57 AM
09-28-2011 02:57 AM
Re: Unable to connect to DB when run from inetd on HPUX
Any service started by inetd is going to inherit its environment (which includes the settings for SHLIB_PATH / LD_LIBRARY_PATH) from the inetd daemons own environment. You could try setting these env variables in /sbin/init.d/inetd , but to be honest, that will mean anything started by inetd will get those settinsg too, which is not ideal and really anything started by inetd should really be able to control its own env settings via some sort of control file
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2011 08:44 AM
09-28-2011 08:44 AM
Re: Unable to connect to DB when run from inetd on HP-UX
Can you modify the program to use putenv(3) to set your own paths?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2011 03:35 PM
09-28-2011 03:35 PM
Re: Unable to connect to DB when run from inetd on HPUX
Hi Duncan
thanks for the response, I can across dlsetlibpath which says you can set the path dlopen can search, in the code. The man on this function seemed to be exactly what we are looking for. but when I incorporated that function, compilation went through but the link failed saying unresolved external symbol for dlsetlibpath. We tried out incorporating -ldl to the ld path but still the same problem. Does anyone know what option to specify for the link to succeed. What is the library which has this implemented. Do I need to upgrade the library.
thanks
P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2011 03:07 AM
09-29-2011 03:07 AM
Re: Unable to connect to DB when run from inetd on HP-UX
>We tried out incorporating -ldl to the ld path but still the same problem. What is the library which has this implemented. Do I need to upgrade the library?
It should be there on your 11.31 system. For 11.11, you probably need a newer linker/dld patch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2011 05:47 AM
09-29-2011 05:47 AM
Re: Unable to connect to DB when run from inetd on HP-UX
Thanks, I tried out putenv and it worked. I have not tried dlsetlibpath on 11.31, but now as putenv works, we will go with that.
Thanks
P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2011 04:32 AM
09-30-2011 04:32 AM
Re: Unable to connect to DB when run from inetd on HP-UX
>Thanks, I tried out putenv and it worked.
If you are happy with the answers, please click the Kudos stars.