powered by Jive Software

Import-Export plugin not working (linux)

Actually i have tested it at home with Win2000 Pro and it worked fine. But at work with linux it doesnt. I write a name for a file press Export and get blank page with such address:

http://jiveserver:9090/plugins/userimportexport/export-user-data.jsp?exportUsers

export directory has been created (with jive user’'s permissions) but now file exported. I have only 75 users, it shouldnt took very long?

Hi Wroot,

No, it shouldn’'t take long at all. Was the export directory created with full permissions given to the jive user?

Thank,

Ryan

On my system jive is a user of group “users”, so export directory was created with permissions:

ls -l

jive:users /opt/jive_messenger/export

i then tried to chown it manually and restarted server. No result.

Hmm… are members of the group “users” allowed to read/write to the export directory?

user jive is allowed. Actually he’'s allowed to write to jive_messenger, conf, db, logs and plugins directories. And it works fine with these dirs and whole JM.

This is not a RPM installation, so i havent jive group. And your plugin had created this directory correctly. It’'s just Exporting doesnt work.

OK. Tomorrow i’'ll try to write to export with jive user.

Ah, ok. I tried it on both Windows and Linux and didn’'t have any problems. Are you seeing any errors in the logs?

Thanks,

Ryan

i’‘ve tried to write to export dir, it’'s ok. This is the error.log part after trying to export:

2005.06.07 09:29:22 org.jivesoftware.messenger.container.PluginServlet.service(PluginServlet.java:96 )

javax.servlet.ServletException: org/jivesoftware/util/XMLWriter

at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl .java:825)

at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:758)

at org.jivesoftware.messenger.plugin.userImportExport.export_002duser_002ddata_jsp ._jspService(export_002duser_002ddata_jsp.java:140)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

at org.jivesoftware.messenger.container.PluginServlet.handleJSP(PluginServlet.java :215)

at org.jivesoftware.messenger.container.PluginServlet.service(PluginServlet.java:7 7)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:822)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:78)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:78)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler. java:494)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)

at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.ja va:624)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1434)

at org.mortbay.http.HttpServer.service(HttpServer.java:896)

at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)

at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)

at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)

at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)

at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366)

at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

Hi Wroot,

Thanks for the stack trace. I think I’'m going to recruit you to do all my testing from here on out. It looks like that error is definitely permissions related. Which version of Linux are you using?

Thanks,

Ryan

heh. NP if asking me, but i just dont have much time to browse forums and etc at work lately. Especially after some hm… troubles at work, someone thinks IT guys are not working, just staring at their computers all the day:( Ahh… nevermind this:)

Ok, tomorrow i’'ll try to chown whole JM dir recursively to jive user. Though JM works fine with my selective chowning:)

I’'m using Archlinux 0.7 … Wombat:)

Okay, this is certainly obvious, but: You didn’‘t just add rw permissions to the directories, right? To enter a directory (not sure if that’'s neccessary here) execute(x) rights are required.

Just noting this, since some lines above I’'ve read about “read/write” access…

Sorry if that’'s to obvious/dumb,

Ben

it’‘s ok, i’‘m always missing obvious things and i’‘m far away from being spec with **nix. So… i havent added any rw to all other directories (just chown jive:users /jive_messenger/****). And JM is writing to DB, logs and plugins directory without erorrs. Are you saying i should chmod export dir’‘s settings to rw? But i’‘m already able to write to this dir while logged with jive user. So i’'m obviously missing something obvious:)

Hm… all other directories were created by root and only then chown’'ed to jive, and this export directory is created by jive user. Is it different? Directories of other plugins are created by jive user too though.

If you log in/use the jive user (su - jive) and can write to that directory, then I’‘d guess it’'s not related to permissions… Well - trying the obvious again: You installed it by hand: Are you sure that it runs as user jive? If you start it with your user and the whole installation has sufficient rights for the “users” group, you might even get along without noticing that it runs as “wroot” in spite of “jive”? Or even worse: As root?

Well - as I said already: Only stating the obvious here…

If that’‘s not the case (read: You are sure that it runs as jive and you are sure that this user can write to the export directory) I’'d stop looking for permissions (at least on that directory).

I’‘m still a little puzzled when I look at the exception/stack trace… It’'s quite useless for me… Am I missing any pieces of information therein that might give a hint?

Regards,

Ben

i login through SSH with jive user (not with su, just login), and yes, i can write to export directory. Actually, i have only one user “jive” of group “users” on this system (and of course root). I’‘m running JM with daemon provided in package (though it seems this daemon was removed in last releases). If i chown jive messenger dir to root JM couldnt startup normally at boot up. So i think it’'s not running with root.

Yes, that sounds reasonable. You can check which user jive runs under by looking at the output of for example “ps aux”. Not sure how the binary is called, something like “ps aux | grep messenger” should make it a little more obvious.

If you see the user jive there and - as you just stated again - this user can write to the export directory I’‘d suggest looking somewhere else… Does the export plugin need temporary disk space and jive isn’‘t allowed to write there? What’'s this stack trace about anyway?

Ben, confused now

Hi Ben,

Thanks for jumping in here to help trouble shoot this problem. Have you tried the plugin on a Linux installation?

Does the export plugin need temporary disk space and jive isn’'t allowed to write there?

No, everything is done in memory and then printed out to a file.

Wroot,

What version of Messenger are you seeing this error on?

Thanks,

Ryan

Hi Ben,

Thanks for jumping in here to help trouble shoot this

problem. Have you tried the plugin on a Linux

installation?

Currently installing a JM on linux, so the answer ist “not yet”…

Does the export plugin need temporary disk space

and jive isn’'t allowed to write there?

No, everything is done in memory and then printed out

to a file.

Another idea: Since this exception (see above) looks XML related: Could a weird username/character in the userdata from wroots server cause an exception? Just guessing of course, but the permission problem seems to be more and more unlikely (well - thanks to Murphy you’'ll propably prove that it is related to permissions while I type this…)

Ben

Another idea: Since this exception (see above) looks

XML related: Could a weird username/character in the

userdata from wroots server cause an exception?

Well, it should contains some lithuanian (baltic) characters for sure. But the else part of JM works fine with it and Exodus too. Emmm… if not mentioning strange behaviour after changing room topic by user. All lithuanian characters mess up after this until server restart. Well, it was with older JM version, havent tested this again.

Could a weird username/character in the

userdata from wroots server cause an exception?

I had wondered about this too. If only Wroot could somehow export his user directory so I could look at it…

I had wondered about this too. If only Wroot could

somehow export his user directory so I could look at

it…

How can i help? Maybe you need some part of my DB?

How can i help? Maybe you need some part of my DB?

Do you have the ability to setup a test-system? In which you delete all entries with “non-standard” characters? Or maybe you can dump your DB tonight, delete all but a “dummy” user and export, see if this works (same permissions…) and restore afterwards?