DeadEd.com
IRC Bots, Java Game Query and Control Libraries, and More ...
Sign Up!
Login
Welcome to DeadEd.com
Monday, September 25 2017 @ 01:18 AM CDT

 Forum Index > Jibble.org > Other Jibble
 Logbot Help
 |  Printable Version
By: Anonymous: MattBaron () on Monday, June 06 2005 @ 08:42 AM CDT  
Anonymous: MattBaron

any help please?





       
   
By: DeadEd (offline) on Monday, June 06 2005 @ 11:41 PM CDT  
DeadEd

Once again ... this is exactly what should be in your start script:

java -classpath .:./lib/pircbot.jar org.jibble.logbot.LogBotMain

You can also run that from the command line (from the logbot directory) yourself. Try this too in case there is something strange with running the scripts.

Java appears to be on your path ok as it gets to a point to complain about the logbot classes. This shows that it cannot find them from where you are running it ... did you unzip the logbot zipfile with directories intact and then you are running the script from within the logbot directory that you just unzipped the files to?

Simply: grab the archive again, unzip it so that it keeps the directory structure, don't touch anything and try to start it. Try from the command line/prompt as well.


Forum Moderator
Moderator

Status: offline

Registered: 06/01/04
Posts: 602

Profile Email Website  
   
By: Anonymous: Nicola () on Tuesday, July 05 2005 @ 11:37 AM CDT  
Anonymous: Nicola

config.ini html lib org run.bat run.sh
bash-2.05a$ run.sh
bash: run.sh: command not found
bash-2.05a$ ./run.sh
bash: ./run.sh: Permission denied
bash-2.05a$ ls
config.ini html lib org run.bat run.sh
bash-2.05a$ ./run.sh
bash: ./run.sh: Permission denied
bash-2.05a$ ./run.sh
./run.sh: java: command not found
bash-2.05a$ sh.run
bash: sh.run: command not found
bash-2.05a$ sh run.sh
run.sh: java: command not found
bash-2.05a$

still dont work





       
   
By: far2fish (offline) on Tuesday, July 05 2005 @ 12:03 PM CDT  
far2fish

"Permission denied" should explain it. It can either be that you are not the owner of the files (if you unzipped it as another user), or if the files belong to you and hasnøt got the necessary file permissions.

I suggest to test the first option first, so please navigate to the directory where you unzipped LogBot, and type the following three commands:
pwd
id
ls -l

and supply the output of all three commands (copy/paste here).


Forum Junior
Junior

Status: offline

Registered: 06/01/04
Posts: 25

Profile Email Website  
   
By: DeadEd (offline) on Tuesday, July 05 2005 @ 12:06 PM CDT  
DeadEd

Make sure that your script has the permissions to be run (man chmod)

Also, just simply try to do the same as the script from the command line yourself.

Any "command not found" or "permission denied" messages are then mis-installed/mis-configured software or incorrect file permissions. Any error of this type should be looked at with regards to the system you are trying to run with.


Forum Moderator
Moderator

Status: offline

Registered: 06/01/04
Posts: 602

Profile Email Website  
   
By: far2fish (offline) on Tuesday, July 05 2005 @ 12:07 PM CDT  
far2fish

The second option, is that the files belong to you but doesn't have the necessary file permission. To set file permissions which enables you to run it, navigate to the directory where you unzipped Logbot and type:
chmod -R 755 *

Note: Be absolutly sure you are in the logbot directory before running the above command !!!


Forum Junior
Junior

Status: offline

Registered: 06/01/04
Posts: 25

Profile Email Website  
   
By: IntuitiveNipple (offline) on Sunday, September 06 2009 @ 04:19 AM CDT  
IntuitiveNipple

Quote by: MattBaron

Last login: Sat May 28 22:04:15 2005 from host81-132-74-165.range81-132.btcentralplus.com root@server [~]# cd logbot root@server [~/logbot]# run.sh bash: run.sh: command not found root@server [~/logbot]# sh run.sh Exception in thread "main" java.lang.NoClassDefFoundError: org/jibble/logbot/LogBotMain root@server [~/logbot]# root@server [~/logbot]#

This will almost always happen when installing and running on Linux. The cause is Windows-style line terminator codes (0x0D, 0x0A : line-return + line-feed).

PHP Formatted Code

hexdump -C run.sh
00000000  6a 61 76 61 20 2d 63 6c  61 73 73 70 61 74 68 20  |java -classpath |
00000010  2e 3a 2e 2f 6c 69 62 2f  70 69 72 63 62 6f 74 2e  |.:./lib/pircbot.|
00000020  6a 61 72 20 6f 72 67 2e  6a 69 62 62 6c 65 2e 6c  |jar org.jibble.l|
00000030  6f 67 62 6f 74 2e 4c 6f  67 42 6f 74 4d 61 69 6e  |ogbot.LogBotMain|
00000040  0d 0a                                             |..|
00000042
 

The file in the ZIP archive should be replaced with one saved using UNIX-style line terminators (0x0A only). To fix an existing script do:

PHP Formatted Code

 sed -i -e 's/\r//g' run.sh
 

Which removes the 0x0D codes:

PHP Formatted Code

hexdump -C run.sh
00000000  6a 61 76 61 20 2d 63 6c  61 73 73 70 61 74 68 20  |java -classpath |
00000010  2e 3a 2e 2f 6c 69 62 2f  70 69 72 63 62 6f 74 2e  |.:./lib/pircbot.|
00000020  6a 61 72 20 6f 72 67 2e  6a 69 62 62 6c 65 2e 6c  |jar org.jibble.l|
00000030  6f 67 62 6f 74 2e 4c 6f  67 42 6f 74 4d 61 69 6e  |ogbot.LogBotMain|
00000040  0a                                                |.|
00000041
 

Of course, the script should also be executable by the user launching it:

PHP Formatted Code

chmod a+x run.sh

ls -nl run.sh
-rwxrwxrwx 1 1039 1037 350 2009-09-06 10:13 run.sh
 

If you wish to have the Linux script run in the background detached from the user log-in this alternative script might be useful for you:

PHP Formatted Code

#!/bin/sh

# ensure the console-logging directory exists
[ ! -d logs ] && mkdir logs

# start the java application in a separate session not connected to the console
# log its console (stdout, stderr) output to the ./logs/ directory
setsid sh -c 'java -classpath .:./lib/pircbot.jar org.jibble.logbot.LogBotMain & :' >logs/logbot.log 2>&1  

To start it simply do:

PHP Formatted Code

./run.sh
 


Forum Newbie
Newbie

Status: offline

Registered: 09/06/09
Posts: 1

Profile Email    
   



 All times are CDT. The time is now 01:18 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

My Account





Sign up as a New User
Lost your password?

What's New

Stories

No new stories

Comments last 2 days

No new comments

Files last 14 days

No new files
No new comments

Links last 2 weeks

No new links