BEA Weblogic scripting experts - need help with server's listen address

BillLeeLee

[H]F Junkie
Joined
Jul 2, 2003
Messages
13,486
Hey everyone, I'm doing some Weblogic scripting for a project at work in order to bypass the massive headache of tailoring one of my company's internal frameworks to achieve a simple task.

I'm creating a very, very simple domain and deploying a Java web application into it, and I have this basic Weblogic script right now:

Code:
template_path = "/appserver/weblogic/common/templates/domains/wls.jar"
domain_path = "/setup"
domain_name = 'setup'
listen_port = 8098
admin_server_name = 'AdminServer'
server_url = r't3://localhost:' + str(listen_port)
user_pwd = 'password'
username = 'admin'

readTemplate(template_path)

# change to AdminServer and change parameters
set('Name', domain_name)
cd('Server/AdminServer')
set('ListenAddress', '')
set('ListenPort', listen_port)
cd('/Security/'+ domain_name + '/User/weblogic')
set('UserPassword', user_pwd)
set('Name', username)


writeDomain(domain_path)
closeTemplate()

# now connect to the recently created domain
startServer(adminServerName = admin_server_name,
            domainName = domain_name,
            url = server_url,
            domainDir = domain_path,
            password = user_pwd,
            username = username)

All of that works fine, the template (default weblogic template) is changed and the script creates the domain and starts the Administration Server.

The problem is I can't access the Administration Server from another machine. Once the server starts it only listens on the localhost.

Code:
set('ListenAddress', '')

Weblogic documentation says that if you set the ListenAddress to blank or null (I have tried both), the server should listen on all addresses and you should be able to access the server from a different machine. However, in my case this always creates a server that starts and is only accessible on the localhost.

Any one have any ideas? I know I'm missing something, but the documentation doesn't tell me otherwise. This is pretty critical since I can't really test anything else since the local machine itself doesn't have a GUI or X Server or anything.

Thanks very much in advance.
 
Weblogic makes me want to punch kittens.

But anyway, I 'solved' my problem last week, but I'm not sure if I am just performing black magic, or if this a bug in their scripting engine.

Basically, I can't use a variable to define my port number. If I directly set it like this

Code:
set(ListenPort, 7772)

then it works.

This will take more investigating, but as it stands it works for what I have to achieve.
 
Back
Top