[Glass] Error trying to connect to gemstone from topaz (using newly created stone)

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

[Glass] Error trying to connect to gemstone from topaz (using newly created stone)

Mariano Martinez Peck
Hi guys,

I am trying the great tool of Norbert: https://github.com/noha/stone-creator
to create new stones. I have some fixes already (I will share them later) but now I have a problem and I am kind of stuck.

I am trying to connect with topaz to my newly created stone and when I try to login I get this error in topaz:

GemStone: Error         Fatal
Unable to attach to shared cache,   GemStone could not retrieve the
IPC identifier associated with the memory
  key 771815731.  shmget() error = errno=13,EACCES, Authorization
failure (permission denied).

Error Category: [GemStone] Number: 4139  Arg Count: 1
Arg 1: 20

Login failed due to errors.


The only think I can think of is that I am starting netldi with one OS user and running the stone with another one. Is that a problem?


[LucidiaLLC@centosserver gemstone]$ gslist -lcv
Status   Version    Owner    Pid   Port   Started     Type       Name
------- --------- --------- ----- ----- ------------ ------      ----
  OK    3.1.0.5   marianopeck  2642 50377 Jan 09 16:27 Netldi      gs64ldi
  OK    3.1.0.5   UserXXX  2584 34036 Jan 09 16:27 Stone       XXX
  OK    3.1.0.5   UserXXX  2586 49214 Jan 09 16:27 cache       XXX~ab33349972f9baf3


As you can see, I am starting stone with UserXXX and netldi with marianopeck. 

In my case, I have (I will actually) multiple stones, each running under its own OS user. What should I do with netldi?

Thanks in advance! 

--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] Error trying to connect to gemstone from topaz (using newly created stone)

Martin McClure-5
On 01/09/2014 01:37 PM, Mariano Martinez Peck wrote:
>
> In my case, I have (I will actually) multiple stones, each running under
> its own OS user. What should I do with netldi?

If you want the gems to also run under the same OS user as the stone
(which you probably do) then one way is to run a netldi per stone,
giving each its own port. The other option is to run one netldi as root,
but then you have to give the OS user and that OS user's password every
time you want to log in.

For an RPC connection (from GemTools, for instance) you need the netldi.
If you're running a web service using topaz, you can launch topaz with
the -l option and it will *be* the gem, and will run as the OS user who
launched topaz.

Regards,

-Martin


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] Error trying to connect to gemstone from topaz (using newly created stone)

Mariano Martinez Peck



On Thu, Jan 9, 2014 at 7:01 PM, Martin McClure <[hidden email]> wrote:
On 01/09/2014 01:37 PM, Mariano Martinez Peck wrote:

In my case, I have (I will actually) multiple stones, each running under
its own OS user. What should I do with netldi?

If you want the gems to also run under the same OS user as the stone (which you probably do)

Yes, I do want that!!!
 
then one way is to run a netldi per stone, giving each its own port. The other option is to run one netldi as root, but then you have to give the OS user and that OS user's password every time you want to log in.

OK. I will go with the one netldi per stone. 
 

For an RPC connection (from GemTools, for instance) you need the netldi. If you're running a web service using topaz, you can launch topaz with the -l option and it will *be* the gem, and will run as the OS user who launched topaz.

Yes, and as far as I can see, the same happens with startSeaside30_Adaptor, which I want to use. I does:

cat << EOF | nohup $GEMSTONE/bin/topaz -l -e $4 2>&1 >> $GEMSTONE_LOGDIR/${1}_server-${2}.log &

So...... to conclude...if I want both, the gems and the stone to be run with the same OS user (not root), and each pair of stone/gems having a separate OS user, then having a netldi per stone is the way to go.

Just a quick last question. Is there a way to start netldi with the port he wants but giving it a name and then referencing to it by name?  I tried starting like this:

$GEMSTONE/bin/startnetldi -g -a $USER -n -l $GEMSTONE_LOGDIR/gs64ldi.log netldiXXX

but then...no matter what I put in "set gemnetid" of my .topazini  I cannot connect to it. The only way is by giving it the port:

set gemnetid !tcp@localhost#netldi:40371#task!gemnetobject

I would like netldi to pick the port automatically and be able to connect by name (from topaz and gemtools). Is that possible?

Thanks in advance!



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] Error trying to connect to gemstone from topaz (using newly created stone)

James Foster-9
> Just a quick last question. Is there a way to start netldi with the port he wants but giving it a name and then referencing to it by name?

Add the name and port to /etc/services and then you can reference it by name.

James
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass