Headless runtime image crashes on startup on headless server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Headless runtime image crashes on startup on headless server

jtuchel
Hi there,

I am getting the following output on my headless Linux server when I start my image:

-----
NLS Error (VA).  Missing group named: 'AbtMsgPrimBase'.  Check that your MPR files exist and are properly registered.
NLS Warning (VA).  Missing nil in group 'AbtMsgPrimBase'.
The following error(s) were detected during the startup sequence which may interfere with correct operation:


1) Primitive failed in: PlatformFunction>>#callWithArguments: due to OS error1
Process reportError: Primitive failed in: PlatformFunction>>#callWithArguments: due to OS error1
Dumping Stack File ...sdf
----

First, the NLS error: I simply unzipped the server runtime and copied my image file into the directory tree. The subdirectory /nls seems to include all the files that are present in the debv environment. The ini parameter nlspath has been updated to the deployment directory, so I don't really understand what could be missing. AbtMsgBase and AbtMsgPrimBase are not reduced from the runtime image. So what else can I check now?

But, more importantly, the failed primitive:
Downloading the .sdf and opening it in a debugger indicates it is a call to db2cli / SQLAllocEnv. The machine is a full DB2 Server and the LD_LIBRARY_PATH is pointing to the lib32 subdirectory of the db2 installation directory. The contents of that directory is equivalent to the one on my Linux VM.
So all seems fine, except it obviously isn't. What can I do to see what exactly is wrong? I guess if teh LD_LIBRARY_PATH was wrong, I'd get OS error 126 (like on Windows: DLL not found), but I get OS error 1.

I'm grateful for any pointers and tips.

Joachim



--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/RVr5cHRiRKUJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

Marten Feldtmann-2
And what about running the software in IDE ?


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/EJjNBvNVMIQJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

jtuchel
Hi Marten,

It's really a Server in the cloud-no GUI.
On a Vm with X Windows and the same Db2 installation there is no problem running the code, both in the IDE and packaged geadlessly.

In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/dfrnzcbUt5cJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

Douglas Swartz
Joachim,

I recall that OS Error 1 is a "Function not found". If that's the
case, it implies that the library was indeed found, but an entry point
for the function was not found.

Doug Swartz

Saturday, April 14, 2012, 10:59:28 AM, you wrote:

> Hi Marten,

> It's really a Server in the cloud-no GUI.
> On a Vm with X Windows and the same Db2 installation there is no
> problem running the code, both in the IDE and packaged geadlessly.

> In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

> Joachim



--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

jtuchel
Hi Doug,

I am not fully sure but tend to agree. The problem really is a failed primitive when trying to call SQLAllocEnv.
Interestingly, SQLAllocEnv shouldn't be called at all. Right before the SQLAllocEnv call VAST tries to determine if it should use SQLAllocEnv (deprecated with ODBC3) or SQLAllocHandle (see AbtOdbcDatabaseManager>>allocateEnvironmentHandle). This is determined by calling 

(AbtIbmCliDatabaseManager platformFunctions at: AbtOdbcPlatformFunctions::OdbcSQLAllocHandle) abtValidAddress

and the question whether an address is valid is answered by asking the library for the address of an entry point. On my test VM the above statement answers true (the platform function there is <c: int32 'libdb2.so':SQLAllocHandle uint16 uint32 struct>) . 
This means that the library seems to be unaccessible or not found. On the other hand, shouldn't the getAddress: call on an unfound library trigger OS Error 126? If so, it would mean the library is found...

So I am not really any further. Since I tried running the image as both root and the db2 instance owner, and both get the same error, I believe it's not a file permission problem. Both users start the image with the same start script, and root's LD_LIBRARY_PATH does not contain any entries before running the start script. So at least root is not trying to access the lib64 version of libdb2.so.

Does anybody have any idea how to dig into this problem and find the cause?

Joachim




Am Sonntag, 15. April 2012 04:23:04 UTC+2 schrieb dswartz:
Joachim,

I recall that OS Error 1 is a "Function not found". If that's the
case, it implies that the library was indeed found, but an entry point
for the function was not found.

Doug Swartz

Saturday, April 14, 2012, 10:59:28 AM, you wrote:

> Hi Marten,

> It's really a Server in the cloud-no GUI.
> On a Vm with X Windows and the same Db2 installation there is no
> problem running the code, both in the IDE and packaged geadlessly.

> In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

> Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/LM9nNsTTJjcJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

jtuchel
Hi again,

here's an excerpt from the walk back.log:

PlatformFunction(Object)>>#error:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 'Primitive failed in: PlatformFunction>>#callWithArguments: due to OS error1'
PlatformFunction(Object)>>#primitiveFailed:withArgument:backUp:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 18
  arg2 = 1
  arg3 = 1
PlatformFunction(Object)>>#primitiveFailed
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
PlatformFunction>>#callWithArguments:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
PlatformFunction>>#callWithArray:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#callPlatformFunction:withArray:useThreadPreference:threadKey:
  receiver = an AbtIbmCliDatabaseManager
  arg1 = 2
  arg2 = ([0 0 0 0])
  arg3 = true
  arg4 = nil
  temp1 = nil
  temp2 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#allocateEnvironmentHandle
  receiver = an AbtIbmCliDatabaseManager
  temp1 = [0 0 0 0]
  temp2 = 2
  temp3 = ([0 0 0 0])
  temp4 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#initialize
  receiver = an AbtIbmCliDatabaseManager


Am Sonntag, 15. April 2012 08:00:14 UTC+2 schrieb [hidden email]:
Hi Doug,

I am not fully sure but tend to agree. The problem really is a failed primitive when trying to call SQLAllocEnv.
Interestingly, SQLAllocEnv shouldn't be called at all. Right before the SQLAllocEnv call VAST tries to determine if it should use SQLAllocEnv (deprecated with ODBC3) or SQLAllocHandle (see AbtOdbcDatabaseManager>>allocateEnvironmentHandle). This is determined by calling 

(AbtIbmCliDatabaseManager platformFunctions at: AbtOdbcPlatformFunctions::OdbcSQLAllocHandle) abtValidAddress

and the question whether an address is valid is answered by asking the library for the address of an entry point. On my test VM the above statement answers true (the platform function there is <c: int32 'libdb2.so':SQLAllocHandle uint16 uint32 struct>) . 
This means that the library seems to be unaccessible or not found. On the other hand, shouldn't the getAddress: call on an unfound library trigger OS Error 126? If so, it would mean the library is found...

So I am not really any further. Since I tried running the image as both root and the db2 instance owner, and both get the same error, I believe it's not a file permission problem. Both users start the image with the same start script, and root's LD_LIBRARY_PATH does not contain any entries before running the start script. So at least root is not trying to access the lib64 version of libdb2.so.

Does anybody have any idea how to dig into this problem and find the cause?

Joachim




Am Sonntag, 15. April 2012 04:23:04 UTC+2 schrieb dswartz:
Joachim,

I recall that OS Error 1 is a "Function not found". If that's the
case, it implies that the library was indeed found, but an entry point
for the function was not found.

Doug Swartz

Saturday, April 14, 2012, 10:59:28 AM, you wrote:

> Hi Marten,

> It's really a Server in the cloud-no GUI.
> On a Vm with X Windows and the same Db2 installation there is no
> problem running the code, both in the IDE and packaged geadlessly.

> In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

> Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/aVjvvA7NRDwJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

jtuchel
I finally "found" the solution. The Linux installation missed some 32-Bit libraries.
openSuse does not come with a handy bundle like Ubuntu's ia32-lib package, so after a few iterations of installing more and more 32 bit libraries, I have no real clue which one(s) exactly was / were missing. It was none that sounded like it is important. But it was, obviously.

I still wonder how I could have found out other than trial & error. Over at the db2 google group, somebody suggested using strace. I'll try to find out more about it when I get the time...

Joachim



Am Montag, 16. April 2012 14:54:25 UTC+2 schrieb [hidden email]:
Hi again,

here's an excerpt from the walk back.log:

PlatformFunction(Object)>>#error:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 'Primitive failed in: PlatformFunction>>#callWithArguments: due to OS error1'
PlatformFunction(Object)>>#primitiveFailed:withArgument:backUp:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 18
  arg2 = 1
  arg3 = 1
PlatformFunction(Object)>>#primitiveFailed
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
PlatformFunction>>#callWithArguments:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
PlatformFunction>>#callWithArray:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#callPlatformFunction:withArray:useThreadPreference:threadKey:
  receiver = an AbtIbmCliDatabaseManager
  arg1 = 2
  arg2 = ([0 0 0 0])
  arg3 = true
  arg4 = nil
  temp1 = nil
  temp2 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#allocateEnvironmentHandle
  receiver = an AbtIbmCliDatabaseManager
  temp1 = [0 0 0 0]
  temp2 = 2
  temp3 = ([0 0 0 0])
  temp4 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#initialize
  receiver = an AbtIbmCliDatabaseManager


Am Sonntag, 15. April 2012 08:00:14 UTC+2 schrieb [hidden email]:
Hi Doug,

I am not fully sure but tend to agree. The problem really is a failed primitive when trying to call SQLAllocEnv.
Interestingly, SQLAllocEnv shouldn't be called at all. Right before the SQLAllocEnv call VAST tries to determine if it should use SQLAllocEnv (deprecated with ODBC3) or SQLAllocHandle (see AbtOdbcDatabaseManager>>allocateEnvironmentHandle). This is determined by calling 

(AbtIbmCliDatabaseManager platformFunctions at: AbtOdbcPlatformFunctions::OdbcSQLAllocHandle) abtValidAddress

and the question whether an address is valid is answered by asking the library for the address of an entry point. On my test VM the above statement answers true (the platform function there is <c: int32 'libdb2.so':SQLAllocHandle uint16 uint32 struct>) . 
This means that the library seems to be unaccessible or not found. On the other hand, shouldn't the getAddress: call on an unfound library trigger OS Error 126? If so, it would mean the library is found...

So I am not really any further. Since I tried running the image as both root and the db2 instance owner, and both get the same error, I believe it's not a file permission problem. Both users start the image with the same start script, and root's LD_LIBRARY_PATH does not contain any entries before running the start script. So at least root is not trying to access the lib64 version of libdb2.so.

Does anybody have any idea how to dig into this problem and find the cause?

Joachim




Am Sonntag, 15. April 2012 04:23:04 UTC+2 schrieb dswartz:
Joachim,

I recall that OS Error 1 is a "Function not found". If that's the
case, it implies that the library was indeed found, but an entry point
for the function was not found.

Doug Swartz

Saturday, April 14, 2012, 10:59:28 AM, you wrote:

> Hi Marten,

> It's really a Server in the cloud-no GUI.
> On a Vm with X Windows and the same Db2 installation there is no
> problem running the code, both in the IDE and packaged geadlessly.

> In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

> Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/8Y8cs0EShk4J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

jtuchel
Hi,

I had to setup a new Ubuntu 12.04 Server (64 bit) and had the same problem again. The package that was missing was libpam-modules:i386. This solved the issue.

Since Ubuntu is a supported platform (does that apply to 64 bit as well?): Maybe it would be good if Instantiations assembled a list of packages that are required. This should of course also be true for other supported Linux platforms. 

Here's a short list of things that I found you need on Ubuntu 12.04 (64):

ia32-libs
binutils
libpam-modules:i386
libaio (maybe this one is not required by VAST, I need it for DB2, however)


Joachim


Am Montag, 16. April 2012 21:22:31 UTC+2 schrieb [hidden email]:
I finally "found" the solution. The Linux installation missed some 32-Bit libraries.
openSuse does not come with a handy bundle like Ubuntu's ia32-lib package, so after a few iterations of installing more and more 32 bit libraries, I have no real clue which one(s) exactly was / were missing. It was none that sounded like it is important. But it was, obviously.

I still wonder how I could have found out other than trial & error. Over at the db2 google group, somebody suggested using strace. I'll try to find out more about it when I get the time...

Joachim



Am Montag, 16. April 2012 14:54:25 UTC+2 schrieb [hidden email]:
Hi again,

here's an excerpt from the walk back.log:

PlatformFunction(Object)>>#error:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 'Primitive failed in: PlatformFunction>>#callWithArguments: due to OS error1'
PlatformFunction(Object)>>#primitiveFailed:withArgument:backUp:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 18
  arg2 = 1
  arg3 = 1
PlatformFunction(Object)>>#primitiveFailed
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
PlatformFunction>>#callWithArguments:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
PlatformFunction>>#callWithArray:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#callPlatformFunction:withArray:useThreadPreference:threadKey:
  receiver = an AbtIbmCliDatabaseManager
  arg1 = 2
  arg2 = ([0 0 0 0])
  arg3 = true
  arg4 = nil
  temp1 = nil
  temp2 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#allocateEnvironmentHandle
  receiver = an AbtIbmCliDatabaseManager
  temp1 = [0 0 0 0]
  temp2 = 2
  temp3 = ([0 0 0 0])
  temp4 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#initialize
  receiver = an AbtIbmCliDatabaseManager


Am Sonntag, 15. April 2012 08:00:14 UTC+2 schrieb [hidden email]:
Hi Doug,

I am not fully sure but tend to agree. The problem really is a failed primitive when trying to call SQLAllocEnv.
Interestingly, SQLAllocEnv shouldn't be called at all. Right before the SQLAllocEnv call VAST tries to determine if it should use SQLAllocEnv (deprecated with ODBC3) or SQLAllocHandle (see AbtOdbcDatabaseManager>>allocateEnvironmentHandle). This is determined by calling 

(AbtIbmCliDatabaseManager platformFunctions at: AbtOdbcPlatformFunctions::OdbcSQLAllocHandle) abtValidAddress

and the question whether an address is valid is answered by asking the library for the address of an entry point. On my test VM the above statement answers true (the platform function there is <c: int32 'libdb2.so':SQLAllocHandle uint16 uint32 struct>) . 
This means that the library seems to be unaccessible or not found. On the other hand, shouldn't the getAddress: call on an unfound library trigger OS Error 126? If so, it would mean the library is found...

So I am not really any further. Since I tried running the image as both root and the db2 instance owner, and both get the same error, I believe it's not a file permission problem. Both users start the image with the same start script, and root's LD_LIBRARY_PATH does not contain any entries before running the start script. So at least root is not trying to access the lib64 version of libdb2.so.

Does anybody have any idea how to dig into this problem and find the cause?

Joachim




Am Sonntag, 15. April 2012 04:23:04 UTC+2 schrieb dswartz:
Joachim,

I recall that OS Error 1 is a "Function not found". If that's the
case, it implies that the library was indeed found, but an entry point
for the function was not found.

Doug Swartz

Saturday, April 14, 2012, 10:59:28 AM, you wrote:

> Hi Marten,

> It's really a Server in the cloud-no GUI.
> On a Vm with X Windows and the same Db2 installation there is no
> problem running the code, both in the IDE and packaged geadlessly.

> In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

> Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

John O'Keefe-3
Joachim -

Do you mean something like this FAQ page: Q: How do I prepare a 64-bit Linux machine to run VA Smalltalk?

John

On Friday, June 21, 2013 1:39:21 AM UTC-4, [hidden email] wrote:
Hi,

I had to setup a new Ubuntu 12.04 Server (64 bit) and had the same problem again. The package that was missing was libpam-modules:i386. This solved the issue.

Since Ubuntu is a supported platform (does that apply to 64 bit as well?): Maybe it would be good if Instantiations assembled a list of packages that are required. This should of course also be true for other supported Linux platforms. 

Here's a short list of things that I found you need on Ubuntu 12.04 (64):

ia32-libs
binutils
libpam-modules:i386
libaio (maybe this one is not required by VAST, I need it for DB2, however)


Joachim


Am Montag, 16. April 2012 21:22:31 UTC+2 schrieb [hidden email]:
I finally "found" the solution. The Linux installation missed some 32-Bit libraries.
openSuse does not come with a handy bundle like Ubuntu's ia32-lib package, so after a few iterations of installing more and more 32 bit libraries, I have no real clue which one(s) exactly was / were missing. It was none that sounded like it is important. But it was, obviously.

I still wonder how I could have found out other than trial & error. Over at the db2 google group, somebody suggested using strace. I'll try to find out more about it when I get the time...

Joachim



Am Montag, 16. April 2012 14:54:25 UTC+2 schrieb [hidden email]:
Hi again,

here's an excerpt from the walk back.log:

PlatformFunction(Object)>>#error:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 'Primitive failed in: PlatformFunction>>#callWithArguments: due to OS error1'
PlatformFunction(Object)>>#primitiveFailed:withArgument:backUp:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 18
  arg2 = 1
  arg3 = 1
PlatformFunction(Object)>>#primitiveFailed
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
PlatformFunction>>#callWithArguments:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
PlatformFunction>>#callWithArray:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#callPlatformFunction:withArray:useThreadPreference:threadKey:
  receiver = an AbtIbmCliDatabaseManager
  arg1 = 2
  arg2 = ([0 0 0 0])
  arg3 = true
  arg4 = nil
  temp1 = nil
  temp2 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#allocateEnvironmentHandle
  receiver = an AbtIbmCliDatabaseManager
  temp1 = [0 0 0 0]
  temp2 = 2
  temp3 = ([0 0 0 0])
  temp4 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#initialize
  receiver = an AbtIbmCliDatabaseManager


Am Sonntag, 15. April 2012 08:00:14 UTC+2 schrieb [hidden email]:
Hi Doug,

I am not fully sure but tend to agree. The problem really is a failed primitive when trying to call SQLAllocEnv.
Interestingly, SQLAllocEnv shouldn't be called at all. Right before the SQLAllocEnv call VAST tries to determine if it should use SQLAllocEnv (deprecated with ODBC3) or SQLAllocHandle (see AbtOdbcDatabaseManager>>allocateEnvironmentHandle). This is determined by calling 

(AbtIbmCliDatabaseManager platformFunctions at: AbtOdbcPlatformFunctions::OdbcSQLAllocHandle) abtValidAddress

and the question whether an address is valid is answered by asking the library for the address of an entry point. On my test VM the above statement answers true (the platform function there is <c: int32 'libdb2.so':SQLAllocHandle uint16 uint32 struct>) . 
This means that the library seems to be unaccessible or not found. On the other hand, shouldn't the getAddress: call on an unfound library trigger OS Error 126? If so, it would mean the library is found...

So I am not really any further. Since I tried running the image as both root and the db2 instance owner, and both get the same error, I believe it's not a file permission problem. Both users start the image with the same start script, and root's LD_LIBRARY_PATH does not contain any entries before running the start script. So at least root is not trying to access the lib64 version of libdb2.so.

Does anybody have any idea how to dig into this problem and find the cause?

Joachim




Am Sonntag, 15. April 2012 04:23:04 UTC+2 schrieb dswartz:
Joachim,

I recall that OS Error 1 is a "Function not found". If that's the
case, it implies that the library was indeed found, but an entry point
for the function was not found.

Doug Swartz

Saturday, April 14, 2012, 10:59:28 AM, you wrote:

> Hi Marten,

> It's really a Server in the cloud-no GUI.
> On a Vm with X Windows and the same Db2 installation there is no
> problem running the code, both in the IDE and packaged geadlessly.

> In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

> Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

jtuchel
Well, actually, yes, something like that ;-) 
Thanks for the pointer. Now I know that I have all that's needed. Makes me feel much better.

So I expected this bit of information in the Installation Guide and admit to ignore the FAQ way too much ;-)

While we're at it: the FAQ you link to says libpam-modules:i386 was required for emsrv. That cannot be true. The machine I am deploying to neither runs emsrv nor a development image. it really is a production server and runs only a headless runtime image. The faq might imply that the package is not required if you don't need emsrv.

Then there is this other thing that doesn't calm down in my brain: couldn't the error message be more helpful? I mean, the problem is completely unrelated to libdb2.so. There is some library missing that should be there for something between the VM and libdb2. So it would be nice if the VM told me more about what is wrong. The error as it stands implies a problem with libdb2.so. Unfortunately, my knowledge in such low level C programming isn't sufficient to suggest a concrete solution...

Joachim


Am Freitag, 21. Juni 2013 21:30:20 UTC+2 schrieb John O'Keefe:
Joachim -

Do you mean something like this FAQ page: Q: How do I prepare a 64-bit Linux machine to run VA Smalltalk?

John

On Friday, June 21, 2013 1:39:21 AM UTC-4, [hidden email] wrote:
Hi,

I had to setup a new Ubuntu 12.04 Server (64 bit) and had the same problem again. The package that was missing was libpam-modules:i386. This solved the issue.

Since Ubuntu is a supported platform (does that apply to 64 bit as well?): Maybe it would be good if Instantiations assembled a list of packages that are required. This should of course also be true for other supported Linux platforms. 

Here's a short list of things that I found you need on Ubuntu 12.04 (64):

ia32-libs
binutils
libpam-modules:i386
libaio (maybe this one is not required by VAST, I need it for DB2, however)


Joachim


Am Montag, 16. April 2012 21:22:31 UTC+2 schrieb [hidden email]:
I finally "found" the solution. The Linux installation missed some 32-Bit libraries.
openSuse does not come with a handy bundle like Ubuntu's ia32-lib package, so after a few iterations of installing more and more 32 bit libraries, I have no real clue which one(s) exactly was / were missing. It was none that sounded like it is important. But it was, obviously.

I still wonder how I could have found out other than trial & error. Over at the db2 google group, somebody suggested using strace. I'll try to find out more about it when I get the time...

Joachim



Am Montag, 16. April 2012 14:54:25 UTC+2 schrieb [hidden email]:
Hi again,

here's an excerpt from the walk back.log:

PlatformFunction(Object)>>#error:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 'Primitive failed in: PlatformFunction>>#callWithArguments: due to OS error1'
PlatformFunction(Object)>>#primitiveFailed:withArgument:backUp:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 18
  arg2 = 1
  arg3 = 1
PlatformFunction(Object)>>#primitiveFailed
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
PlatformFunction>>#callWithArguments:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
PlatformFunction>>#callWithArray:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#callPlatformFunction:withArray:useThreadPreference:threadKey:
  receiver = an AbtIbmCliDatabaseManager
  arg1 = 2
  arg2 = ([0 0 0 0])
  arg3 = true
  arg4 = nil
  temp1 = nil
  temp2 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#allocateEnvironmentHandle
  receiver = an AbtIbmCliDatabaseManager
  temp1 = [0 0 0 0]
  temp2 = 2
  temp3 = ([0 0 0 0])
  temp4 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#initialize
  receiver = an AbtIbmCliDatabaseManager


Am Sonntag, 15. April 2012 08:00:14 UTC+2 schrieb [hidden email]:
Hi Doug,

I am not fully sure but tend to agree. The problem really is a failed primitive when trying to call SQLAllocEnv.
Interestingly, SQLAllocEnv shouldn't be called at all. Right before the SQLAllocEnv call VAST tries to determine if it should use SQLAllocEnv (deprecated with ODBC3) or SQLAllocHandle (see AbtOdbcDatabaseManager>>allocateEnvironmentHandle). This is determined by calling 

(AbtIbmCliDatabaseManager platformFunctions at: AbtOdbcPlatformFunctions::OdbcSQLAllocHandle) abtValidAddress

and the question whether an address is valid is answered by asking the library for the address of an entry point. On my test VM the above statement answers true (the platform function there is <c: int32 'libdb2.so':SQLAllocHandle uint16 uint32 struct>) . 
This means that the library seems to be unaccessible or not found. On the other hand, shouldn't the getAddress: call on an unfound library trigger OS Error 126? If so, it would mean the library is found...

So I am not really any further. Since I tried running the image as both root and the db2 instance owner, and both get the same error, I believe it's not a file permission problem. Both users start the image with the same start script, and root's LD_LIBRARY_PATH does not contain any entries before running the start script. So at least root is not trying to access the lib64 version of libdb2.so.

Does anybody have any idea how to dig into this problem and find the cause?

Joachim




Am Sonntag, 15. April 2012 04:23:04 UTC+2 schrieb dswartz:
Joachim,

I recall that OS Error 1 is a "Function not found". If that's the
case, it implies that the library was indeed found, but an entry point
for the function was not found.

Doug Swartz

Saturday, April 14, 2012, 10:59:28 AM, you wrote:

> Hi Marten,

> It's really a Server in the cloud-no GUI.
> On a Vm with X Windows and the same Db2 installation there is no
> problem running the code, both in the IDE and packaged geadlessly.

> In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

> Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

jtuchel
Hi again,

thinking again about the whole thing I think I need to explain a little closer what I mean with my last paragraph. First, let me repeat a passage from one of my earlier postings in this thread:

:Interestingly, SQLAllocEnv shouldn't be called at all. Right before the SQLAllocEnv call VAST tries to determine if it should use SQLAllocEnv (deprecated with ODBC3) or SQLAllocHandle (see :AbtOdbcDatabaseManager>>allocateEnvironmentHandle). This is determined by calling 

:(AbtIbmCliDatabaseManager platformFunctions at: AbtOdbcPlatformFunctions::OdbcSQLAllocHandle) abtValidAddress

:and the question whether an address is valid is answered by asking the library for the address of an entry point. On my test VM the above statement answers true (the platform function there is <c: int32 :'libdb2.so':SQLAllocHandle uint16 uint32 struct>) . 

So now I am not sure any more if this might not be a problem with the logic in the DB2 CLI interface code. It assumes that if OdbcSQLAllocHandle is not a valid address (AbtOdbcDatabaseManager>>#supportsAllocHandle), the system uses ODBC3. Well, that is only true if you assume that all required libraries are accessible. The code does not check whether SQLAllocEnv (the function that is used in case of ODBC3) is valid. I would guess that it's not if lbdb2.so is not accessible. But it seems there is no check whether libdb2.so can be found at first. Therefor there is no indication of what might be wrong in the primitiveFailed Error. So either something should be improved in primGetAddress (<primitive: VMprPlatformLibraryPrimGetAddress>) to indicate more exactly what is wrong or the DB2 interface code should add more checks. The second alternative is probably not a good choice, because I guess such problems can arise with all kinds of libraries.

Why is Joachim whining again about such tiny things? 
Because they can take lots of time to find out when you're not a Linux geek but have to deploy to a Linux machine. I was hunting for this problem quite a while and it hit me again once I was on another server. These things can add up to quite some pile. 

Joachim

Am Sonntag, 23. Juni 2013 09:37:28 UTC+2 schrieb [hidden email]:
Well, actually, yes, something like that ;-) 
Thanks for the pointer. Now I know that I have all that's needed. Makes me feel much better.

So I expected this bit of information in the Installation Guide and admit to ignore the FAQ way too much ;-)

While we're at it: the FAQ you link to says libpam-modules:i386 was required for emsrv. That cannot be true. The machine I am deploying to neither runs emsrv nor a development image. it really is a production server and runs only a headless runtime image. The faq might imply that the package is not required if you don't need emsrv.

Then there is this other thing that doesn't calm down in my brain: couldn't the error message be more helpful? I mean, the problem is completely unrelated to libdb2.so. There is some library missing that should be there for something between the VM and libdb2. So it would be nice if the VM told me more about what is wrong. The error as it stands implies a problem with libdb2.so. Unfortunately, my knowledge in such low level C programming isn't sufficient to suggest a concrete solution...

Joachim


Am Freitag, 21. Juni 2013 21:30:20 UTC+2 schrieb John O'Keefe:
Joachim -

Do you mean something like this FAQ page: Q: How do I prepare a 64-bit Linux machine to run VA Smalltalk?

John

On Friday, June 21, 2013 1:39:21 AM UTC-4, [hidden email] wrote:
Hi,

I had to setup a new Ubuntu 12.04 Server (64 bit) and had the same problem again. The package that was missing was libpam-modules:i386. This solved the issue.

Since Ubuntu is a supported platform (does that apply to 64 bit as well?): Maybe it would be good if Instantiations assembled a list of packages that are required. This should of course also be true for other supported Linux platforms. 

Here's a short list of things that I found you need on Ubuntu 12.04 (64):

ia32-libs
binutils
libpam-modules:i386
libaio (maybe this one is not required by VAST, I need it for DB2, however)


Joachim


Am Montag, 16. April 2012 21:22:31 UTC+2 schrieb [hidden email]:
I finally "found" the solution. The Linux installation missed some 32-Bit libraries.
openSuse does not come with a handy bundle like Ubuntu's ia32-lib package, so after a few iterations of installing more and more 32 bit libraries, I have no real clue which one(s) exactly was / were missing. It was none that sounded like it is important. But it was, obviously.

I still wonder how I could have found out other than trial & error. Over at the db2 google group, somebody suggested using strace. I'll try to find out more about it when I get the time...

Joachim



Am Montag, 16. April 2012 14:54:25 UTC+2 schrieb [hidden email]:
Hi again,

here's an excerpt from the walk back.log:

PlatformFunction(Object)>>#error:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 'Primitive failed in: PlatformFunction>>#callWithArguments: due to OS error1'
PlatformFunction(Object)>>#primitiveFailed:withArgument:backUp:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = 18
  arg2 = 1
  arg3 = 1
PlatformFunction(Object)>>#primitiveFailed
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
PlatformFunction>>#callWithArguments:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
PlatformFunction>>#callWithArray:
  receiver = <c: int32 'libdb2.so':SQLAllocEnv struct>
  arg1 = ([0 0 0 0])
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#callPlatformFunction:withArray:useThreadPreference:threadKey:
  receiver = an AbtIbmCliDatabaseManager
  arg1 = 2
  arg2 = ([0 0 0 0])
  arg3 = true
  arg4 = nil
  temp1 = nil
  temp2 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#allocateEnvironmentHandle
  receiver = an AbtIbmCliDatabaseManager
  temp1 = [0 0 0 0]
  temp2 = 2
  temp3 = ([0 0 0 0])
  temp4 = nil
AbtIbmCliDatabaseManager(AbtOdbcDatabaseManager)>>#initialize
  receiver = an AbtIbmCliDatabaseManager


Am Sonntag, 15. April 2012 08:00:14 UTC+2 schrieb [hidden email]:
Hi Doug,

I am not fully sure but tend to agree. The problem really is a failed primitive when trying to call SQLAllocEnv.
Interestingly, SQLAllocEnv shouldn't be called at all. Right before the SQLAllocEnv call VAST tries to determine if it should use SQLAllocEnv (deprecated with ODBC3) or SQLAllocHandle (see AbtOdbcDatabaseManager>>allocateEnvironmentHandle). This is determined by calling 

(AbtIbmCliDatabaseManager platformFunctions at: AbtOdbcPlatformFunctions::OdbcSQLAllocHandle) abtValidAddress

and the question whether an address is valid is answered by asking the library for the address of an entry point. On my test VM the above statement answers true (the platform function there is <c: int32 'libdb2.so':SQLAllocHandle uint16 uint32 struct>) . 
This means that the library seems to be unaccessible or not found. On the other hand, shouldn't the getAddress: call on an unfound library trigger OS Error 126? If so, it would mean the library is found...

So I am not really any further. Since I tried running the image as both root and the db2 instance owner, and both get the same error, I believe it's not a file permission problem. Both users start the image with the same start script, and root's LD_LIBRARY_PATH does not contain any entries before running the start script. So at least root is not trying to access the lib64 version of libdb2.so.

Does anybody have any idea how to dig into this problem and find the cause?

Joachim




Am Sonntag, 15. April 2012 04:23:04 UTC+2 schrieb dswartz:
Joachim,

I recall that OS Error 1 is a "Function not found". If that's the
case, it implies that the library was indeed found, but an entry point
for the function was not found.

Doug Swartz

Saturday, April 14, 2012, 10:59:28 AM, you wrote:

> Hi Marten,

> It's really a Server in the cloud-no GUI.
> On a Vm with X Windows and the same Db2 installation there is no
> problem running the code, both in the IDE and packaged geadlessly.

> In the meantime, I've checked that libdb2.so  is in the path and the same version as "at home".

> Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

John O'Keefe-3
In reply to this post by jtuchel
Joachim -

We can document what we know. We know that EMSRV can use PAM and when it does, it needs libpam-modules:i386. We do not know what other components (such as a DB manager) used in your run time may also require PAM. But I do take your point and I will update the FAQ page to indicate that other components may require PAM and users should refer to the documentation of these other components for further information.

John

On Sunday, June 23, 2013 3:37:28 AM UTC-4, [hidden email] wrote:

While we're at it: the FAQ you link to says libpam-modules:i386 was required for emsrv. That cannot be true. The machine I am deploying to neither runs emsrv nor a development image. it really is a production server and runs only a headless runtime image. The faq might imply that the package is not required if you don't need emsrv.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Headless runtime image crashes on startup on headless server

jtuchel
John,

I guess the short fix is to simply remove the bracketed comment about EMSRV from the FAQ ;-)


Joachim

Am Montag, 24. Juni 2013 16:56:27 UTC+2 schrieb John O'Keefe:
Joachim -

We can document what we know. We know that EMSRV can use PAM and when it does, it needs libpam-modules:i386. We do not know what other components (such as a DB manager) used in your run time may also require PAM. But I do take your point and I will update the FAQ page to indicate that other components may require PAM and users should refer to the documentation of these other components for further information.

John

On Sunday, June 23, 2013 3:37:28 AM UTC-4, [hidden email] wrote:

While we're at it: the FAQ you link to says libpam-modules:i386 was required for emsrv. That cannot be true. The machine I am deploying to neither runs emsrv nor a development image. it really is a production server and runs only a headless runtime image. The faq might imply that the package is not required if you don't need emsrv.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.