How to start an image with PORT parameter

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

How to start an image with PORT parameter

garduino
Hi:

As far as I saw on some doc it's possible to start a seaside image in
the way: "squeakvm seaside.image PORT nnnn". Then, as WAKom check this
parameter on its #startUp method, is posible to have it running on the
passed port.

But I can't make it work on the versions I tried (Seaside 2.8.1/2/4)
with Squeak 3.10.2.

The behaviour is that if I use -headless the image start, but not on
the passed port. And if I start the image without -headless I get the
Error: No content to install on CodeLoader (Seems that it hope that
PORT be a script with Smalltalk code to load more than a parameter).

Any tip or suggestion will be appreciated.

Cheers.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

WAKom

Robert Sirois
WAKom doesn't work in Pharo? I believe I have the correct image and VM:

I'm getting the following from 'WAKom startOn: 9050':

'BlockClosure(Object)>>doesNotUnderstand: #newProcessWithBindings:'

Thanks,
RS


Insert movie times and more without leaving Hotmail®. See how.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

Philippe Marschall
In reply to this post by garduino
2009/7/14, Germán Arduino <[hidden email]>:
> Hi:
>
> As far as I saw on some doc it's possible to start a seaside image in
> the way: "squeakvm seaside.image PORT nnnn". Then, as WAKom check this
> parameter on its #startUp method, is posible to have it running on the
> passed port.

Try:

squeakvm seaside.image -- PORT nnnn

Squeak is a bit peculiar when it comes to command line arguments.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WAKom

Philippe Marschall
In reply to this post by Robert Sirois
2009/7/15, Robert Sirois <[hidden email]>:
>
> WAKom doesn't work in Pharo? I believe I have the correct image and VM:
>
> I'm getting the following from 'WAKom startOn: 9050':
>
> 'BlockClosure(Object)>>doesNotUnderstand: #newProcessWithBindings:'

For the closure images you need to load the latest, DynamicBindings,
KomHttpServer and Seaside from:
http://www.squeaksource.com/KomHttpServer
http://www.squeaksource.comSeaside

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: WAKom

Robert Sirois
The Kom server appears to be running now, but at localhost it displays:

'[closure] in WATableTag(WATagBrush)>>with:'

RS

> Date: Wed, 15 Jul 2009 06:53:56 +0200
> Subject: Re: [Seaside] WAKom
> From: [hidden email]
> To: [hidden email]
>
> 2009/7/15, Robert Sirois <[hidden email]>:
> >
> > WAKom doesn't work in Pharo? I believe I have the correct image and VM:
> >
> > I'm getting the following from 'WAKom startOn: 9050':
> >
> > 'BlockClosure(Object)>>doesNotUnderstand: #newProcessWithBindings:'
>
> For the closure images you need to load the latest, DynamicBindings,
> KomHttpServer and Seaside from:
> http://www.squeaksource.com/KomHttpServer
> http://www.squeaksource.comSeaside
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


Insert movie times and more without leaving Hotmail®. See how.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WAKom

Philippe Marschall
2009/7/15, Robert Sirois <[hidden email]>:
>
> The Kom server appears to be running now, but at localhost it displays:
>
> '[closure] in WATableTag(WATagBrush)>>with:'

Did you also load the latest Seaside 2.8?
Do you have a full stack trace?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: WAKom

Robert Sirois
Oh, I'm sorry. I'm using Seaside 2.9a3...

RS

> Date: Wed, 15 Jul 2009 07:04:23 +0200
> Subject: Re: [Seaside] WAKom
> From: [hidden email]
> To: [hidden email]
>
> 2009/7/15, Robert Sirois <[hidden email]>:
> >
> > The Kom server appears to be running now, but at localhost it displays:
> >
> > '[closure] in WATableTag(WATagBrush)>>with:'
>
> Did you also load the latest Seaside 2.8?
> Do you have a full stack trace?
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


Windows Live™ SkyDrive™: Get 25 GB of free online storage. Get it on your BlackBerry or iPhone.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

garduino
In reply to this post by Philippe Marschall
Tried, but don't works.

I got the same error.

Cheers.
Germán.

2009/7/15, Philippe Marschall <[hidden email]>:

> 2009/7/14, Germán Arduino <[hidden email]>:
>
> > Hi:
>  >
>  > As far as I saw on some doc it's possible to start a seaside image in
>  > the way: "squeakvm seaside.image PORT nnnn". Then, as WAKom check this
>  > parameter on its #startUp method, is posible to have it running on the
>  > passed port.
>
>
> Try:
>
>
>  squeakvm seaside.image -- PORT nnnn
>
>
> Squeak is a bit peculiar when it comes to command line arguments.
>
>  Cheers
>  Philippe
>  _______________________________________________
>  seaside mailing list
>  [hidden email]
>  http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

Miguel Cobá
El mié, 15-07-2009 a las 17:57 -0300, Germán Arduino escribió:
> Tried, but don't works.
>
> I got the same error.
>

I use this script to start a magma image an serveral seaside images:

#!/bin/sh

NOHUP="/usr/bin/nohup"
SQUEAK_VM="/usr/bin/squeakvm"
SQUEAK_OPTS="-mmap 100m -vm-sound-null -vm-display-X11 -headless"
SQUEAK="$SQUEAK_VM $SQUEAK_OPTS"
IMAGES_HOME="/home/miguel/squeak/images/azteca"
SCRIPTS_HOME="/home/miguel/squeak/scripts/azteca"
LOGS_HOME="/home/miguel/squeak/logs/azteca"
START_PORT=8080
END_PORT=8093


# Start the Magma image
echo "Starting Magma image"
$NOHUP $SQUEAK $IMAGES_HOME/magma.image $SCRIPTS_HOME/magma.st >>
$LOGS_HOME/magma.nohup &

# Start the Seaside images
for PORT in `seq $START_PORT $END_PORT`; do
  echo "Starting Seaside image on port: $port"
  $NOHUP $SQUEAK $IMAGES_HOME/seaside.image $SCRIPTS_HOME/seaside.st
port $PORT >> $LOGS_HOME/seaside.nohup &
done


check the order of the parameters that stablish the port for the seaside
image.

> Cheers.
> Germán.
>
> 2009/7/15, Philippe Marschall <[hidden email]>:
> > 2009/7/14, Germán Arduino <[hidden email]>:
> >
> > > Hi:
> >  >
> >  > As far as I saw on some doc it's possible to start a seaside image in
> >  > the way: "squeakvm seaside.image PORT nnnn". Then, as WAKom check this
> >  > parameter on its #startUp method, is posible to have it running on the
> >  > passed port.
> >
> >
> > Try:
> >
> >
> >  squeakvm seaside.image -- PORT nnnn
> >
> >
> > Squeak is a bit peculiar when it comes to command line arguments.
> >
> >  Cheers
> >  Philippe
> >  _______________________________________________
> >  seaside mailing list
> >  [hidden email]
> >  http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

Mariano Martinez Peck


2009/7/15 Miguel Enrique Cobá Martinez <[hidden email]>
El mié, 15-07-2009 a las 17:57 -0300, Germán Arduino escribió:
> Tried, but don't works.
>
> I got the same error.
>

I use this script to start a magma image an serveral seaside images:

#!/bin/sh

NOHUP="/usr/bin/nohup"
SQUEAK_VM="/usr/bin/squeakvm"
SQUEAK_OPTS="-mmap 100m -vm-sound-null -vm-display-X11 -headless"
SQUEAK="$SQUEAK_VM $SQUEAK_OPTS"
IMAGES_HOME="/home/miguel/squeak/images/azteca"
SCRIPTS_HOME="/home/miguel/squeak/scripts/azteca"
LOGS_HOME="/home/miguel/squeak/logs/azteca"
START_PORT=8080
END_PORT=8093


# Start the Magma image
echo "Starting Magma image"
$NOHUP $SQUEAK $IMAGES_HOME/magma.image $SCRIPTS_HOME/magma.st >>
$LOGS_HOME/magma.nohup &

# Start the Seaside images
for PORT in `seq $START_PORT $END_PORT`; do
 echo "Starting Seaside image on port: $port"
 $NOHUP $SQUEAK $IMAGES_HOME/seaside.image $SCRIPTS_HOME/seaside.st

Nice script!!!  I will base my future ones on this :)

What I don't understand here is which type of scripts you send as parameters to squeakVM. Scripts to the VM ?? Can you show me some examples of  what you have in $SCRIPTS_HOME/seaside.st ??

port $PORT >> $LOGS_HOME/seaside.nohup &

What does this line do?

Thanks!

Mariano
 

done


check the order of the parameters that stablish the port for the seaside
image.

> Cheers.
> Germán.
>
> 2009/7/15, Philippe Marschall <[hidden email]>:
> > 2009/7/14, Germán Arduino <[hidden email]>:
> >
> > > Hi:
> >  >
> >  > As far as I saw on some doc it's possible to start a seaside image in
> >  > the way: "squeakvm seaside.image PORT nnnn". Then, as WAKom check this
> >  > parameter on its #startUp method, is posible to have it running on the
> >  > passed port.
> >
> >
> > Try:
> >
> >
> >  squeakvm seaside.image -- PORT nnnn
> >
> >
> > Squeak is a bit peculiar when it comes to command line arguments.
> >
> >  Cheers
> >  Philippe
> >  _______________________________________________
> >  seaside mailing list
> >  [hidden email]
> >  http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

Miguel Cobá
El mié, 15-07-2009 a las 21:20 -0300, Mariano Martinez Peck escribió:

>
>
> 2009/7/15 Miguel Enrique Cobá Martinez <[hidden email]>
>         El mié, 15-07-2009 a las 17:57 -0300, Germán Arduino escribió:
>         > Tried, but don't works.
>         >
>         > I got the same error.
>         >
>        
>        
>         I use this script to start a magma image an serveral seaside
>         images:
>        
>         #!/bin/sh
>        
>         NOHUP="/usr/bin/nohup"
>         SQUEAK_VM="/usr/bin/squeakvm"
>         SQUEAK_OPTS="-mmap 100m -vm-sound-null -vm-display-X11
>         -headless"
>         SQUEAK="$SQUEAK_VM $SQUEAK_OPTS"
>         IMAGES_HOME="/home/miguel/squeak/images/azteca"
>         SCRIPTS_HOME="/home/miguel/squeak/scripts/azteca"
>         LOGS_HOME="/home/miguel/squeak/logs/azteca"
>         START_PORT=8080
>         END_PORT=8093
>        
>        
>         # Start the Magma image
>         echo "Starting Magma image"
>         $NOHUP $SQUEAK $IMAGES_HOME/magma.image $SCRIPTS_HOME/magma.st
>         >>
>         $LOGS_HOME/magma.nohup &
>        
>         # Start the Seaside images
>         for PORT in `seq $START_PORT $END_PORT`; do
>          echo "Starting Seaside image on port: $port"
>          $NOHUP $SQUEAK $IMAGES_HOME/seaside.image
>         $SCRIPTS_HOME/seaside.st
>
> Nice script!!!  I will base my future ones on this :)
>
> What I don't understand here is which type of scripts you send as
> parameters to squeakVM. Scripts to the VM ?? Can you show me some
> examples of  what you have in $SCRIPTS_HOME/seaside.st ??
>

Yes you can have here anything that you can put in a workspace.
I learned this from Ramon Leon, in the post about scaling seaside with
apache, but in the end I didn't use (I mean the seaside scaling à la
dabbledb/ramonleon) because I used lighttpd and a fixed set of images:

This is my seaside.st, again, stolen from Ramon's blog (thanks Ramon :)
[
  [
    [ 60 seconds asDelay wait.
      (FileDirectory default fileOrDirectoryExists:
'/home/miguel/proyectos/azteca/scripts/shutdown.seaside')
        ifTrue: [ SmalltalkImage current snapshot: false andQuit: true ]
    ] on: Error do: [ :error | error asDebugEmail ]
  ] repeat
] forkAt: Processor systemBackgroundPriority.
Project uiProcess suspend.

and what it does is to check every 60 seconds for the existance of a
file and if exists, just shutdown without saving. This way I can stop my
farm of seaside images. Enjoy.

>
>         port $PORT >> $LOGS_HOME/seaside.nohup &
>
> What does this line do?
>

I start the images with the command nohup from unix/linux that makes a
process to continue living even if you logout the session (otherwise all
your jobs/proccess are killed on logout because are children of the
session process). The command it is everything after the nohup. The &
puts the proccess in background and the >> redirects the output (errors)
to a file for later reviewing.

> Thanks!
>
> Mariano
>  

Saludos,
Miguel Cobá

>        
>         done
>        
>        
>         check the order of the parameters that stablish the port for
>         the seaside
>         image.
>        
>        
>         > Cheers.
>         > Germán.
>         >
>         > 2009/7/15, Philippe Marschall
>         <[hidden email]>:
>         > > 2009/7/14, Germán Arduino <[hidden email]>:
>         > >
>         > > > Hi:
>         > >  >
>         > >  > As far as I saw on some doc it's possible to start a
>         seaside image in
>         > >  > the way: "squeakvm seaside.image PORT nnnn". Then, as
>         WAKom check this
>         > >  > parameter on its #startUp method, is posible to have it
>         running on the
>         > >  > passed port.
>         > >
>         > >
>         > > Try:
>         > >
>         > >
>         > >  squeakvm seaside.image -- PORT nnnn
>         > >
>         > >
>         > > Squeak is a bit peculiar when it comes to command line
>         arguments.
>         > >
>         > >  Cheers
>         > >  Philippe
>         > >  _______________________________________________
>         > >  seaside mailing list
>         > >  [hidden email]
>         > >
>          http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>         > >
>         > _______________________________________________
>         > seaside mailing list
>         > [hidden email]
>         >
>         http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>        
>         _______________________________________________
>         seaside mailing list
>         [hidden email]
>         http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>        
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

Mariano Martinez Peck


2009/7/15 Miguel Enrique Cobá Martinez <[hidden email]>
El mié, 15-07-2009 a las 21:20 -0300, Mariano Martinez Peck escribió:
>
>
> 2009/7/15 Miguel Enrique Cobá Martinez <[hidden email]>
>         El mié, 15-07-2009 a las 17:57 -0300, Germán Arduino escribió:
>         > Tried, but don't works.
>         >
>         > I got the same error.
>         >
>
>
>         I use this script to start a magma image an serveral seaside
>         images:
>
>         #!/bin/sh
>
>         NOHUP="/usr/bin/nohup"
>         SQUEAK_VM="/usr/bin/squeakvm"
>         SQUEAK_OPTS="-mmap 100m -vm-sound-null -vm-display-X11
>         -headless"
>         SQUEAK="$SQUEAK_VM $SQUEAK_OPTS"
>         IMAGES_HOME="/home/miguel/squeak/images/azteca"
>         SCRIPTS_HOME="/home/miguel/squeak/scripts/azteca"
>         LOGS_HOME="/home/miguel/squeak/logs/azteca"
>         START_PORT=8080
>         END_PORT=8093
>
>
>         # Start the Magma image
>         echo "Starting Magma image"
>         $NOHUP $SQUEAK $IMAGES_HOME/magma.image $SCRIPTS_HOME/magma.st
>         >>
>         $LOGS_HOME/magma.nohup &
>
>         # Start the Seaside images
>         for PORT in `seq $START_PORT $END_PORT`; do
>          echo "Starting Seaside image on port: $port"
>          $NOHUP $SQUEAK $IMAGES_HOME/seaside.image
>         $SCRIPTS_HOME/seaside.st
>
> Nice script!!!  I will base my future ones on this :)
>
> What I don't understand here is which type of scripts you send as
> parameters to squeakVM. Scripts to the VM ?? Can you show me some
> examples of  what you have in $SCRIPTS_HOME/seaside.st ??
>

Yes you can have here anything that you can put in a workspace.
I learned this from Ramon Leon, in the post about scaling seaside with
apache, but in the end I didn't use (I mean the seaside scaling à la
dabbledb/ramonleon) because I used lighttpd and a fixed set of images:

This is my seaside.st, again, stolen from Ramon's blog (thanks Ramon :)
[
 [
   [ 60 seconds asDelay wait.
     (FileDirectory default fileOrDirectoryExists:
'/home/miguel/proyectos/azteca/scripts/shutdown.seaside')
       ifTrue: [ SmalltalkImage current snapshot: false andQuit: true ]
   ] on: Error do: [ :error | error asDebugEmail ]
 ] repeat
] forkAt: Processor systemBackgroundPriority.
Project uiProcess suspend.

and what it does is to check every 60 seconds for the existance of a
file and if exists, just shutdown without saving. This way I can stop my
farm of seaside images. Enjoy.

Wow! awesome

 


>
>         port $PORT >> $LOGS_HOME/seaside.nohup &
>
> What does this line do?
>

I start the images with the command nohup from unix/linux that makes a
process to continue living even if you logout the session (otherwise all
your jobs/proccess are killed on logout because are children of the
session process).

yep
 
The command it is everything after the nohup. The &
puts the proccess in background and the >> redirects the output (errors)
to a file for later reviewing.


ahhhh it continues the last line!! now I get it. I thought it was a new line, thus I didn't know a command called "port" hahaa.
 

> Thanks!
>
> Mariano
>

Saludos,
Miguel Cobá

>
>         done
>
>
>         check the order of the parameters that stablish the port for
>         the seaside
>         image.
>
>
>         > Cheers.
>         > Germán.
>         >
>         > 2009/7/15, Philippe Marschall
>         <[hidden email]>:
>         > > 2009/7/14, Germán Arduino <[hidden email]>:
>         > >
>         > > > Hi:
>         > >  >
>         > >  > As far as I saw on some doc it's possible to start a
>         seaside image in
>         > >  > the way: "squeakvm seaside.image PORT nnnn". Then, as
>         WAKom check this
>         > >  > parameter on its #startUp method, is posible to have it
>         running on the
>         > >  > passed port.
>         > >
>         > >
>         > > Try:
>         > >
>         > >
>         > >  squeakvm seaside.image -- PORT nnnn
>         > >
>         > >
>         > > Squeak is a bit peculiar when it comes to command line
>         arguments.
>         > >
>         > >  Cheers
>         > >  Philippe
>         > >  _______________________________________________
>         > >  seaside mailing list
>         > >  [hidden email]
>         > >
>          http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>         > >
>         > _______________________________________________
>         > seaside mailing list
>         > [hidden email]
>         >
>         http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>         _______________________________________________
>         seaside mailing list
>         [hidden email]
>         http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WAKom

Philippe Marschall
In reply to this post by Robert Sirois
2009/7/15 Robert Sirois <[hidden email]>:
> Oh, I'm sorry. I'm using Seaside 2.9a3...

Ok, you need to update to the latest Seaside 2.9 code. Unfortunately
we have no easy to use solution yet.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: WAKom

Robert Sirois
Alright, sounds good. I'll use Squeak until I see that beta is out or whatever :)

RS

> Date: Thu, 16 Jul 2009 09:12:35 +0200
> Subject: Re: [Seaside] WAKom
> From: [hidden email]
> To: [hidden email]
>
> 2009/7/15 Robert Sirois <[hidden email]>:
> > Oh, I'm sorry. I'm using Seaside 2.9a3...
>
> Ok, you need to update to the latest Seaside 2.9 code. Unfortunately
> we have no easy to use solution yet.
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


Windows Live™: Keep your life in sync. Check it out.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

garduino
In reply to this post by Miguel Cobá
Hola Miguel!

Thanks by your response.

El 15 de julio de 2009 21:03, Miguel Enrique Cobá
Martinez<[hidden email]> escribió:

> El mié, 15-07-2009 a las 17:57 -0300, Germán Arduino escribió:
>> Tried, but don't works.
>>
>> I got the same error.
>>
>
> I use this script to start a magma image an serveral seaside images:
>
> #!/bin/sh
>
> NOHUP="/usr/bin/nohup"
> SQUEAK_VM="/usr/bin/squeakvm"
> SQUEAK_OPTS="-mmap 100m -vm-sound-null -vm-display-X11 -headless"
> SQUEAK="$SQUEAK_VM $SQUEAK_OPTS"
> IMAGES_HOME="/home/miguel/squeak/images/azteca"
> SCRIPTS_HOME="/home/miguel/squeak/scripts/azteca"
> LOGS_HOME="/home/miguel/squeak/logs/azteca"
> START_PORT=8080
> END_PORT=8093
>
>
> # Start the Magma image
> echo "Starting Magma image"
> $NOHUP $SQUEAK $IMAGES_HOME/magma.image $SCRIPTS_HOME/magma.st >>
> $LOGS_HOME/magma.nohup &
>
> # Start the Seaside images
> for PORT in `seq $START_PORT $END_PORT`; do
>  echo "Starting Seaside image on port: $port"
>  $NOHUP $SQUEAK $IMAGES_HOME/seaside.image $SCRIPTS_HOME/seaside.st
> port $PORT >> $LOGS_HOME/seaside.nohup &
> done

Can you explain me a bit how works the PORT variable?

I can't make that the image read the port parameter :(

Thanks in advance.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

drush66
On Thu, Jul 16, 2009 at 7:03 PM, Germán Arduino <[hidden email]> wrote:
Hola Miguel!
Can you explain me a bit how works the PORT variable?

I can't make that the image read the port parameter :(

I am also a bit in a dark here, so any explanation is welcome!

One related question. If I intend to start image with port parameter, should I save image with seaside allready running on that port or not?

What happens if saved image is running on different port than one in command line?
What happens if saved image is running on some port that is at the moment of image restart not anymore available? 

Thanks!

rush
 

Thanks in advance.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

garduino
2009/7/16 Davorin Rusevljan <[hidden email]>:
> On Thu, Jul 16, 2009 at 7:03 PM, Germán Arduino <[hidden email]> wrote:
>>
>> Hola Miguel!
>> Can you explain me a bit how works the PORT variable?
>>
>> I can't make that the image read the port parameter :(
>
> I am also a bit in a dark here, so any explanation is welcome!

On my case didn't start on the port I wants and I ever get the
CodeLoader error, but I can try to explain you the other questions.

> One related question. If I intend to start image with port parameter, should
> I save image with seaside allready running on that port or not?

WAKom is on the startup list (The classes that need to do something
upon startup).

Then, the class method #startUp: of WAKom is:

startUp
        self name = #WAKom ifTrue: [
                SmalltalkImage current extractParameters
                        at: 'PORT' ifPresent: [ :value |
                                value isEmptyOrNil
                                        ifFalse: [ port := value asInteger ] ] ].
        port ifNotNil: [ self startOn: port ]


And #startOn: first stop the service and then restart it (or should
restart it) on the passed port parameter.


> What happens if saved image is running on different port than one in command
> line?

As it first stop, then should restart on the new port.

> What happens if saved image is running on some port that is at the moment of
> image restart not anymore available?

I think that will not work (if the port is already used by other app).

But, anyway, on my case, passing the port parameter not worked (On
Linux nor Windows).

See you.

Germán.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

Miguel Cobá
In reply to this post by drush66
El jue, 16-07-2009 a las 20:15 +0200, Davorin Rusevljan escribió:

> On Thu, Jul 16, 2009 at 7:03 PM, Germán Arduino <[hidden email]>
> wrote:
>         Hola Miguel!
>         Can you explain me a bit how works the PORT variable?
>        
>         I can't make that the image read the port parameter :(
>
>
> I am also a bit in a dark here, so any explanation is welcome!
>
>
> One related question. If I intend to start image with port parameter,
> should I save image with seaside allready running on that port or not?
>
>
> What happens if saved image is running on different port than one in
> command line?

On image startup, WAKom checks for a port parameter and starts on the
specified port, even if it is different that the one of the last saved
session. In the WAKom startUp method:

startUp
        self name = #WAKom ifTrue: [
                SmalltalkImage current extractParameters
                        at: 'PORT' ifPresent: [ :value |
                                value isEmptyOrNil
                                        ifFalse: [ port := value asInteger ] ] ].
        port ifNotNil: [ self startOn: port ]

Miguel Cobá

> What happens if saved image is running on some port that is at the
> moment of image restart not anymore available?
>
>
> Thanks!
>
>
> rush
> http://www.cloud208.com/
>  
>        
>         Thanks in advance.
>        
>         _______________________________________________
>         seaside mailing list
>         [hidden email]
>         http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>        
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

Miguel Cobá
In reply to this post by garduino
El jue, 16-07-2009 a las 14:03 -0300, Germán Arduino escribió:

> Hola Miguel!
>
> Thanks by your response.
>
> El 15 de julio de 2009 21:03, Miguel Enrique Cobá
> Martinez<[hidden email]> escribió:
> > El mié, 15-07-2009 a las 17:57 -0300, Germán Arduino escribió:
> >> Tried, but don't works.
> >>
> >> I got the same error.
> >>
> >
> > I use this script to start a magma image an serveral seaside images:
> >
> > #!/bin/sh
> >
> > NOHUP="/usr/bin/nohup"
> > SQUEAK_VM="/usr/bin/squeakvm"
> > SQUEAK_OPTS="-mmap 100m -vm-sound-null -vm-display-X11 -headless"
> > SQUEAK="$SQUEAK_VM $SQUEAK_OPTS"
> > IMAGES_HOME="/home/miguel/squeak/images/azteca"
> > SCRIPTS_HOME="/home/miguel/squeak/scripts/azteca"
> > LOGS_HOME="/home/miguel/squeak/logs/azteca"
> > START_PORT=8080
> > END_PORT=8093
> >
> >
> > # Start the Magma image
> > echo "Starting Magma image"
> > $NOHUP $SQUEAK $IMAGES_HOME/magma.image $SCRIPTS_HOME/magma.st >>
> > $LOGS_HOME/magma.nohup &
> >
> > # Start the Seaside images
> > for PORT in `seq $START_PORT $END_PORT`; do
> >  echo "Starting Seaside image on port: $port"
> >  $NOHUP $SQUEAK $IMAGES_HOME/seaside.image $SCRIPTS_HOME/seaside.st
> > port $PORT >> $LOGS_HOME/seaside.nohup &
> > done
>
> Can you explain me a bit how works the PORT variable?
>
> I can't make that the image read the port parameter :(
>

Maybe your are using a wrapper around the real squeakvm executable and
the wrapper doesn't respect the parameter order.
Try using the squeak vm direct from the command line.
On Linux use which to get the real path of the command and then file it
to see the type:

$ which squeak
$ file /path/to/squeak

In my Debian GNU/Linux 5.0 (Lenny) I get:

miguel@laptop:~$ which squeak
/usr/bin/squeak
miguel@laptop:~$ file /usr/bin/squeak
/usr/bin/squeak: Bourne-Again shell script text executable
miguel@laptop:~$ cat /usr/bin/squeak
#! /bin/bash

# File:        squeak
# Author:      José L. Redrejo Rodríguez
<[hidden email]>

<follows a very long script>

but with squeakvm

miguel@laptop:~$ which squeakvm
/usr/bin/squeakvm
miguel@laptop:~$ file /usr/bin/squeakvm
/usr/bin/squeakvm: symbolic link to `../lib/squeak/3.10-3/squeak'

Also, by executing each command from command line:
miguel@laptop:~$ squeak --help
found gettext in path
/home/miguel
Could not open the Squeak image file `--help'.

There are three ways to open a Squeak image file.  You can:
  1. Put copies of the default image and changes files in this
directory.
  2. Put the name of the image file on the command line when you
     run squeak (use the `-help' option for more information).
  3. Set the environment variable SQUEAK_IMAGE to the name of the image
     that you want to use by default.

For more information, type: `man squeak' (without the quote characters).
miguel@laptop:~$ squeakvm --help
unknown option: --help
Usage: squeakvm [<option>...] [<imageName> [<argument>...]]
       squeakvm [<option>...] -- [<argument>...]

ALSA <option>s:
  -nomixer              disable mixer (volume) adjustment
  -soundcard <name>     open the named sound card (default: default)
  -playback <name>      play to the named sound device (default: Master)
  -capture <name>       record from the named sound device (default:
Capture)

OSS <option>s:
  -nomixer              disable mixer (volume) adjustment

FBDev <option>s:
  -fbdev <dev>          use framebuffer device <dev> (default: /dev/fb)
  -kbmap <file>         load keymap from <file> (default: use kernel
keymap)
  -msdev <dev>          use mouse device <dev> (default: /dev/psaux)
  -msproto <protocol>   use the given <protocol> for the mouse (default:
ps2)
  -vtlock               disallow all vt switching (for any reason)
  -vtswitch             enable keyboard vt switching (Alt+FNx)

X11 <option>s:
  -browserWindow <wid>  run in window <wid>
  -browserPipes <r> <w> run as Browser plugin using descriptors <r> <w>
  -cmdmod <n>           map Mod<n> to the Command key
  -compositioninput     enable overlay window for composed characters
  -display <dpy>        display on <dpy> (default: $DISPLAY)
  -fullscreen           occupy the entire screen
  -glxdebug <n>         set GLX debug verbosity level to <n>
  -headless             run in headless (no window) mode
  -iconic               start up iconified
  -lazy                 go to sleep when main window unmapped
  -mapdelbs             map Delete key onto Backspace
  -nointl               disable international keyboard support
  -notitle              disable the Squeak window title bar
  -noxdnd               disable X drag-and-drop protocol support
  -optmod <n>           map Mod<n> to the Option key
  -swapbtn              swap yellow (middle) and blue (right) buttons
  -xasync               don't serialize display updates
  -xicfont <f>          use font set <f> for the input context overlay
  -xshm                 use X shared memory extension

Common <option>s:
  -encoding <enc>       set the internal character encoding (default:
MacRoman)
  -help                 print this help message, then exit
  -memory <size>[mk]    use fixed heap size (added to image size)
  -mmap <size>[mk]      limit dynamic heap size (default: 1024m)
  -noevents             disable event-driven input support
  -notimer              disable interval timer for low-res clock
  -pathenc <enc>        set encoding for pathnames (default: UTF-8)
  -plugins <path>       specify alternative plugin location (see
manpage)
  -textenc <enc>        set encoding for external text (default: UTF-8)
  -version              print version information, then exit
  -vm-<sys>-<dev>       use the <dev> driver for <sys> (see below)
Deprecated:
  -display <dpy>        quivalent to '-vm-display-X11 -display <dpy>'
  -headless             quivalent to '-vm-display-X11 -headless'
  -nodisplay            quivalent to '-vm-display-null'
  -nosound              quivalent to '-vm-sound-null'
  -quartz               quivalent to '-vm-display-Quartz'

Notes:
  <imageName> defaults to `squeak.image'.
  -vtlock disables keyboard vt switching even when -vtswitch is enabled
  Using `unix:0' for <dpy> may improve local display performance.
  -xshm only works when Squeak is running on the X server host.
  If `-memory' is not specified then the heap will grow dynamically.
  <argument>s are ignored, but are processed by the Squeak image.
  The first <argument> normally names a Squeak `script' to execute.
  Precede <arguments> by `--' to use default image.

Available drivers:
  vm-sound-null
  vm-sound-ALSA
  vm-sound-OSS
  vm-sound-NAS
  vm-display-null
  vm-display-fbdev
  vm-display-X11
miguel@laptop:~$

So maybe you're trying to use the wrong command to start your image.

Cheers,
Miguel Cobá

> Thanks in advance.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to start an image with PORT parameter

garduino
Thanks by the comments Miguel!

Indeed the port parameter must be used without a wrapper of the vm.
Anyway I've some VMs working and others not. But the latest Linux vm
works ok.

Thanks by your detailed scripts and explanations!

Cheers.


2009/7/16, Miguel Enrique Cobá Martinez <[hidden email]>:

> El jue, 16-07-2009 a las 14:03 -0300, Germán Arduino escribió:
>
> > Hola Miguel!
>  >
>  > Thanks by your response.
>  >
>  > El 15 de julio de 2009 21:03, Miguel Enrique Cobá
>  > Martinez<[hidden email]> escribió:
>  > > El mié, 15-07-2009 a las 17:57 -0300, Germán Arduino escribió:
>  > >> Tried, but don't works.
>  > >>
>  > >> I got the same error.
>  > >>
>  > >
>  > > I use this script to start a magma image an serveral seaside images:
>  > >
>  > > #!/bin/sh
>  > >
>  > > NOHUP="/usr/bin/nohup"
>  > > SQUEAK_VM="/usr/bin/squeakvm"
>  > > SQUEAK_OPTS="-mmap 100m -vm-sound-null -vm-display-X11 -headless"
>  > > SQUEAK="$SQUEAK_VM $SQUEAK_OPTS"
>  > > IMAGES_HOME="/home/miguel/squeak/images/azteca"
>  > > SCRIPTS_HOME="/home/miguel/squeak/scripts/azteca"
>  > > LOGS_HOME="/home/miguel/squeak/logs/azteca"
>  > > START_PORT=8080
>  > > END_PORT=8093
>  > >
>  > >
>  > > # Start the Magma image
>  > > echo "Starting Magma image"
>  > > $NOHUP $SQUEAK $IMAGES_HOME/magma.image $SCRIPTS_HOME/magma.st >>
>  > > $LOGS_HOME/magma.nohup &
>  > >
>  > > # Start the Seaside images
>  > > for PORT in `seq $START_PORT $END_PORT`; do
>  > >  echo "Starting Seaside image on port: $port"
>  > >  $NOHUP $SQUEAK $IMAGES_HOME/seaside.image $SCRIPTS_HOME/seaside.st
>  > > port $PORT >> $LOGS_HOME/seaside.nohup &
>  > > done
>  >
>  > Can you explain me a bit how works the PORT variable?
>  >
>  > I can't make that the image read the port parameter :(
>  >
>
>
> Maybe your are using a wrapper around the real squeakvm executable and
>  the wrapper doesn't respect the parameter order.
>  Try using the squeak vm direct from the command line.
>  On Linux use which to get the real path of the command and then file it
>  to see the type:
>
>  $ which squeak
>  $ file /path/to/squeak
>
>  In my Debian GNU/Linux 5.0 (Lenny) I get:
>
>  miguel@laptop:~$ which squeak
>  /usr/bin/squeak
>  miguel@laptop:~$ file /usr/bin/squeak
>  /usr/bin/squeak: Bourne-Again shell script text executable
>  miguel@laptop:~$ cat /usr/bin/squeak
>  #! /bin/bash
>
>  # File:        squeak
>  # Author:      José L. Redrejo Rodríguez
>  <[hidden email]>
>
>  <follows a very long script>
>
>  but with squeakvm
>
>  miguel@laptop:~$ which squeakvm
>  /usr/bin/squeakvm
>  miguel@laptop:~$ file /usr/bin/squeakvm
>  /usr/bin/squeakvm: symbolic link to `../lib/squeak/3.10-3/squeak'
>
>  Also, by executing each command from command line:
>  miguel@laptop:~$ squeak --help
>  found gettext in path
>  /home/miguel
>  Could not open the Squeak image file `--help'.
>
>  There are three ways to open a Squeak image file.  You can:
>   1. Put copies of the default image and changes files in this
>  directory.
>   2. Put the name of the image file on the command line when you
>      run squeak (use the `-help' option for more information).
>   3. Set the environment variable SQUEAK_IMAGE to the name of the image
>      that you want to use by default.
>
>  For more information, type: `man squeak' (without the quote characters).
>  miguel@laptop:~$ squeakvm --help
>  unknown option: --help
>  Usage: squeakvm [<option>...] [<imageName> [<argument>...]]
>        squeakvm [<option>...] -- [<argument>...]
>
>  ALSA <option>s:
>   -nomixer              disable mixer (volume) adjustment
>   -soundcard <name>     open the named sound card (default: default)
>   -playback <name>      play to the named sound device (default: Master)
>   -capture <name>       record from the named sound device (default:
>  Capture)
>
>  OSS <option>s:
>   -nomixer              disable mixer (volume) adjustment
>
>  FBDev <option>s:
>   -fbdev <dev>          use framebuffer device <dev> (default: /dev/fb)
>   -kbmap <file>         load keymap from <file> (default: use kernel
>  keymap)
>   -msdev <dev>          use mouse device <dev> (default: /dev/psaux)
>   -msproto <protocol>   use the given <protocol> for the mouse (default:
>  ps2)
>   -vtlock               disallow all vt switching (for any reason)
>   -vtswitch             enable keyboard vt switching (Alt+FNx)
>
>  X11 <option>s:
>   -browserWindow <wid>  run in window <wid>
>   -browserPipes <r> <w> run as Browser plugin using descriptors <r> <w>
>   -cmdmod <n>           map Mod<n> to the Command key
>   -compositioninput     enable overlay window for composed characters
>   -display <dpy>        display on <dpy> (default: $DISPLAY)
>   -fullscreen           occupy the entire screen
>   -glxdebug <n>         set GLX debug verbosity level to <n>
>   -headless             run in headless (no window) mode
>   -iconic               start up iconified
>   -lazy                 go to sleep when main window unmapped
>   -mapdelbs             map Delete key onto Backspace
>   -nointl               disable international keyboard support
>   -notitle              disable the Squeak window title bar
>   -noxdnd               disable X drag-and-drop protocol support
>   -optmod <n>           map Mod<n> to the Option key
>   -swapbtn              swap yellow (middle) and blue (right) buttons
>   -xasync               don't serialize display updates
>   -xicfont <f>          use font set <f> for the input context overlay
>   -xshm                 use X shared memory extension
>
>  Common <option>s:
>   -encoding <enc>       set the internal character encoding (default:
>  MacRoman)
>   -help                 print this help message, then exit
>   -memory <size>[mk]    use fixed heap size (added to image size)
>   -mmap <size>[mk]      limit dynamic heap size (default: 1024m)
>   -noevents             disable event-driven input support
>   -notimer              disable interval timer for low-res clock
>   -pathenc <enc>        set encoding for pathnames (default: UTF-8)
>   -plugins <path>       specify alternative plugin location (see
>  manpage)
>   -textenc <enc>        set encoding for external text (default: UTF-8)
>   -version              print version information, then exit
>   -vm-<sys>-<dev>       use the <dev> driver for <sys> (see below)
>  Deprecated:
>   -display <dpy>        quivalent to '-vm-display-X11 -display <dpy>'
>   -headless             quivalent to '-vm-display-X11 -headless'
>   -nodisplay            quivalent to '-vm-display-null'
>   -nosound              quivalent to '-vm-sound-null'
>   -quartz               quivalent to '-vm-display-Quartz'
>
>  Notes:
>   <imageName> defaults to `squeak.image'.
>   -vtlock disables keyboard vt switching even when -vtswitch is enabled
>   Using `unix:0' for <dpy> may improve local display performance.
>   -xshm only works when Squeak is running on the X server host.
>   If `-memory' is not specified then the heap will grow dynamically.
>   <argument>s are ignored, but are processed by the Squeak image.
>   The first <argument> normally names a Squeak `script' to execute.
>   Precede <arguments> by `--' to use default image.
>
>  Available drivers:
>   vm-sound-null
>   vm-sound-ALSA
>   vm-sound-OSS
>   vm-sound-NAS
>   vm-display-null
>   vm-display-fbdev
>   vm-display-X11
>  miguel@laptop:~$
>
>  So maybe you're trying to use the wrong command to start your image.
>
>  Cheers,
>  Miguel Cobá
>
>  > Thanks in advance.
>
> > _______________________________________________
>  > seaside mailing list
>  > [hidden email]
>  > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>  _______________________________________________
>  seaside mailing list
>  [hidden email]
>  http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
123