Page 1 of 1

Command line: omero upload <"omero.host" not set> error

PostPosted: Thu Sep 15, 2011 1:20 am
by willy
When I run the "omero upload file.txt" command, it returns

exception ::Ice::EndpointParseException
{
str = tcp -p 4063 -h <"omero.host" not set>
}

The ice.config file seems to contain "omero.host=localhost"

Reference:

[glencoe@iwasa2 wong]$ /RAID10/glencoe/AnnotationModule/production/bin/omero adm in diagnostics

================================================================================
OMERO Diagnostics Beta-4.1.2-DEV
================================================================================

Commands: java -version 1.6.0 (/usr/bin/java)
Commands: python -V 2.4.3 (/usr/bin/python)
Commands: icegridnode --version 3.3.1 (/usr/bin/icegridnode)
Commands: icegridadmin --version 3.3.1 (/usr/bin/icegridadmin)
Commands: psql --version 9.0.2 (/usr/bin/psql)

Server: icegridnode running
Server: Blitz-0 active (pid = 1089, enabled)
Server: DropBox inactive (disabled)
Server: FSServer inactive (disabled)
Server: Indexer-0 active (pid = 1117, enabled)
Server: OMERO.Glacier2 active (pid = 1118, enabled)
Server: OMERO.IceStorm active (pid = 1121, enabled)
Server: Processor-0 active (pid = 1122, enabled)
Server: Tables-0 inactive (disabled)
Server: TestDropBox inactive (enabled)
Server: Web active (pid = 1297, enabled)


Thank you,
Willy

Re: Command line: omero upload <"omero.host" not set> error

PostPosted: Thu Sep 15, 2011 6:16 am
by jmoore
Hi Willy,

the upload plugin in 4.1 unfortunately worked differently from other plugins. You'll need to add login information to the arguments:
Code: Select all
bin/omero upload /tmp/test.txt --omero.host=localhost --omero.user=root --omero.pass=ome


In, 4.2 and beyond, things have changed significantly.

Cheers,
~Josh.

Re: Command line: omero upload <"omero.host" not set> error

PostPosted: Thu Sep 15, 2011 6:51 pm
by willy
Hi Josh,

Thank you for your reply.

I used the same user-name and password that I use for "omero import" and it returns the error message as the following:


/bin/omero upload file.txt --omero.host=localhost --omero.user=*** --omero.pass=********

exception ::omero::SecurityViolation
{
serverStackTrace = ome.conditions.SecurityViolation: ome.model.enums.Format is a System-type, and may only be created through privileged APIs.
at ome.security.basic.BasicACLVoter.throwCreationViolation(BasicACLVoter.java:120)
at ome.security.CompositeACLVoter.throwCreationViolation(CompositeACLVoter.java:78)
at ome.security.ACLEventListener.onPreInsert(ACLEventListener.java:114)
at org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:177)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:72)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:178)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1208)
at ome.logic.UpdateImpl.afterUpdate(UpdateImpl.java:288)
at ome.logic.UpdateImpl.doAction(UpdateImpl.java:306)
at ome.logic.UpdateImpl.doAction(UpdateImpl.java:296)
at ome.logic.UpdateImpl.saveAndReturnObject(UpdateImpl.java:117)
at sun.reflect.GeneratedMethodAccessor1275.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at ome.security.basic.EventHandler.invoke(EventHandler.java:131)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:175)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy76.saveAndReturnObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1275.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:79)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:35)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy76.saveAndReturnObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1288.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)
at ome.services.throttling.Callback.run(Callback.java:55)
at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:37)
at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:126)
at ome.services.blitz.impl.UpdateI.saveAndReturnObject_async(UpdateI.java:64)
at omero.api._IUpdateTie.saveAndReturnObject_async(_IUpdateTie.java:92)
at omero.api._IUpdateDisp.___saveAndReturnObject(_IUpdateDisp.java:185)
at omero.api._IUpdateDisp.__dispatch(_IUpdateDisp.java:365)
at IceInternal.Incoming.invoke(Incoming.java:159)
at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
at Ice.ConnectionI.message(ConnectionI.java:972)
at IceInternal.ThreadPool.run(ThreadPool.java:577)
at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)

serverExceptionClass = ome.conditions.SecurityViolation
message = ome.model.enums.Format is a System-type, and may only be created through privileged APIs.
}

Re: Command line: omero upload <"omero.host" not set> error

PostPosted: Fri Sep 16, 2011 6:19 am
by jmoore
Hi Willy,

Unfortunately, until you upgrade to a newer version of OMERO, it may necessary for you to patch the source code and or modify your DB directly. My guess is that "text/plain" was passed as the format. Can you look in var/log/Blitz-0.log and see if that's the case? Alternatively, you could copy all of lib/pythom/omero/plugins/upload.py and modify it for your own use.

Cheers,
~Josh.