Deploying application to server

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

Deploying application to server

Martin Polák
Hi there,

I have problem with deploying application to remote server. My application works correctly on my local machine, but when I load it via Monticello to my server and create site with these commands:


name := 'pokus'.
hostname: 'aida.nigol.cz'. "add in your DNS first!"
ip := 'aida.nigol.cz'.
styleClass := 'WebStyle'. "change if you provide your own subclass"

AIDASite newNamed: name.
(AIDASite named: name) host: hostname ip: ip port: 80.
(AIDASite named: name) styleClass: styleClass.
SwazooServer startSite: name.

pokus := PAPokus new  "root domain object"
(AIDASite named: 'mysite') addUserService: pokus named: #myPokus
(AIDASite named: 'mysite') urlResolver defaultURL: '/pokkus.html' forObject: pokus



it doesn't work as expected. After visiting site at http://aida.nigol.cz/pokus.html browser try to load http://aida.nigol.cz/admin?view=login and after that, debugger in image is fired up on halt. Is there some other magic which I'm not aware of? :)
BTW. I'm hosting on Amazon's EC2 micro instance and everything seems to be alright including VNC access.

Thanks.
Martin
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Janko Mivšek
Ahoj Martin,

Is the login an expected behavior? What is a stack trace of that halt?

Self halt is namely a way to raise an exception when occurs in Aida on
Squeak/Pharo, well, once we will make this better :) That is, there is
some error in your or Aida code, that it the reason for that halt and we
need a full stack to find a reason.

Best regards
Janko

S, Martin Polák piše:

> Hi there,
>
> I have problem with deploying application to remote server. My application works correctly on my local machine, but when I load it via Monticello to my server and create site with these commands:
>
>
> name := 'pokus'.
> hostname: 'aida.nigol.cz'. "add in your DNS first!"
> ip := 'aida.nigol.cz'.
> styleClass := 'WebStyle'. "change if you provide your own subclass"
>
> AIDASite newNamed: name.
> (AIDASite named: name) host: hostname ip: ip port: 80.
> (AIDASite named: name) styleClass: styleClass.
> SwazooServer startSite: name.
>
> pokus := PAPokus new  "root domain object"
> (AIDASite named: 'mysite') addUserService: pokus named: #myPokus
> (AIDASite named: 'mysite') urlResolver defaultURL: '/pokkus.html' forObject: pokus
>
>
>
> it doesn't work as expected. After visiting site at http://aida.nigol.cz/pokus.html browser try to load http://aida.nigol.cz/admin?view=login and after that, debugger in image is fired up on halt. Is there some other magic which I'm not aware of? :)
> BTW. I'm hosting on Amazon's EC2 micro instance and everything seems to be alright including VNC access.
>
> Thanks.
> Martin
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida
>

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Martin Polák
HI Janko,


6. 8. 2011 v 20:24, Janko Mivšek:

> Ahoj Martin,
>
> Is the login an expected behavior? What is a stack trace of that halt?

I think so, because on local machine, login is showed too. Correct me if I'm wrong, by default every page in application is accessible only after one log in as admin, right? But I'm not sure, how to deal with these user privileges, so I'm not able to set my application visible for everyone.

>
> Self halt is namely a way to raise an exception when occurs in Aida on
> Squeak/Pharo, well, once we will make this better :) That is, there is
> some error in your or Aida code, that it the reason for that halt and we
> need a full stack to find a reason.

I'm almost sure, that problem is in my code :). I'm appending content of PharoDebug.log at end of this mail.

Cheers
Martin

PharoDebug.log-----------------------------

THERE_BE_DRAGONS_HERE
Halt:
6 August 2011 6:48:16 pm

VM: unix - i686 - linux - Squeak3.10.2 of '5 June 2008' [latest update: #7179]
Image: Pharo1.2.1 [Latest update: #12345]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /opt/Pharo121.app/Contents/Resources
Trusted Dir /opt/Pharo121.app/Contents/Resources/secure
Untrusted Dir /opt/Pharo121.app/Contents/Resources/My Squeak

AIDASite(Object)>>halt
        Receiver: an AIDASite
        Arguments and temporary variables:

        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'pokusSite'
                serving: true
                style: a WebStyle
                settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
                systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
                userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
                timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
                counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
                other: a Dictionary(#activityAnnouncers->a Dictionary() )


[:exception |
self halt.
        exception class == HTTPException
                ifTrue: [^ exception response].
        exception class == SpSocketError
                ifTrue: [self reportSocketError: exception request: aRequest]
                ifFalse: [self reportException: exception.
                        exception defaultAction].
        errorResponse := self httpResponseOnException: exception.
        HTTPException raiseResponse: errorResponse.
        ^ errorResponse] in AIDASite>>answerTo:
        Receiver: an AIDASite
        Arguments and temporary variables:
<<error during printing>
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'pokusSite'
                serving: true
                style: a WebStyle
                settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
                systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
                userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
                timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
                counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
                other: a Dictionary(#activityAnnouncers->a Dictionary() )


BlockClosure>>cull:
        Receiver: [:exception |
self halt.
        exception class == HTTPException
                ifTrue: [^ exception respons...etc...
        Arguments and temporary variables:
                anArg: MessageNotUnderstood: Object>>clear
        Receiver's instance variables:
                outerContext: AIDASite>>answerTo:
                startpc: 284
                numArgs: 1


[(self tempAt: 2)
                cull: exception] in MethodContext(ContextPart)>>handleSignal:
        Receiver: BlockClosure>>on:do:
        Arguments and temporary variables:
                exception: MessageNotUnderstood: Object>>clear
        Receiver's instance variables:
                sender: AIDASite>>answerTo:
                pc: 17
                stackp: 3
                method: (BlockClosure>>#on:do: "a CompiledMethod(25427968)")
                closureOrNil: nil
                receiver: [self log: self cr
                        , (self logStringFor: aRequest) , self cr , '  ...etc...


BlockClosure>>ensure:
        Receiver: [(self tempAt: 2)
                cull: exception]
        Arguments and temporary variables:
                aBlock: [self tempAt: 3 put: true]
                complete: nil
                returnValue: nil
        Receiver's instance variables:
                outerContext: MethodContext(ContextPart)>>handleSignal:
                startpc: 90
                numArgs: 0


MethodContext(ContextPart)>>handleSignal:
        Receiver: BlockClosure>>on:do:
        Arguments and temporary variables:
                exception: MessageNotUnderstood: Object>>clear
                val: nil
        Receiver's instance variables:
                sender: AIDASite>>answerTo:
                pc: 17
                stackp: 3
                method: (BlockClosure>>#on:do: "a CompiledMethod(25427968)")
                closureOrNil: nil
                receiver: [self log: self cr
                        , (self logStringFor: aRequest) , self cr , '  ...etc...


MessageNotUnderstood(Exception)>>signal
        Receiver: MessageNotUnderstood: Object>>clear
        Arguments and temporary variables:

        Receiver's instance variables:
                messageText: nil
                tag: nil
                signalContext: MessageNotUnderstood(Exception)>>signal
                handlerContext: BlockClosure>>on:do:
                outerContext: nil
                message: clear
                receiver: a WebAdminApp
                reachedDefaultHandler: false


WebAdminApp(Object)>>doesNotUnderstand: #clear
        Receiver: a WebAdminApp
        Arguments and temporary variables:
                aMessage: clear
                exception: MessageNotUnderstood: Object>>clear
                resumeValue: nil
        Receiver's instance variables:
                session: a WebSession
                observee: a WebAdmin
                contexts: a Dictionary(57825->a WebContextFirst )
                other: nil
                username: nil
                password: nil
                newUser: nil
                newSite: nil


WebAdminApp(WebApplication)>>clear
        Receiver: a WebAdminApp
        Arguments and temporary variables:

        Receiver's instance variables:
                session: a WebSession
                observee: a WebAdmin
                contexts: a Dictionary(57825->a WebContextFirst )
                other: nil
                username: nil
                password: nil
                newUser: nil
                newSite: nil


WebStyle>>pageFrameWith:title:
        Receiver: a WebStyle
        Arguments and temporary variables:
                aWebElement: a WebElement
                aTitleString: 'AIDA/Web Login'
                element: nil
        Receiver's instance variables:
                site: an AIDASite
                resources: a Dictionary(#cssPrint->a WebMethodResource #cssScreen->a WebMethodR...etc...
                searchButton: nil
                style: nil


WebAdminApp>>viewLogin
        Receiver: a WebAdminApp
        Arguments and temporary variables:
                e: a WebElement
                l: a WebFieldSet
        Receiver's instance variables:
                session: a WebSession
                observee: a WebAdmin
                contexts: a Dictionary(57825->a WebContextFirst )
                other: nil
                username: nil
                password: nil
                newUser: nil
                newSite: nil


WebAdminApp(WebApplication)>>printWebView:for:
        Receiver: a WebAdminApp
        Arguments and temporary variables:
                aViewSymbol: #login
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                method: #viewLogin
                page: nil
                form: nil
        Receiver's instance variables:
                session: a WebSession
                observee: a WebAdmin
                contexts: a Dictionary(57825->a WebContextFirst )
                other: nil
                username: nil
                password: nil
                newUser: nil
                newSite: nil


WebAdminApp(WebApplication)>>printWebPageStepTwoFor:
        Receiver: a WebAdminApp
        Arguments and temporary variables:
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                toLogin: false
        Receiver's instance variables:
                session: a WebSession
                observee: a WebAdmin
                contexts: a Dictionary(57825->a WebContextFirst )
                other: nil
                username: nil
                password: nil
                newUser: nil
                newSite: nil


WebAdminApp(WebApplication)>>printWebPageFor:
        Receiver: a WebAdminApp
        Arguments and temporary variables:
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                ctx: a WebContextFirst
        Receiver's instance variables:
                session: a WebSession
                observee: a WebAdmin
                contexts: a Dictionary(57825->a WebContextFirst )
                other: nil
                username: nil
                password: nil
                newUser: nil
                newSite: nil


WebAdmin(Object)>>printWebPageFor:on:
        Receiver: a WebAdmin
        Arguments and temporary variables:
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                aSession: a WebSession
                webApp: a WebAdminApp
        Receiver's instance variables:
                host: nil
                ip: nil
                port: nil


[page := anObject printWebPageFor: aRequest on: aWebSession] in AIDASite>>answer:toGetOrPost:on:
        Receiver: an AIDASite
        Arguments and temporary variables:
                anObject: a WebAdmin
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                aWebSession: a WebSession
                page: #(nil)
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'pokusSite'
                serving: true
                style: a WebStyle
                settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
                systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
                userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
                timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
                counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
                other: a Dictionary(#activityAnnouncers->a Dictionary() )


BlockClosure>>ifCurtailed:
        Receiver: [page := anObject printWebPageFor: aRequest on: aWebSession]
        Arguments and temporary variables:
                aBlock: [self finalizeExecutingRequest: aRequest]
                complete: nil
                result: nil
        Receiver's instance variables:
                outerContext: AIDASite>>answer:toGetOrPost:on:
                startpc: 184
                numArgs: 0


AIDASite>>answer:toGetOrPost:on:
        Receiver: an AIDASite
        Arguments and temporary variables:
                anObject: a WebAdmin
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                aWebSession: a WebSession
                stream: nil
                response: nil
                properContent: nil
                page: #(nil)
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'pokusSite'
                serving: true
                style: a WebStyle
                settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
                systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
                userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
                timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
                counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
                other: a Dictionary(#activityAnnouncers->a Dictionary() )


AIDASite>>answer:to:on:
        Receiver: an AIDASite
        Arguments and temporary variables:
                anObject: a WebAdmin
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                aWebSession: a WebSession
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'pokusSite'
                serving: true
                style: a WebStyle
                settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
                systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
                userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
                timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
                counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
                other: a Dictionary(#activityAnnouncers->a Dictionary() )


[self log: self cr
                        , (self logStringFor: aRequest) , self cr , '              s'.
        self shouldRedirect
                ifTrue: [^ self redirectToOtherHost: aRequest].
        aRequest isPing
                ifTrue: [^ HTTPResponse ok].
        session := self sessionManager findOrCreateSessionFor: aRequest.
        aRequest session: session.
        session isHttpAuthenticationNeeded
                ifTrue: [session authenticateFrom: aRequest].
        session isHttpAuthenticationNeeded
                ifTrue: [^ self unauthorizedResponse].
        self log: 'p'.
        object := self router resourceFor: aRequest.
        self countRequest: aRequest onObject: object.
        object isNil
                ifTrue: [session removeIfNewGuest.
                        ^ HTTPResponse notFound].
        ^ self
                answer: object
                to: aRequest
                on: session] in AIDASite>>answerTo:
        Receiver: an AIDASite
        Arguments and temporary variables:
<<error during printing>
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'pokusSite'
                serving: true
                style: a WebStyle
                settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
                systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
                userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
                timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
                counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
                other: a Dictionary(#activityAnnouncers->a Dictionary() )


BlockClosure>>on:do:
        Receiver: [self log: self cr
                        , (self logStringFor: aRequest) , self cr , '              s'.
        self...etc...
        Arguments and temporary variables:
                exception: an ExceptionSet
                handlerAction: [:exception |
self halt.
        exception class == HTTPException
                if...etc...
                handlerActive: false
        Receiver's instance variables:
                outerContext: AIDASite>>answerTo:
                startpc: 166
                numArgs: 0


AIDASite>>answerTo:
        Receiver: an AIDASite
        Arguments and temporary variables:
<<error during printing>
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'pokusSite'
                serving: true
                style: a WebStyle
                settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
                systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
                userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
                timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
                counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
                other: a Dictionary(#activityAnnouncers->a Dictionary() )


AIDASite>>helpResolve:
        Receiver: an AIDASite
        Arguments and temporary variables:
                aResolution: an URIResolution
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'pokusSite'
                serving: true
                style: a WebStyle
                settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
                systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
                userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
                timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
                counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
                other: a Dictionary(#activityAnnouncers->a Dictionary() )


URIResolution>>visitResource:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aResource: an AIDASite
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
        ...etc...


[:each |
response := self visitResource: each.
        response isNil
                ifFalse: [^ response]] in URIResolution>>visitChildrenOf:advancing:
        Receiver: an URIResolution
        Arguments and temporary variables:
                response: an AIDASite
                each: #(nil)
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
        ...etc...


OrderedCollection>>do:
        Receiver: an OrderedCollection(an AIDASite)
        Arguments and temporary variables:
                aBlock: [:each |
response := self visitResource: each.
        response isNil
                ifFal...etc...
                index: 3
        Receiver's instance variables:
                array: an Array(nil nil an AIDASite nil nil nil nil nil nil nil)
                firstIndex: 3
                lastIndex: 3


URIResolution>>visitChildrenOf:advancing:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aResource: a ServerRootComposite
                aBoolean: false
                response: #(nil)
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
        ...etc...


URIResolution>>resolveTransparentComposite:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aCompositeResource: a ServerRootComposite
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
        ...etc...


URIResolution>>resolveServerRoot:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aServerRoot: a ServerRootComposite
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
        ...etc...


ServerRootComposite>>helpResolve:
        Receiver: a ServerRootComposite
        Arguments and temporary variables:
                aResolution: an URIResolution
        Receiver's instance variables:
                enabled: true
                uriPattern: ''
                parent: nil
                children: an OrderedCollection(an AIDASite)


URIResolution>>visitResource:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aResource: a ServerRootComposite
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
        ...etc...


URIResolution class>>resolveRequest:startingAt:
        Receiver: URIResolution
        Arguments and temporary variables:
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                aResource: a ServerRootComposite
        Receiver's instance variables:
                superclass: Object
                methodDict: a MethodDictionary(#advance->(URIResolution>>#advance "a CompiledMe...etc...
                format: 134
                instanceVariables: #('position' 'request')
                organization: ('private' advance currentIdentifier currentPath getAnswerFrom: p...etc...
                subclasses: nil
                name: #URIResolution
                classPool: nil
                sharedPools: nil
                environment: a SystemDictionary(lots of globals)
                category: #'Swazoo-HTTP'
                traitComposition: {}
                localSelectors: nil


HTTPServer>>answerTo:
        Receiver: a HTTPServer
        Arguments and temporary variables:
                aRequest: a HTTPRequest GET
         from: 46.135.89.8
         at: 6 August 2011 6:48:15 pm
...etc...
                response: nil
        Receiver's instance variables:
                ip: 'aida.nigol.cz'
                port: 80
                connections: an OrderedCollection(a HTTPConnection a HTTPConnection a HTTPConne...etc...
                sites: a ServerRootComposite
                socket: a SwazooSocket
                loop: a Process in [self schedule.
        beingWaitedOn
                ifTrue: [delaySemaphore wai...etc...
                isMultiThreading: true


HTTPConnection>>produceResponseFor:
        Receiver: a HTTPConnection
        Arguments and temporary variables:
                aSwazooTask: a SwazooTask
        Receiver's instance variables:
                stream: a SwazooStream
                loop: a Process in MorphicUIManager>>openDebuggerOn:context:label:contents:full...etc...
                server: a HTTPServer
                task: a SwazooTask
                other: nil


HTTPConnection>>getAndDispatchMessages
        Receiver: a HTTPConnection
        Arguments and temporary variables:

        Receiver's instance variables:
                stream: a SwazooStream
                loop: a Process in MorphicUIManager>>openDebuggerOn:context:label:contents:full...etc...
                server: a HTTPServer
                task: a SwazooTask
                other: nil


[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil] in [[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]] in [[[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]]
                ifCurtailed: [(Delay forMilliseconds: 50) wait.
                        self close]] in HTTPConnection>>interact
        Receiver: a HTTPConnection
        Arguments and temporary variables:

        Receiver's instance variables:
                stream: a SwazooStream
                loop: a Process in MorphicUIManager>>openDebuggerOn:context:label:contents:full...etc...
                server: a HTTPServer
                task: a SwazooTask
                other: nil


BlockClosure>>on:do:
        Receiver: [[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
        Arguments and temporary variables:
                exception: Error
                handlerAction: [:ex | nil]
                handlerActive: true
        Receiver's instance variables:
                outerContext: [[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor ...etc...
                startpc: 89
                numArgs: 0


[[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]] in [[[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]]
                ifCurtailed: [(Delay forMilliseconds: 50) wait.
                        self close]] in HTTPConnection>>interact
        Receiver: a HTTPConnection
        Arguments and temporary variables:

        Receiver's instance variables:
                stream: a SwazooStream
                loop: a Process in MorphicUIManager>>openDebuggerOn:context:label:contents:full...etc...
                server: a HTTPServer
                task: a SwazooTask
                other: nil


BlockClosure>>ifCurtailed:
        Receiver: [[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error...etc...
        Arguments and temporary variables:
                aBlock: [(Delay forMilliseconds: 50) wait.
        self close]
                complete: nil
                result: nil
        Receiver's instance variables:
                outerContext: [[[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor...etc...
                startpc: 85
                numArgs: 0



--- The full stack ---
AIDASite(Object)>>halt
[:exception |
self halt.
        exception class == HTTPException
                ifTrue: [^ exception response].
        exception class == SpSocketError
                ifTrue: [self reportSocketError: exception request: aRequest]
                ifFalse: [self reportException: exception.
                        exception defaultAction].
        errorResponse := self httpResponseOnException: exception.
        HTTPException raiseResponse: errorResponse.
        ^ errorResponse] in AIDASite>>answerTo:
BlockClosure>>cull:
[(self tempAt: 2)
                cull: exception] in MethodContext(ContextPart)>>handleSignal:
BlockClosure>>ensure:
MethodContext(ContextPart)>>handleSignal:
MessageNotUnderstood(Exception)>>signal
WebAdminApp(Object)>>doesNotUnderstand: #clear
WebAdminApp(WebApplication)>>clear
WebStyle>>pageFrameWith:title:
WebAdminApp>>viewLogin
WebAdminApp(WebApplication)>>printWebView:for:
WebAdminApp(WebApplication)>>printWebPageStepTwoFor:
WebAdminApp(WebApplication)>>printWebPageFor:
WebAdmin(Object)>>printWebPageFor:on:
[page := anObject printWebPageFor: aRequest on: aWebSession] in AIDASite>>answer:toGetOrPost:on:
BlockClosure>>ifCurtailed:
AIDASite>>answer:toGetOrPost:on:
AIDASite>>answer:to:on:
[self log: self cr
                        , (self logStringFor: aRequest) , self cr , '              s'.
        self shouldRedirect
                ifTrue: [^ self redirectToOtherHost: aRequest].
        aRequest isPing
                ifTrue: [^ HTTPResponse ok].
        session := self sessionManager findOrCreateSessionFor: aRequest.
        aRequest session: session.
        session isHttpAuthenticationNeeded
                ifTrue: [session authenticateFrom: aRequest].
        session isHttpAuthenticationNeeded
                ifTrue: [^ self unauthorizedResponse].
        self log: 'p'.
        object := self router resourceFor: aRequest.
        self countRequest: aRequest onObject: object.
        object isNil
                ifTrue: [session removeIfNewGuest.
                        ^ HTTPResponse notFound].
        ^ self
                answer: object
                to: aRequest
                on: session] in AIDASite>>answerTo:
BlockClosure>>on:do:
AIDASite>>answerTo:
AIDASite>>helpResolve:
URIResolution>>visitResource:
[:each |
response := self visitResource: each.
        response isNil
                ifFalse: [^ response]] in URIResolution>>visitChildrenOf:advancing:
OrderedCollection>>do:
URIResolution>>visitChildrenOf:advancing:
URIResolution>>resolveTransparentComposite:
URIResolution>>resolveServerRoot:
ServerRootComposite>>helpResolve:
URIResolution>>visitResource:
URIResolution class>>resolveRequest:startingAt:
HTTPServer>>answerTo:
HTTPConnection>>produceResponseFor:
HTTPConnection>>getAndDispatchMessages
[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil] in [[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]] in [[[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]]
                ifCurtailed: [(Delay forMilliseconds: 50) wait.
                        self close]] in HTTPConnection>>interact
BlockClosure>>on:do:
[[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]] in [[[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]]
                ifCurtailed: [(Delay forMilliseconds: 50) wait.
                        self close]] in HTTPConnection>>interact
BlockClosure>>ifCurtailed:
 - - - - - - - - - - - - - - -  
                        - - - - - - - - - - - - - - - - - -
[[[[true]
                whileTrue: [self getAndDispatchMessages.
                        Processor yield].
        nil]
                on: Error
                do: [:ex | nil]]
                ifCurtailed: [(Delay forMilliseconds: 50) wait.
                        self close]] in HTTPConnection>>interact
[self value.
        Processor terminateActive] in BlockClosure>>newProcess
------------------------------------------------------------


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Janko Mivšek
Hi Martin,

Bravo, you found a bug in Aida :) It is in WebStyle and because a
DefaultWebStyle is used in aidademo, noone noticed :) But in any case it
is better to use a DefaultWebStyle instead, until you won't do your
completely own "styling". So, by changing the style class it should work.

About security, login as admin, click Security down in navigation, tab
Groups, click AllUsers, then for access without limits click Access
rights, then your App classes and set View all to them.

Best regards
Janko

S, Martin Polák piše:

> HI Janko,
>
>
> 6. 8. 2011 v 20:24, Janko Mivšek:
>
>> Ahoj Martin,
>>
>> Is the login an expected behavior? What is a stack trace of that halt?
>
> I think so, because on local machine, login is showed too. Correct me if I'm wrong, by default every page in application is accessible only after one log in as admin, right? But I'm not sure, how to deal with these user privileges, so I'm not able to set my application visible for everyone.
>
>>
>> Self halt is namely a way to raise an exception when occurs in Aida on
>> Squeak/Pharo, well, once we will make this better :) That is, there is
>> some error in your or Aida code, that it the reason for that halt and we
>> need a full stack to find a reason.
>
> I'm almost sure, that problem is in my code :). I'm appending content of PharoDebug.log at end of this mail.
>
> Cheers
> Martin
>
> PharoDebug.log-----------------------------
>
> THERE_BE_DRAGONS_HERE
> Halt:
> 6 August 2011 6:48:16 pm
>
> VM: unix - i686 - linux - Squeak3.10.2 of '5 June 2008' [latest update: #7179]
> Image: Pharo1.2.1 [Latest update: #12345]
>
> SecurityManager state:
> Restricted: false
> FileAccess: true
> SocketAccess: true
> Working Dir /opt/Pharo121.app/Contents/Resources
> Trusted Dir /opt/Pharo121.app/Contents/Resources/secure
> Untrusted Dir /opt/Pharo121.app/Contents/Resources/My Squeak
>
> AIDASite(Object)>>halt
> Receiver: an AIDASite
> Arguments and temporary variables:
>
> Receiver's instance variables:
> enabled: true
> uriPattern: an OrderedCollection(a SiteIdentifier)
> parent: a ServerRootComposite
> children: an OrderedCollection()
> name: 'pokusSite'
> serving: true
> style: a WebStyle
> settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
> systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
> userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
> timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
> counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
> other: a Dictionary(#activityAnnouncers->a Dictionary() )
>
>
> [:exception |
> self halt.
> exception class == HTTPException
> ifTrue: [^ exception response].
> exception class == SpSocketError
> ifTrue: [self reportSocketError: exception request: aRequest]
> ifFalse: [self reportException: exception.
> exception defaultAction].
> errorResponse := self httpResponseOnException: exception.
> HTTPException raiseResponse: errorResponse.
> ^ errorResponse] in AIDASite>>answerTo:
> Receiver: an AIDASite
> Arguments and temporary variables:
> <<error during printing>
> Receiver's instance variables:
> enabled: true
> uriPattern: an OrderedCollection(a SiteIdentifier)
> parent: a ServerRootComposite
> children: an OrderedCollection()
> name: 'pokusSite'
> serving: true
> style: a WebStyle
> settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
> systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
> userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
> timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
> counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
> other: a Dictionary(#activityAnnouncers->a Dictionary() )
>
>
> BlockClosure>>cull:
> Receiver: [:exception |
> self halt.
> exception class == HTTPException
> ifTrue: [^ exception respons...etc...
> Arguments and temporary variables:
> anArg: MessageNotUnderstood: Object>>clear
> Receiver's instance variables:
> outerContext: AIDASite>>answerTo:
> startpc: 284
> numArgs: 1
>
>
> [(self tempAt: 2)
> cull: exception] in MethodContext(ContextPart)>>handleSignal:
> Receiver: BlockClosure>>on:do:
> Arguments and temporary variables:
> exception: MessageNotUnderstood: Object>>clear
> Receiver's instance variables:
> sender: AIDASite>>answerTo:
> pc: 17
> stackp: 3
> method: (BlockClosure>>#on:do: "a CompiledMethod(25427968)")
> closureOrNil: nil
> receiver: [self log: self cr
> , (self logStringFor: aRequest) , self cr , '  ...etc...
>
>
> BlockClosure>>ensure:
> Receiver: [(self tempAt: 2)
> cull: exception]
> Arguments and temporary variables:
> aBlock: [self tempAt: 3 put: true]
> complete: nil
> returnValue: nil
> Receiver's instance variables:
> outerContext: MethodContext(ContextPart)>>handleSignal:
> startpc: 90
> numArgs: 0
>
>
> MethodContext(ContextPart)>>handleSignal:
> Receiver: BlockClosure>>on:do:
> Arguments and temporary variables:
> exception: MessageNotUnderstood: Object>>clear
> val: nil
> Receiver's instance variables:
> sender: AIDASite>>answerTo:
> pc: 17
> stackp: 3
> method: (BlockClosure>>#on:do: "a CompiledMethod(25427968)")
> closureOrNil: nil
> receiver: [self log: self cr
> , (self logStringFor: aRequest) , self cr , '  ...etc...
>
>
> MessageNotUnderstood(Exception)>>signal
> Receiver: MessageNotUnderstood: Object>>clear
> Arguments and temporary variables:
>
> Receiver's instance variables:
> messageText: nil
> tag: nil
> signalContext: MessageNotUnderstood(Exception)>>signal
> handlerContext: BlockClosure>>on:do:
> outerContext: nil
> message: clear
> receiver: a WebAdminApp
> reachedDefaultHandler: false
>
>
> WebAdminApp(Object)>>doesNotUnderstand: #clear
> Receiver: a WebAdminApp
> Arguments and temporary variables:
> aMessage: clear
> exception: MessageNotUnderstood: Object>>clear
> resumeValue: nil
> Receiver's instance variables:
> session: a WebSession
> observee: a WebAdmin
> contexts: a Dictionary(57825->a WebContextFirst )
> other: nil
> username: nil
> password: nil
> newUser: nil
> newSite: nil
>
>
> WebAdminApp(WebApplication)>>clear
> Receiver: a WebAdminApp
> Arguments and temporary variables:
>
> Receiver's instance variables:
> session: a WebSession
> observee: a WebAdmin
> contexts: a Dictionary(57825->a WebContextFirst )
> other: nil
> username: nil
> password: nil
> newUser: nil
> newSite: nil
>
>
> WebStyle>>pageFrameWith:title:
> Receiver: a WebStyle
> Arguments and temporary variables:
> aWebElement: a WebElement
> aTitleString: 'AIDA/Web Login'
> element: nil
> Receiver's instance variables:
> site: an AIDASite
> resources: a Dictionary(#cssPrint->a WebMethodResource #cssScreen->a WebMethodR...etc...
> searchButton: nil
> style: nil
>
>
> WebAdminApp>>viewLogin
> Receiver: a WebAdminApp
> Arguments and temporary variables:
> e: a WebElement
> l: a WebFieldSet
> Receiver's instance variables:
> session: a WebSession
> observee: a WebAdmin
> contexts: a Dictionary(57825->a WebContextFirst )
> other: nil
> username: nil
> password: nil
> newUser: nil
> newSite: nil
>
>
> WebAdminApp(WebApplication)>>printWebView:for:
> Receiver: a WebAdminApp
> Arguments and temporary variables:
> aViewSymbol: #login
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> method: #viewLogin
> page: nil
> form: nil
> Receiver's instance variables:
> session: a WebSession
> observee: a WebAdmin
> contexts: a Dictionary(57825->a WebContextFirst )
> other: nil
> username: nil
> password: nil
> newUser: nil
> newSite: nil
>
>
> WebAdminApp(WebApplication)>>printWebPageStepTwoFor:
> Receiver: a WebAdminApp
> Arguments and temporary variables:
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> toLogin: false
> Receiver's instance variables:
> session: a WebSession
> observee: a WebAdmin
> contexts: a Dictionary(57825->a WebContextFirst )
> other: nil
> username: nil
> password: nil
> newUser: nil
> newSite: nil
>
>
> WebAdminApp(WebApplication)>>printWebPageFor:
> Receiver: a WebAdminApp
> Arguments and temporary variables:
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> ctx: a WebContextFirst
> Receiver's instance variables:
> session: a WebSession
> observee: a WebAdmin
> contexts: a Dictionary(57825->a WebContextFirst )
> other: nil
> username: nil
> password: nil
> newUser: nil
> newSite: nil
>
>
> WebAdmin(Object)>>printWebPageFor:on:
> Receiver: a WebAdmin
> Arguments and temporary variables:
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> aSession: a WebSession
> webApp: a WebAdminApp
> Receiver's instance variables:
> host: nil
> ip: nil
> port: nil
>
>
> [page := anObject printWebPageFor: aRequest on: aWebSession] in AIDASite>>answer:toGetOrPost:on:
> Receiver: an AIDASite
> Arguments and temporary variables:
> anObject: a WebAdmin
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> aWebSession: a WebSession
> page: #(nil)
> Receiver's instance variables:
> enabled: true
> uriPattern: an OrderedCollection(a SiteIdentifier)
> parent: a ServerRootComposite
> children: an OrderedCollection()
> name: 'pokusSite'
> serving: true
> style: a WebStyle
> settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
> systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
> userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
> timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
> counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
> other: a Dictionary(#activityAnnouncers->a Dictionary() )
>
>
> BlockClosure>>ifCurtailed:
> Receiver: [page := anObject printWebPageFor: aRequest on: aWebSession]
> Arguments and temporary variables:
> aBlock: [self finalizeExecutingRequest: aRequest]
> complete: nil
> result: nil
> Receiver's instance variables:
> outerContext: AIDASite>>answer:toGetOrPost:on:
> startpc: 184
> numArgs: 0
>
>
> AIDASite>>answer:toGetOrPost:on:
> Receiver: an AIDASite
> Arguments and temporary variables:
> anObject: a WebAdmin
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> aWebSession: a WebSession
> stream: nil
> response: nil
> properContent: nil
> page: #(nil)
> Receiver's instance variables:
> enabled: true
> uriPattern: an OrderedCollection(a SiteIdentifier)
> parent: a ServerRootComposite
> children: an OrderedCollection()
> name: 'pokusSite'
> serving: true
> style: a WebStyle
> settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
> systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
> userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
> timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
> counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
> other: a Dictionary(#activityAnnouncers->a Dictionary() )
>
>
> AIDASite>>answer:to:on:
> Receiver: an AIDASite
> Arguments and temporary variables:
> anObject: a WebAdmin
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> aWebSession: a WebSession
> Receiver's instance variables:
> enabled: true
> uriPattern: an OrderedCollection(a SiteIdentifier)
> parent: a ServerRootComposite
> children: an OrderedCollection()
> name: 'pokusSite'
> serving: true
> style: a WebStyle
> settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
> systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
> userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
> timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
> counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
> other: a Dictionary(#activityAnnouncers->a Dictionary() )
>
>
> [self log: self cr
> , (self logStringFor: aRequest) , self cr , '              s'.
> self shouldRedirect
> ifTrue: [^ self redirectToOtherHost: aRequest].
> aRequest isPing
> ifTrue: [^ HTTPResponse ok].
> session := self sessionManager findOrCreateSessionFor: aRequest.
> aRequest session: session.
> session isHttpAuthenticationNeeded
> ifTrue: [session authenticateFrom: aRequest].
> session isHttpAuthenticationNeeded
> ifTrue: [^ self unauthorizedResponse].
> self log: 'p'.
> object := self router resourceFor: aRequest.
> self countRequest: aRequest onObject: object.
> object isNil
> ifTrue: [session removeIfNewGuest.
> ^ HTTPResponse notFound].
> ^ self
> answer: object
> to: aRequest
> on: session] in AIDASite>>answerTo:
> Receiver: an AIDASite
> Arguments and temporary variables:
> <<error during printing>
> Receiver's instance variables:
> enabled: true
> uriPattern: an OrderedCollection(a SiteIdentifier)
> parent: a ServerRootComposite
> children: an OrderedCollection()
> name: 'pokusSite'
> serving: true
> style: a WebStyle
> settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
> systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
> userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
> timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
> counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
> other: a Dictionary(#activityAnnouncers->a Dictionary() )
>
>
> BlockClosure>>on:do:
> Receiver: [self log: self cr
> , (self logStringFor: aRequest) , self cr , '              s'.
> self...etc...
> Arguments and temporary variables:
> exception: an ExceptionSet
> handlerAction: [:exception |
> self halt.
> exception class == HTTPException
> if...etc...
> handlerActive: false
> Receiver's instance variables:
> outerContext: AIDASite>>answerTo:
> startpc: 166
> numArgs: 0
>
>
> AIDASite>>answerTo:
> Receiver: an AIDASite
> Arguments and temporary variables:
> <<error during printing>
> Receiver's instance variables:
> enabled: true
> uriPattern: an OrderedCollection(a SiteIdentifier)
> parent: a ServerRootComposite
> children: an OrderedCollection()
> name: 'pokusSite'
> serving: true
> style: a WebStyle
> settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
> systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
> userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
> timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
> counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
> other: a Dictionary(#activityAnnouncers->a Dictionary() )
>
>
> AIDASite>>helpResolve:
> Receiver: an AIDASite
> Arguments and temporary variables:
> aResolution: an URIResolution
> Receiver's instance variables:
> enabled: true
> uriPattern: an OrderedCollection(a SiteIdentifier)
> parent: a ServerRootComposite
> children: an OrderedCollection()
> name: 'pokusSite'
> serving: true
> style: a WebStyle
> settings: a Dictionary(#countingPolicy->#all #diagnostics->false #helpURL->'/he...etc...
> systemServices: a Dictionary(#Admin->a WebAdmin #Cache->a WebCache #Router->a W...etc...
> userServices: a Dictionary(#WebDemo->a WebDemo #myPokus->a PAPokus )
> timestamps: an IdentityDictionary(#Created->3489939861 #LastRequest->3490109295...etc...
> counters: an IdentityDictionary(#NewVisitors->a WebCounter #NotFound->a WebCoun...etc...
> other: a Dictionary(#activityAnnouncers->a Dictionary() )
>
>
> URIResolution>>visitResource:
> Receiver: an URIResolution
> Arguments and temporary variables:
> aResource: an AIDASite
> Receiver's instance variables:
> position: 1
> request: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
>
>
> [:each |
> response := self visitResource: each.
> response isNil
> ifFalse: [^ response]] in URIResolution>>visitChildrenOf:advancing:
> Receiver: an URIResolution
> Arguments and temporary variables:
> response: an AIDASite
> each: #(nil)
> Receiver's instance variables:
> position: 1
> request: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
>
>
> OrderedCollection>>do:
> Receiver: an OrderedCollection(an AIDASite)
> Arguments and temporary variables:
> aBlock: [:each |
> response := self visitResource: each.
> response isNil
> ifFal...etc...
> index: 3
> Receiver's instance variables:
> array: an Array(nil nil an AIDASite nil nil nil nil nil nil nil)
> firstIndex: 3
> lastIndex: 3
>
>
> URIResolution>>visitChildrenOf:advancing:
> Receiver: an URIResolution
> Arguments and temporary variables:
> aResource: a ServerRootComposite
> aBoolean: false
> response: #(nil)
> Receiver's instance variables:
> position: 1
> request: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
>
>
> URIResolution>>resolveTransparentComposite:
> Receiver: an URIResolution
> Arguments and temporary variables:
> aCompositeResource: a ServerRootComposite
> Receiver's instance variables:
> position: 1
> request: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
>
>
> URIResolution>>resolveServerRoot:
> Receiver: an URIResolution
> Arguments and temporary variables:
> aServerRoot: a ServerRootComposite
> Receiver's instance variables:
> position: 1
> request: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
>
>
> ServerRootComposite>>helpResolve:
> Receiver: a ServerRootComposite
> Arguments and temporary variables:
> aResolution: an URIResolution
> Receiver's instance variables:
> enabled: true
> uriPattern: ''
> parent: nil
> children: an OrderedCollection(an AIDASite)
>
>
> URIResolution>>visitResource:
> Receiver: an URIResolution
> Arguments and temporary variables:
> aResource: a ServerRootComposite
> Receiver's instance variables:
> position: 1
> request: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
>
>
> URIResolution class>>resolveRequest:startingAt:
> Receiver: URIResolution
> Arguments and temporary variables:
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> aResource: a ServerRootComposite
> Receiver's instance variables:
> superclass: Object
> methodDict: a MethodDictionary(#advance->(URIResolution>>#advance "a CompiledMe...etc...
> format: 134
> instanceVariables: #('position' 'request')
> organization: ('private' advance currentIdentifier currentPath getAnswerFrom: p...etc...
> subclasses: nil
> name: #URIResolution
> classPool: nil
> sharedPools: nil
> environment: a SystemDictionary(lots of globals)
> category: #'Swazoo-HTTP'
> traitComposition: {}
> localSelectors: nil
>
>
> HTTPServer>>answerTo:
> Receiver: a HTTPServer
> Arguments and temporary variables:
> aRequest: a HTTPRequest GET
> from: 46.135.89.8
> at: 6 August 2011 6:48:15 pm
> ...etc...
> response: nil
> Receiver's instance variables:
> ip: 'aida.nigol.cz'
> port: 80
> connections: an OrderedCollection(a HTTPConnection a HTTPConnection a HTTPConne...etc...
> sites: a ServerRootComposite
> socket: a SwazooSocket
> loop: a Process in [self schedule.
> beingWaitedOn
> ifTrue: [delaySemaphore wai...etc...
> isMultiThreading: true
>
>
> HTTPConnection>>produceResponseFor:
> Receiver: a HTTPConnection
> Arguments and temporary variables:
> aSwazooTask: a SwazooTask
> Receiver's instance variables:
> stream: a SwazooStream
> loop: a Process in MorphicUIManager>>openDebuggerOn:context:label:contents:full...etc...
> server: a HTTPServer
> task: a SwazooTask
> other: nil
>
>
> HTTPConnection>>getAndDispatchMessages
> Receiver: a HTTPConnection
> Arguments and temporary variables:
>
> Receiver's instance variables:
> stream: a SwazooStream
> loop: a Process in MorphicUIManager>>openDebuggerOn:context:label:contents:full...etc...
> server: a HTTPServer
> task: a SwazooTask
> other: nil
>
>
> [[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil] in [[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]] in [[[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]]
> ifCurtailed: [(Delay forMilliseconds: 50) wait.
> self close]] in HTTPConnection>>interact
> Receiver: a HTTPConnection
> Arguments and temporary variables:
>
> Receiver's instance variables:
> stream: a SwazooStream
> loop: a Process in MorphicUIManager>>openDebuggerOn:context:label:contents:full...etc...
> server: a HTTPServer
> task: a SwazooTask
> other: nil
>
>
> BlockClosure>>on:do:
> Receiver: [[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> Arguments and temporary variables:
> exception: Error
> handlerAction: [:ex | nil]
> handlerActive: true
> Receiver's instance variables:
> outerContext: [[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor ...etc...
> startpc: 89
> numArgs: 0
>
>
> [[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]] in [[[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]]
> ifCurtailed: [(Delay forMilliseconds: 50) wait.
> self close]] in HTTPConnection>>interact
> Receiver: a HTTPConnection
> Arguments and temporary variables:
>
> Receiver's instance variables:
> stream: a SwazooStream
> loop: a Process in MorphicUIManager>>openDebuggerOn:context:label:contents:full...etc...
> server: a HTTPServer
> task: a SwazooTask
> other: nil
>
>
> BlockClosure>>ifCurtailed:
> Receiver: [[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error...etc...
> Arguments and temporary variables:
> aBlock: [(Delay forMilliseconds: 50) wait.
> self close]
> complete: nil
> result: nil
> Receiver's instance variables:
> outerContext: [[[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor...etc...
> startpc: 85
> numArgs: 0
>
>
>
> --- The full stack ---
> AIDASite(Object)>>halt
> [:exception |
> self halt.
> exception class == HTTPException
> ifTrue: [^ exception response].
> exception class == SpSocketError
> ifTrue: [self reportSocketError: exception request: aRequest]
> ifFalse: [self reportException: exception.
> exception defaultAction].
> errorResponse := self httpResponseOnException: exception.
> HTTPException raiseResponse: errorResponse.
> ^ errorResponse] in AIDASite>>answerTo:
> BlockClosure>>cull:
> [(self tempAt: 2)
> cull: exception] in MethodContext(ContextPart)>>handleSignal:
> BlockClosure>>ensure:
> MethodContext(ContextPart)>>handleSignal:
> MessageNotUnderstood(Exception)>>signal
> WebAdminApp(Object)>>doesNotUnderstand: #clear
> WebAdminApp(WebApplication)>>clear
> WebStyle>>pageFrameWith:title:
> WebAdminApp>>viewLogin
> WebAdminApp(WebApplication)>>printWebView:for:
> WebAdminApp(WebApplication)>>printWebPageStepTwoFor:
> WebAdminApp(WebApplication)>>printWebPageFor:
> WebAdmin(Object)>>printWebPageFor:on:
> [page := anObject printWebPageFor: aRequest on: aWebSession] in AIDASite>>answer:toGetOrPost:on:
> BlockClosure>>ifCurtailed:
> AIDASite>>answer:toGetOrPost:on:
> AIDASite>>answer:to:on:
> [self log: self cr
> , (self logStringFor: aRequest) , self cr , '              s'.
> self shouldRedirect
> ifTrue: [^ self redirectToOtherHost: aRequest].
> aRequest isPing
> ifTrue: [^ HTTPResponse ok].
> session := self sessionManager findOrCreateSessionFor: aRequest.
> aRequest session: session.
> session isHttpAuthenticationNeeded
> ifTrue: [session authenticateFrom: aRequest].
> session isHttpAuthenticationNeeded
> ifTrue: [^ self unauthorizedResponse].
> self log: 'p'.
> object := self router resourceFor: aRequest.
> self countRequest: aRequest onObject: object.
> object isNil
> ifTrue: [session removeIfNewGuest.
> ^ HTTPResponse notFound].
> ^ self
> answer: object
> to: aRequest
> on: session] in AIDASite>>answerTo:
> BlockClosure>>on:do:
> AIDASite>>answerTo:
> AIDASite>>helpResolve:
> URIResolution>>visitResource:
> [:each |
> response := self visitResource: each.
> response isNil
> ifFalse: [^ response]] in URIResolution>>visitChildrenOf:advancing:
> OrderedCollection>>do:
> URIResolution>>visitChildrenOf:advancing:
> URIResolution>>resolveTransparentComposite:
> URIResolution>>resolveServerRoot:
> ServerRootComposite>>helpResolve:
> URIResolution>>visitResource:
> URIResolution class>>resolveRequest:startingAt:
> HTTPServer>>answerTo:
> HTTPConnection>>produceResponseFor:
> HTTPConnection>>getAndDispatchMessages
> [[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil] in [[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]] in [[[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]]
> ifCurtailed: [(Delay forMilliseconds: 50) wait.
> self close]] in HTTPConnection>>interact
> BlockClosure>>on:do:
> [[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]] in [[[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]]
> ifCurtailed: [(Delay forMilliseconds: 50) wait.
> self close]] in HTTPConnection>>interact
> BlockClosure>>ifCurtailed:
>  - - - - - - - - - - - - - - -  
> - - - - - - - - - - - - - - - - - -
> [[[[true]
> whileTrue: [self getAndDispatchMessages.
> Processor yield].
> nil]
> on: Error
> do: [:ex | nil]]
> ifCurtailed: [(Delay forMilliseconds: 50) wait.
> self close]] in HTTPConnection>>interact
> [self value.
> Processor terminateActive] in BlockClosure>>newProcess
> ------------------------------------------------------------
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida
>

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Martin Polák
Hi Janko,


6. 8. 2011 v 21:54, Janko Mivšek:

> Hi Martin,
>
> Bravo, you found a bug in Aida :) It is in WebStyle and because a
> DefaultWebStyle is used in aidademo, noone noticed :) But in any case it
> is better to use a DefaultWebStyle instead, until you won't do your
> completely own "styling". So, by changing the style class it should work.
>

Ok, that's my first "contribution" to Aida :) Your suggestion helped and everything working great now. I must now in spare time figure out, how to create my own style (subclass WebStyle and explore, how the DefaultWebStyle is implemented).

> About security, login as admin, click Security down in navigation, tab
> Groups, click AllUsers, then for access without limits click Access
> rights, then your App classes and set View all to them.
>

Great, works too :).

Other story is the way, how Aida with Swazoo act as server. I like it much more than Seaside's Kom with for example Apache. Now I have only Pharo image with Aida on my server and I'm perfectly able to handle all that virtual names stuff completely with Smalltalk via VNC. That's a big difference with my Seaside deployment scenario, where I must handle all this configuration by editing Apache's config files to create proxy to the Seaside's image. And that's really boring.

Martin

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Janko Mivšek
Hi Martin

S, Martin Polák piše:

> Other story is the way, how Aida with Swazoo act as server. I like it much more than Seaside's Kom with for example Apache. Now I have only Pharo image with Aida on my server and I'm perfectly able to handle all that virtual names stuff completely with Smalltalk via VNC. That's a big difference with my Seaside deployment scenario, where I must handle all this configuration by editing Apache's config files to create proxy to the Seaside's image. And that's really boring.

Virtual serving of many Aida websites together with static content is
indeed very neat and useful feature. You can deploy a new site in a
minute! Even a whole image can be deployed by just loading the code and
setting host:ip:port: combo in few minutes.

On VisualWorks Swazoo works great as a standalone web server while on
Pharo it seems that a "Sockets not closing" [1] bug can have problems.
But Pharo guys are aware of it and hopelly they will resolve it soon. I
also need Swazoo on Pharo working well, so cosider that problem almost
solved :)

What will be very nice contribution would be an article, something like
"Deploying Aida in the Cloud". As a blog post or as a docs page on our
website. What do you think?


[1] http://forum.world.st/Sockets-don-t-close-100-CPU-tt3648046.html

Best regards
Janko

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Nicholas Moore
A great title would be: "AIDA: Head in the clouds - feet on the ground"

:-))

On 08/08/11 13:29, Janko Mivšek wrote:
Hi Martin

S, Martin Polák piše:

Other story is the way, how Aida with Swazoo act as server. I like it much more than Seaside's Kom with for example Apache. Now I have only Pharo image with Aida on my server and I'm perfectly able to handle all that virtual names stuff completely with Smalltalk via VNC. That's a big difference with my Seaside deployment scenario, where I must handle all this configuration by editing Apache's config files to create proxy to the Seaside's image. And that's really boring.
Virtual serving of many Aida websites together with static content is
indeed very neat and useful feature. You can deploy a new site in a
minute! Even a whole image can be deployed by just loading the code and
setting host:ip:port: combo in few minutes.

On VisualWorks Swazoo works great as a standalone web server while on
Pharo it seems that a "Sockets not closing" [1] bug can have problems.
But Pharo guys are aware of it and hopelly they will resolve it soon. I
also need Swazoo on Pharo working well, so cosider that problem almost
solved :)

What will be very nice contribution would be an article, something like
"Deploying Aida in the Cloud". As a blog post or as a docs page on our
website. What do you think?


[1] http://forum.world.st/Sockets-don-t-close-100-CPU-tt3648046.html

Best regards
Janko


--

Nicholas Moore


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Martin Polák
In reply to this post by Janko Mivšek
Hi Janko,


8. 8. 2011 v 13:29, Janko Mivšek:

> Hi Martin
>
> S, Martin Polák piše:
>
>
> On VisualWorks Swazoo works great as a standalone web server while on
> Pharo it seems that a "Sockets not closing" [1] bug can have problems.
> But Pharo guys are aware of it and hopelly they will resolve it soon. I
> also need Swazoo on Pharo working well, so cosider that problem almost
> solved :)

Do you mind this bug is present in Squeak too, or it is only Pharo related? Is this a big problem with real life websites?

>
> What will be very nice contribution would be an article, something like
> "Deploying Aida in the Cloud". As a blog post or as a docs page on our
> website. What do you think?

That's good idea. I don't have a blog, so documentation page on Aida's website should be better option. But I'm not sure, if I'm the right guy to do this :) I have very little experience with Aida now. I'll try to write something when time allows me, but I can't promise anything.  


Martin
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Janko Mivšek
S, Martin Polák piše:

>> On VisualWorks Swazoo works great as a standalone web server while on
>> Pharo it seems that a "Sockets not closing" [1] bug can have problems.
>> But Pharo guys are aware of it and hopelly they will resolve it soon. I
>> also need Swazoo on Pharo working well, so cosider that problem almost
>> solved :)

> Do you mind this bug is present in Squeak too, or it is only Pharo related? Is this a big problem with real life websites?

Don't know exactly. Squeak website for instance run Swazoo for years,
but it is behind Apache, which probably care about proper closing of TCP
connections. While when you are directly on the net, many things can
happen. In any case, from the discussion on mentioned thread you can see
the promise, that problem will be solved soon. So I don't panic yet


>> What will be very nice contribution would be an article, something like
>> "Deploying Aida in the Cloud". As a blog post or as a docs page on our
>> website. What do you think?

> That's good idea. I don't have a blog, so documentation page on Aida's website should be better option. But I'm not sure, if I'm the right guy to do this :) I have very little experience with Aida now. I'll try to write something when time allows me, but I can't promise anything.  

Most people have an opinion that such setup is complex, that's why your
experience of simplicity is even more important. I can open you an
account on the website to start writing when you'll have time ...

Janko

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Janko Mivšek
In reply to this post by Nicholas Moore
S, Nicholas Moore piše:
> A great title would be: "AIDA: Head in the clouds - feet on the ground"
>
> :-))

This is title for a philosophical debate following the first one written
down :)


>
> On 08/08/11 13:29, Janko Mivšek wrote:
>> Hi Martin
>>
>> S, Martin Polák piše:
>>
>>> Other story is the way, how Aida with Swazoo act as server. I like it much more than Seaside's Kom with for example Apache. Now I have only Pharo image with Aida on my server and I'm perfectly able to handle all that virtual names stuff completely with Smalltalk via VNC. That's a big difference with my Seaside deployment scenario, where I must handle all this configuration by editing Apache's config files to create proxy to the Seaside's image. And that's really boring.
>> Virtual serving of many Aida websites together with static content is
>> indeed very neat and useful feature. You can deploy a new site in a
>> minute! Even a whole image can be deployed by just loading the code and
>> setting host:ip:port: combo in few minutes.
>>
>> On VisualWorks Swazoo works great as a standalone web server while on
>> Pharo it seems that a "Sockets not closing" [1] bug can have problems.
>> But Pharo guys are aware of it and hopelly they will resolve it soon. I
>> also need Swazoo on Pharo working well, so cosider that problem almost
>> solved :)
>>
>> What will be very nice contribution would be an article, something like
>> "Deploying Aida in the Cloud". As a blog post or as a docs page on our
>> website. What do you think?
>>
>>
>> [1] http://forum.world.st/Sockets-don-t-close-100-CPU-tt3648046.html
>>
>> Best regards
>> Janko
>>
>
> --
>
> *Nicholas Moore*
>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Nicholas Moore
In reply to this post by Janko Mivšek
Hi Janko,

I have been using Apache and virtual hosts to redirect incoming requests to the various sites in an image (each of which is listed in my hosts file with a name and port). If I remove Apache, how do I tell Swazoo to redirect to the various sites?

Nicholas

On 08/08/11 13:29, Janko Mivšek wrote:
Hi Martin

S, Martin Polák piše:

Other story is the way, how Aida with Swazoo act as server. I like it much more than Seaside's Kom with for example Apache. Now I have only Pharo image with Aida on my server and I'm perfectly able to handle all that virtual names stuff completely with Smalltalk via VNC. That's a big difference with my Seaside deployment scenario, where I must handle all this configuration by editing Apache's config files to create proxy to the Seaside's image. And that's really boring.
Virtual serving of many Aida websites together with static content is
indeed very neat and useful feature. You can deploy a new site in a
minute! Even a whole image can be deployed by just loading the code and
setting host:ip:port: combo in few minutes.

On VisualWorks Swazoo works great as a standalone web server while on
Pharo it seems that a "Sockets not closing" [1] bug can have problems.
But Pharo guys are aware of it and hopelly they will resolve it soon. I
also need Swazoo on Pharo working well, so cosider that problem almost
solved :)

What will be very nice contribution would be an article, something like
"Deploying Aida in the Cloud". As a blog post or as a docs page on our
website. What do you think?


[1] http://forum.world.st/Sockets-don-t-close-100-CPU-tt3648046.html

Best regards
Janko


--

Nicholas Moore


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Janko Mivšek
Hi Nicholas,

S, Nicholas Moore piše:

> I have been using Apache and virtual hosts to redirect incoming requests
> to the various sites in an image (each of which is listed in my hosts
> file with a name and port). If I remove Apache, how do I tell Swazoo to
> redirect to the various sites?

First you need to run the image as root if you are on Linux. Root is
namely needed to run on port 80. This has security implications of
course, so be careful. Chroot jail is one of possible protection here.

Then you simply set host:ip:port: of your sites accordingly. Let me
explain by concrete example of my hosting of Aida and Swazoo websites,
which are both run from same image and on same public IP. Those two
sites are set with:

  (AIDASite named: 'aida-site')
        host: 'www.aidaweb.si' ip: 'hosting-biart.eranova.si' port: 80.

  (AIDASite named: 'swazoo-site')
        host: 'www.swazoo.org' ip: 'hosting-biart.eranova.si' port: 80.

All those DNS names must be registered on some DNS server. Just
registering them in hosts file is not enough for serving outside your
machine.

hosting-biart.eranova.si is the public IP for hosting mostly customer
BiArt (commercial product) websites, from there that name, but also many
public websites. Currently 70 websites are open on this image, 20 of
them enabled, around 10 pretty active.

Hope this help.

Best regards
Janko


>
> Nicholas
>
> On 08/08/11 13:29, Janko Mivšek wrote:
>> Hi Martin
>>
>> S, Martin Polák piše:
>>
>>> Other story is the way, how Aida with Swazoo act as server. I like it much more than Seaside's Kom with for example Apache. Now I have only Pharo image with Aida on my server and I'm perfectly able to handle all that virtual names stuff completely with Smalltalk via VNC. That's a big difference with my Seaside deployment scenario, where I must handle all this configuration by editing Apache's config files to create proxy to the Seaside's image. And that's really boring.
>> Virtual serving of many Aida websites together with static content is
>> indeed very neat and useful feature. You can deploy a new site in a
>> minute! Even a whole image can be deployed by just loading the code and
>> setting host:ip:port: combo in few minutes.
>>
>> On VisualWorks Swazoo works great as a standalone web server while on
>> Pharo it seems that a "Sockets not closing" [1] bug can have problems.
>> But Pharo guys are aware of it and hopelly they will resolve it soon. I
>> also need Swazoo on Pharo working well, so cosider that problem almost
>> solved :)
>>
>> What will be very nice contribution would be an article, something like
>> "Deploying Aida in the Cloud". As a blog post or as a docs page on our
>> website. What do you think?
>>
>>
>> [1] http://forum.world.st/Sockets-don-t-close-100-CPU-tt3648046.html
>>
>> Best regards
>> Janko
>>
>
> --
>
> *Nicholas Moore*
>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Deploying application to server

Nicholas Moore
That's great Janko, running as root and setting them all to port 80 was what I had not figured out.

Thanks a lot.

Nicholas

On 11/08/11 13:46, Janko Mivšek wrote:
Hi Nicholas,

S, Nicholas Moore piše:

I have been using Apache and virtual hosts to redirect incoming requests
to the various sites in an image (each of which is listed in my hosts
file with a name and port). If I remove Apache, how do I tell Swazoo to
redirect to the various sites?
First you need to run the image as root if you are on Linux. Root is
namely needed to run on port 80. This has security implications of
course, so be careful. Chroot jail is one of possible protection here.

Then you simply set host:ip:port: of your sites accordingly. Let me
explain by concrete example of my hosting of Aida and Swazoo websites,
which are both run from same image and on same public IP. Those two
sites are set with:

  (AIDASite named: 'aida-site')
	host: 'www.aidaweb.si' ip: 'hosting-biart.eranova.si' port: 80.

  (AIDASite named: 'swazoo-site')
	host: 'www.swazoo.org' ip: 'hosting-biart.eranova.si' port: 80.

All those DNS names must be registered on some DNS server. Just
registering them in hosts file is not enough for serving outside your
machine.

hosting-biart.eranova.si is the public IP for hosting mostly customer
BiArt (commercial product) websites, from there that name, but also many
public websites. Currently 70 websites are open on this image, 20 of
them enabled, around 10 pretty active.

Hope this help.

Best regards
Janko


Nicholas

On 08/08/11 13:29, Janko Mivšek wrote:
Hi Martin

S, Martin Polák piše:

Other story is the way, how Aida with Swazoo act as server. I like it much more than Seaside's Kom with for example Apache. Now I have only Pharo image with Aida on my server and I'm perfectly able to handle all that virtual names stuff completely with Smalltalk via VNC. That's a big difference with my Seaside deployment scenario, where I must handle all this configuration by editing Apache's config files to create proxy to the Seaside's image. And that's really boring.
Virtual serving of many Aida websites together with static content is
indeed very neat and useful feature. You can deploy a new site in a
minute! Even a whole image can be deployed by just loading the code and
setting host:ip:port: combo in few minutes.

On VisualWorks Swazoo works great as a standalone web server while on
Pharo it seems that a "Sockets not closing" [1] bug can have problems.
But Pharo guys are aware of it and hopelly they will resolve it soon. I
also need Swazoo on Pharo working well, so cosider that problem almost
solved :)

What will be very nice contribution would be an article, something like
"Deploying Aida in the Cloud". As a blog post or as a docs page on our
website. What do you think?


[1] http://forum.world.st/Sockets-don-t-close-100-CPU-tt3648046.html

Best regards
Janko

-- 

*Nicholas Moore*



_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida

    

--

Nicholas Moore


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida