Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORBAのエラー #214

Open
yurikadoi opened this issue Dec 12, 2015 · 10 comments
Open

CORBAのエラー #214

yurikadoi opened this issue Dec 12, 2015 · 10 comments

Comments

@yurikadoi
Copy link

echo-serverを実行できません

mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$ ./echo-server -ORBInitRef NameService=corbaloc::iiop:127.0.0.1:2809/NameService

** (process:7429): WARNING **: Option ORBInitRef has invalid object reference: NameService=corbaloc::iiop:127.0.0.1:2809/NameService
Binding service reference from neme-service with id"EchoApp"

** (process:7429): ERROR **: failed binding of service IDL:omg.org/CORBA/INV_OBJREF:1.0
Trace/breakpoint trap (core dumped)
mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$ sudo /etc/init.d/omniorb4-nameserver restart
[sudo] password for mech-user:
sudo: /etc/init.d/omniorb4-nameserver: command not found

プリントのとおりにやってみようとしましたが
/var/lib/omniorbというディレクトリは存在せず、
/etc/init.dもないです

@yurikadoi
Copy link
Author

javaのほうもエラーがでます

mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$ java EchoClient -ORBInitRef NameService=corbaloc::iiop:127.0.0.1:2809/NameService
Dec 13, 2015 1:55:55 AM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: iiop:127.0.0.1:2809; port: 2089"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:223)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:236)
at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:119)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:187)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:137)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:229)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:130)
at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
at EchoClient.main(EchoClient.java:20)
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:101)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:95)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:207)
... 8 more

ERROR : org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:223)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:236)
at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:119)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:187)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:137)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:229)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:130)
at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
at EchoClient.main(EchoClient.java:20)
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:101)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:95)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:207)
... 8 more

@k-okada
Copy link
Owner

k-okada commented Dec 13, 2015

おそくなりました.
sudo apt-get install omniorb-nameserver
してみてください.

◉ Kei Okada

On Sun, Dec 13, 2015 at 1:51 AM, Yurika DOI [email protected]
wrote:

echo-serverを実行できません
''
mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$
/echo-server -ORBInitRef NameService=corbaloc::iiop:127001:2809/NameService

** (process:7429): WARNING **: Option ORBInitRef has invalid object
reference: NameService=corbaloc::iiop:127001:2809/NameService
Binding service reference from neme-service with id"EchoApp"

** (process:7429): ERROR **: failed binding of service
IDL:omgorg/CORBA/INV_OBJREF:10
Trace/breakpoint trap (core dumped)
mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$
sudo /etc/initd/omniorb4-nameserver restart
[sudo] password for mech-user:
sudo: /etc/initd/omniorb4-nameserver: command not found

''
プリントのとおりにやってみようとしましたが
/var/lib/omniorbというディレクトリは存在せず、
/etc/initdもないです


Reply to this email directly or view it on GitHub
#214.

@yurikadoi
Copy link
Author

先生 ご回答ありがとうございます。
omniorb-nameserverをinstallしましたが、まだエラーが出ます。

mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$ ./echo-server -ORBInitRef NameService=corbaloc::iiop:127.0.0.1:2809/NameService]

** (process:10937): WARNING **: Option ORBInitRef has invalid object reference: NameService=corbaloc::iiop:127.0.0.1:2809/NameService]
Binding service reference from neme-service with id"EchoApp"

** (process:10937): ERROR **: failed binding of service IDL:omg.org/CORBA/INV_OBJREF:1.0
Trace/breakpoint trap (core dumped)
mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$ ./echo-server -ORBInitRef NameService=corbaloc::iiop:127.0.0.1:2809/NameService

とまだエラーが出ます

プリントの指示通り
/var/lib/omniorb/のなかのbakファイルとlogファイルを削除し、sudo /etc/init.d/omniorb4-nameserver restartしましたが、結果は同じです。

etc/hostsというディレクトリは見つかりませんでした。

@yurikadoi
Copy link
Author

打ち間違いがあり、errorはでなくなりました。お騒がせしました。
echo-skelimpl.cをプリント通り編集しましたが、文字列表示が上手く行きません

mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$ ./echo-server -ORBInitRef NameService=corbaloc:iiop:127.0.0.1:2809/NameService
Binding service reference from neme-service with id"EchoApp"

name-serviceではなくneme-serviceになっているところが怪しそうなのですが...

@yurikadoi
Copy link
Author

gccのときに一文字間違えていました...。上手く行きました。お騒がせしましたm(__)m

@yurikadoi
Copy link
Author

javaのほうはclientを実行すると大量のエラーが出ます

mech-user@test1-pc:~/2015winter/2015-soft3/20151118/src/enshu_20151118$ java EchoClient ORBInitRef NameService=corbaloc:iiop:127.0.0.1:2809/NameService
Dec 13, 2015 11:00:35 PM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 900"
org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:223)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:236)
    at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:119)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:187)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:137)
    at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.invoke(BootstrapResolverImpl.java:99)
    at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.resolve(BootstrapResolverImpl.java:132)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:47)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:47)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:47)
    at com.sun.corba.se.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1169)
    at EchoClient.main(EchoClient.java:17)
Caused by: java.net.ConnectException: Connection refused
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Net.java:454)
    at sun.nio.ch.Net.connect(Net.java:446)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
    at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:95)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:207)
    ... 11 more

ERROR : org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:223)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:236)
    at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:119)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:187)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:137)
    at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.invoke(BootstrapResolverImpl.java:99)
    at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.resolve(BootstrapResolverImpl.java:132)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:47)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:47)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:47)
    at com.sun.corba.se.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1169)
    at EchoClient.main(EchoClient.java:17)
Caused by: java.net.ConnectException: Connection refused
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Net.java:454)
    at sun.nio.ch.Net.connect(Net.java:446)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
    at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:95)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:207)
    ... 11 more

@k-okada
Copy link
Owner

k-okada commented Dec 14, 2015

--ORBInitRef ?

@yurikadoi
Copy link
Author

そうでした...。
Clientからの入力をserverの出力にするように実装したつもりなのですが、デフオルトの

EchoServer ready and waiting ...
>>hello world this is test
>>hello world this is test

しか出ません

EchoServer.javaは
public void echoString(String input){
System.err.println(">>" + input);
}
と実装してあります。
EchoClient.javaも変更しなければならないのでしょうか

@k-okada
Copy link
Owner

k-okada commented Dec 14, 2015

https://github.com/k-okada/2015-soft3/blob/master/20151118/src/enshu_20151118/EchoClient.java#L25
はあらかじめ決まったテキストを置くているので,入力をうけとりたかったら,clientでキーボード入力をするプログラムをかかないとだめですね.

◉ Kei Okada

On Mon, Dec 14, 2015 at 3:01 PM, Yurika DOI [email protected]
wrote:

そうでした...。
Clientからの入力をserverの出力にするように実装したつもりなのですが、デフオルトの

EchoServer ready and waiting ...

hello world this is test
hello world this is test

しか出ません

EchoServer.javaは
public void echoString(String input){
System.err.println(">>" + input);
}
と実装してあります。
EchoClient.javaも変更しなければならないのでしょうか


Reply to this email directly or view it on GitHub
#214 (comment).

@yurikadoi
Copy link
Author

先生
わかりました。やってみます。
ご回答ありがとうございます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants