Discussion:
using samples/C++/client/brutus_client
Rüdiger Meier
2008-07-16 19:23:24 UTC
Permalink
Hello,

Finally I got time to try the brutus thing again!
We installed brutus server 1.0 on a fresh WinXp, then I wanted to test the
sample client first on openSuse 10.2 64bit.

I checked out
http://svn.42tools.net/repos/brutus-idl/trunk/

After installing ace-tao (rebuilded from ace-tao-5.6.5-6.fc9.src.rpm)
I did:
$ cd brutus-idl/trunk/samples
$ make stubs
$ make

After that I got a binary
samples/C++/client/brutus_client

$ ./brutus_client
[...]
Parsing configuration file..
Use SSL.. NO
Getting BrutusLogOn server object key.. OK, "BRUTUS_LOGON"
Getting Brutus server address.. OK, "gabrutus"
Getting Brutus server SSL port.. not defined
Getting Brutus server IIOP port.. OK, "2003"
Sanity checking Brutus server ports.. ok, using port 2003
Getting MAPI Profile name.. OK, "ruediger.meier"
Getting MAPI Profile password.. OK, "*****"
Getting Exchange server.. OK, "gaexchg"
Getting Exchange mailbox..
OK, "SMTP:***@wiesinginvestments.com"
Getting Windows user.. OK, "ruediger.meier"
Getting Windows user domain.. OK, "GA"
Getting Windows user password.. OK, "*****"
Choosing initial bootstrap method.. resolve_initial_references()
Test notifications.. NO

Initializing CORBA..
Invoking ORB_Init().. OK
Getting root POA.. ERROR - could not get the root POA

Shutting down CORBA.. not started
FAILURE
.......

Any ideas?
Is it correct to use my usual windows logon for MAPI_PROFILE or what does it
mean?

Thx for help,
Rudi


BTW
-----------------------------------------
First build of brutus client failed

$ make
[...]
make[2]: Entering directory
`/home/rudi/brutus/brutus-idl/trunk/samples/C++/init_orb'
gcc -Wall -g -O0 -fno-inline -I/usr/include/ -I/home/rudi/brutus/brutus-idl/trunk/samples/C++ -I/home/rudi/brutus/brutus-idl/trunk/samples/C++/idl_output -c
init_orb.cpp -o init_orb.o
init_orb.cpp: In function ‘char* build_init_ref_arg(bool, const char*, const
char*, const char*, uint16_t)’:
init_orb.cpp:91: error: jump to label ‘out’
init_orb.cpp:75: error: from here
init_orb.cpp:77: error: crosses initialization of ‘char server_port_str [6]’
init_orb.cpp:91: error: jump to label ‘out’
init_orb.cpp:71: error: from here
init_orb.cpp:77: error: crosses initialization of ‘char server_port_str [6]’
init_orb.cpp:91: error: jump to label ‘out’
init_orb.cpp:67: error: from here
init_orb.cpp:77: error: crosses initialization of ‘char server_port_str [6]’
init_orb.cpp:91: error: jump to label ‘out’
init_orb.cpp:63: error: from here
init_orb.cpp:77: error: crosses initialization of ‘char server_port_str [6]’
make[2]: *** [init_orb.o] Error 1
make[2]: Leaving directory
`/home/rudi/brutus/brutus-idl/trunk/samples/C++/init_orb'
[...]

$ gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)

I could solve that by editing "samples/C++/init_orb/init_orb.cpp"
using curly brackets around these lines:
{
char server_port_str[6] = { '\0' };
snprintf(server_port_str, 6, "%hu", server_port);
init_ref_arg = append_string(&init_ref_arg, server_port_str);
}

Maybe you want to fix this in svn too.
-------------------------------------------
Jules Colding
2008-07-16 21:15:44 UTC
Permalink
Hi Rüdiger,
Post by Rüdiger Meier
Finally I got time to try the brutus thing again!
We installed brutus server 1.0 on a fresh WinXp, then I wanted to test the
sample client first on openSuse 10.2 64bit.
Its a loooong time since I tried the C++ client myself ;-) I usually
test with the C client due to the slow IDL compiler from TAO...
Post by Rüdiger Meier
I checked out
http://svn.42tools.net/repos/brutus-idl/trunk/
After installing ace-tao (rebuilded from ace-tao-5.6.5-6.fc9.src.rpm)
$ cd brutus-idl/trunk/samples
$ make stubs
$ make
After that I got a binary
samples/C++/client/brutus_client
$ ./brutus_client
[...]
Parsing configuration file..
Use SSL.. NO
Getting BrutusLogOn server object key.. OK, "BRUTUS_LOGON"
Getting Brutus server address.. OK, "gabrutus"
Getting Brutus server SSL port.. not defined
Getting Brutus server IIOP port.. OK, "2003"
Sanity checking Brutus server ports.. ok, using port 2003
Getting MAPI Profile name.. OK, "ruediger.meier"
Getting MAPI Profile password.. OK, "*****"
Getting Exchange server.. OK, "gaexchg"
Getting Exchange mailbox..
Getting Windows user.. OK, "ruediger.meier"
Getting Windows user domain.. OK, "GA"
Getting Windows user password.. OK, "*****"
Choosing initial bootstrap method.. resolve_initial_references()
Test notifications.. NO
Initializing CORBA..
Invoking ORB_Init().. OK
Getting root POA.. ERROR - could not get the root POA
Shutting down CORBA.. not started
FAILURE
.......
Any ideas?
Not getting the root POA is an indication of API change in TAO since I
looked at the C++ client myself. I can take a look at it tomorrow.
I'll fix the build problems you mention below too.
Post by Rüdiger Meier
Is it correct to use my usual windows logon for MAPI_PROFILE or what does it
mean?
MAPI_PROFILE is simply the name of the file on the server that holds
your MAPI profile. You can name it whatever you like.

Best regards and thanks,
jules
Post by Rüdiger Meier
Thx for help,
Rudi
BTW
-----------------------------------------
First build of brutus client failed
$ make
[...]
make[2]: Entering directory
`/home/rudi/brutus/brutus-idl/trunk/samples/C++/init_orb'
gcc -Wall -g -O0 -fno-inline -I/usr/include/ -I/home/rudi/brutus/
brutus-idl/trunk/samples/C++ -I/home/rudi/brutus/brutus-idl/trunk/
samples/C++/idl_output -c
init_orb.cpp -o init_orb.o
init_orb.cpp: In function ‘char* build_init_ref_arg(bool, const char*, const
init_orb.cpp:91: error: jump to label ‘out’
init_orb.cpp:75: error: from here
init_orb.cpp:77: error: crosses initialization of ‘char
server_port_str [6]’
init_orb.cpp:91: error: jump to label ‘out’
init_orb.cpp:71: error: from here
init_orb.cpp:77: error: crosses initialization of ‘char
server_port_str [6]’
init_orb.cpp:91: error: jump to label ‘out’
init_orb.cpp:67: error: from here
init_orb.cpp:77: error: crosses initialization of ‘char
server_port_str [6]’
init_orb.cpp:91: error: jump to label ‘out’
init_orb.cpp:63: error: from here
init_orb.cpp:77: error: crosses initialization of ‘char
server_port_str [6]’
make[2]: *** [init_orb.o] Error 1
make[2]: Leaving directory
`/home/rudi/brutus/brutus-idl/trunk/samples/C++/init_orb'
[...]
$ gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)
I could solve that by editing "samples/C++/init_orb/init_orb.cpp"
{
char server_port_str[6] = { '\0' };
snprintf(server_port_str, 6, "%hu", server_port);
init_ref_arg = append_string(&init_ref_arg,
server_port_str);
}
Maybe you want to fix this in svn too.
-------------------------------------------
_______________________________________________
brutus mailing list
http://www.42tools.com/mailman/listinfo/brutus
Rüdiger Meier
2008-07-17 09:54:37 UTC
Permalink
Hi,
Post by Jules Colding
Its a loooong time since I tried the C++ client myself ;-) I usually
test with the C client due to the slow IDL compiler from TAO...
Ok, C client was more difficult to compile here but now I got it.

$ ./brutus_client
[...]

Starting Brutus operations..
Getting Brutus Server version.. ** Message: BrutusLogOn->Logon() :
***@l826: System Exception : IDL:omg.org/CORBA/COMM_FAILURE:1.0

122
124

Waiting for CORBA shutdown.. ** Message: POA_destroy() : ***@l1189: System
Exception : IDL:omg.org/CORBA/COMM_FAILURE:1.0

** Message: Object_release() : ***@l1193: System Exception :
IDL:omg.org/CORBA/COMM_FAILURE:1.0

** Message: Object_release() : ***@l1198: System Exception :
IDL:omg.org/CORBA/COMM_FAILURE:1.0

OK

Cleaning up.. OK

FAILURE


cu,
Rudi
Jules Colding
2008-07-17 12:10:46 UTC
Permalink
Hi,
Post by Rüdiger Meier
Post by Jules Colding
Its a loooong time since I tried the C++ client myself ;-) I usually
test with the C client due to the slow IDL compiler from TAO...
Ok, C client was more difficult to compile here but now I got it.
The C++ sample is now building again and it will give you a root POA.
Post by Rüdiger Meier
$ ./brutus_client
[...]
Starting Brutus operations..
The test client can't reach your Brutus server at all. It simply tries
the read the version from the server. This operation is fully capable
of succeeding without Lorica as long as the server is up and that it
is routable from the client.

Best regards,
jules
Rüdiger Meier
2008-07-17 12:47:58 UTC
Permalink
Post by Jules Colding
Post by Rüdiger Meier
Starting Brutus operations..
Getting Brutus Server version.. ** Message: BrutusLogOn->Logon()
IDL:omg.org/CORBA/COMM_FAILURE:1.0
The test client can't reach your Brutus server at all.
Hm, I watched brutus_client with wireschark and noticed that it doesnt
sent any packet to brutus server.
I tried both resolvable name and IP for BRUTUS_SERVER in client.conf.

Brutus server is pingable and port 2003 reachable.
Post by Jules Colding
It simply
tries the read the version from the server. This operation is fully
capable of succeeding without Lorica as long as the server is up and
that it is routable from the client.
Is this using some kind of windows service or does it talk to brutus
server here?

cu,
Rudi
Jules Colding
2008-07-17 12:57:19 UTC
Permalink
Post by Rüdiger Meier
Post by Jules Colding
Post by Rüdiger Meier
Starting Brutus operations..
Getting Brutus Server version.. ** Message: BrutusLogOn->Logon()
IDL:omg.org/CORBA/COMM_FAILURE:1.0
The test client can't reach your Brutus server at all.
Hm, I watched brutus_client with wireschark and noticed that it doesnt
sent any packet to brutus server.
I tried both resolvable name and IP for BRUTUS_SERVER in client.conf.
Brutus server is pingable and port 2003 reachable.
So "gabrutus" is routable from the client?
Post by Rüdiger Meier
Post by Jules Colding
It simply
tries the read the version from the server. This operation is fully
capable of succeeding without Lorica as long as the server is up and
that it is routable from the client.
Is this using some kind of windows service or does it talk to brutus
server here?
It talks to the Brutus server. The nice thing about GetVersion() is
that it doesn't use any callback referecne so the client need not be
reachable from the server.

BR,
jules
Rüdiger Meier
2008-07-17 13:16:32 UTC
Permalink
Post by Jules Colding
So "gabrutus" is routable from the client?
yep
$ netcat -z gabrutus 2003 && echo "reachable"
reachable

And I can see netcat's action with tcpdump:
$ tcpdump -i eth0 host gabrutus
15:06:57.889445 arp who-has gabrutus.ga.local tell quant.ga.local
15:06:57.890393 arp reply gabrutus.ga.local is-at 00:0c:29:9e:a1:c3 (oui
Unknown)
15:06:57.890408 IP quant.ga.local.48551 > gabrutus.ga.local.2003: S
2838194289:2838194289(0) win 5840 <mss 1460,sackOK,timestamp 1343457921
0,nop,wscale 7>
[......]

But if I start brutus_client then tcpdump shows nothing, so what is
brutus_client actually trying to do?

Could this be some kind of IPv6 issue? Because client its telling me
"IPv4 or IPv6 is supported in ORBit2.."

cu,
Rudi
Jules Colding
2008-07-17 13:24:30 UTC
Permalink
Post by Rüdiger Meier
Post by Jules Colding
So "gabrutus" is routable from the client?
yep
$ netcat -z gabrutus 2003 && echo "reachable"
reachable
$ tcpdump -i eth0 host gabrutus
15:06:57.889445 arp who-has gabrutus.ga.local tell quant.ga.local
15:06:57.890393 arp reply gabrutus.ga.local is-at 00:0c:29:9e:a1:c3 (oui
Unknown)
15:06:57.890408 IP quant.ga.local.48551 > gabrutus.ga.local.2003: S
2838194289:2838194289(0) win 5840 <mss 1460,sackOK,timestamp
1343457921
0,nop,wscale 7>
[......]
But if I start brutus_client then tcpdump shows nothing, so what is
brutus_client actually trying to do?
It is establishing a connection with the server. You can see it all
here:

http://trac.42tools.net/brutus-idl/browser/trunk/samples/C/client/main.c


Could you please try to use the FQDN of the server instead?
Post by Rüdiger Meier
Could this be some kind of IPv6 issue? Because client its telling me
"IPv4 or IPv6 is supported in ORBit2.."
IPv[4.6] can be disabled in ORBit2 so that is just a check to make
sure they're not.

BR,
jules
Luis Correia
2008-07-17 13:25:54 UTC
Permalink
Hi!
Post by Jules Colding
Post by Rüdiger Meier
Post by Jules Colding
So "gabrutus" is routable from the client?
yep
$ netcat -z gabrutus 2003 && echo "reachable"
reachable
$ tcpdump -i eth0 host gabrutus
15:06:57.889445 arp who-has gabrutus.ga.local tell quant.ga.local
15:06:57.890393 arp reply gabrutus.ga.local is-at 00:0c:29:9e:a1:c3 (oui
Unknown)
15:06:57.890408 IP quant.ga.local.48551 > gabrutus.ga.local.2003: S
2838194289:2838194289(0) win 5840 <mss 1460,sackOK,timestamp
1343457921
0,nop,wscale 7>
[......]
But if I start brutus_client then tcpdump shows nothing, so what is
brutus_client actually trying to do?
It is establishing a connection with the server. You can see it all
http://trac.42tools.net/brutus-idl/browser/trunk/samples/C/client/main.c
Could you please try to use the FQDN of the server instead?
Post by Rüdiger Meier
Could this be some kind of IPv6 issue? Because client its telling me
"IPv4 or IPv6 is supported in ORBit2.."
IPv[4.6] can be disabled in ORBit2 so that is just a check to make
sure they're not.
BR,
jules
I read somewhere that if the mDNS package is installed and used, it
'might' be filtering out the '.local' domain...


Luis Correia
Jules Colding
2008-07-17 13:30:40 UTC
Permalink
Post by Luis Correia
Hi!
Post by Jules Colding
Post by Rüdiger Meier
Post by Jules Colding
So "gabrutus" is routable from the client?
yep
$ netcat -z gabrutus 2003 && echo "reachable"
reachable
$ tcpdump -i eth0 host gabrutus
15:06:57.889445 arp who-has gabrutus.ga.local tell quant.ga.local
15:06:57.890393 arp reply gabrutus.ga.local is-at 00:0c:29:9e:a1:c3 (oui
Unknown)
15:06:57.890408 IP quant.ga.local.48551 > gabrutus.ga.local.2003: S
2838194289:2838194289(0) win 5840 <mss 1460,sackOK,timestamp
1343457921
0,nop,wscale 7>
[......]
But if I start brutus_client then tcpdump shows nothing, so what is
brutus_client actually trying to do?
It is establishing a connection with the server. You can see it all
http://trac.42tools.net/brutus-idl/browser/trunk/samples/C/client/main.c
Could you please try to use the FQDN of the server instead?
Post by Rüdiger Meier
Could this be some kind of IPv6 issue? Because client its telling me
"IPv4 or IPv6 is supported in ORBit2.."
IPv[4.6] can be disabled in ORBit2 so that is just a check to make
sure they're not.
BR,
jules
I read somewhere that if the mDNS package is installed and used, it
'might' be filtering out the '.local' domain...
OK, so using the IP address should really, really work.

BR,
jules

Loading...