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

susi server failed to start in cygwin #15

Closed
charany1 opened this issue Oct 20, 2016 · 13 comments
Closed

susi server failed to start in cygwin #15

charany1 opened this issue Oct 20, 2016 · 13 comments

Comments

@charany1
Copy link
Contributor

I followed steps mentioned in README of susi_server , however my server is not starting .

I changed LoklakServer to SusiServer in build.xml like this :

<manifest>
<attribute name="Class-Path" value="${jar.classpath}" />
<attribute name="Main-Class" value="org.loklak.SusiServer" />
</manifest>

Terminal Outputs :

danchara@danchara-WX-1 MINGW64 /c/cygwin64/home/danchara/git/susi_server (development)
$ ant
Buildfile: C:\cygwin64\home\danchara\git\susi_server\build.xml
init:
build:
[delete] Deleting directory C:\cygwin64\home\danchara\git\susi_server\classes
[mkdir] Created dir: C:\cygwin64\home\danchara\git\susi_server\classes
[echo] loklak: C:\cygwin64\home\danchara\git\susi_server\build.xml
[javac] Compiling 121 source files to C:\cygwin64\home\danchara\git\susi_server\classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
BUILD SUCCESSFUL
Total time: 6 seconds
danchara@danchara-WX-1 MINGW64 /c/cygwin64/home/danchara/git/susi_server (development)
$ bin/start.sh
ps: unknown option -- o
Try ps --help' for more information. susi detected that you did not yet run the installation wizard. It let's you setup an administrator account and a number of settings, but is not mandatory. You can manually start it by running bin/installation.sh starting susi ps: unknown option -- o Tryps --help' for more information.
ps: unknown option -- o
Try `ps --help' for more information.
susi server failed to start. See data/loklag.log for details. Here are the last logs:
Error: Could not find or load main class org.loklak.SusiServer
Error: Could not find or load main class org.loklak.SusiServer

I'm not able to figure why it's not able to find main class ?

Since , I'm seeing that my classes directory has a SusiServer.class :

 /c/cygwin64/home/danchara/git/susi_server/classes/org/loklak (development)
$ ls
api/ data/ EmailHandler.class graphics/ objects/ susi/ SusiInstallation.class SusiServer.class
Caretaker.class 'EmailHandler$1.class' geo/ http/ server/ 'SusiInstallation$1.class' 'SusiServer$1.class' tools/
@Orbiter
Copy link
Contributor

Orbiter commented Oct 20, 2016

Name of the main class is SusiServer, made some fixes here: 2693cc9

I always start Susi just with bin/start.sh

@charany1
Copy link
Contributor Author

@Orbiter , thanks for the fixes , I pulled your latest commit , however problem is still there . Could it be due to the reason that I'm using a Windows machine ?

In bin/start,sh , I've changed ':' to ';' as class path separator , however , it doesn't work.

@Orbiter
Copy link
Contributor

Orbiter commented Oct 26, 2016

it looks like that ps -o does not work on cygwin.

@Orbiter Orbiter changed the title susi server failed to start susi server failed to start in cygwin Oct 26, 2016
@Orbiter
Copy link
Contributor

Orbiter commented Oct 27, 2016

I dont't have a cygwin development environment because I don't have a windows computer. I would like to hand over this issue to someone with a windows/cygwin development environment

@Orbiter Orbiter removed their assignment Oct 27, 2016
@sudheesh001
Copy link
Member

@charany1 Can you try this
START java -Xmx4G -Xms1G -server -XX:+AggressiveOpts -XX:NewSize=512M -cp "classes;lib/*" org.loklak.SusiServer

It should open up a new command line instance running java.

@sourabhtk37
Copy link
Member

Should I take this up?

@sudheesh001
Copy link
Member

@sourabhtk37 I am not sure if there's anything in this that needs to be taken up, I am waiting for @charany1 to reply so that we can see what to do next. For me in a cygwin environment it works when I use the command above.

@charany1
Copy link
Contributor Author

charany1 commented Oct 29, 2016

@sudheesh001 , I tried your command , it said START command not found , however when I omit START , it opens up a new CMD type window , which closes automatically in a second .

That new CMD window shows some ERROR message , before I can figure out what that is , window closes .

Will check back next Thursday , till then Happy Deepawali :)

@sudheesh001
Copy link
Member

@charany1 Run the start command from the Command prompt cmd.exe instead of cygwin and can you tell me then what happens ?

@sudheesh001
Copy link
Member

Or there's another option, if the build seems to work correctly, do this, execute the jar

ant jar
java -jar dist/loklak.jar

That should run it, loklak.jar because this file hasn't been edited. https://github.com/fossasia/susi_server/blob/development/build.xml#L131

@Orbiter
Copy link
Contributor

Orbiter commented Oct 30, 2016

I merged #22 please try again

@charany1
Copy link
Contributor Author

charany1 commented Nov 2, 2016

@Orbiter , I pulled code after your merge #22 .

@sudheesh001

  1. On doing

START java -Xmx4G -Xms1G -server -XX:+AggressiveOpts -XX:NewSize=512M -cp "classes;lib/*" org.loklak.SusiServer
from a CMD , a new CMD window opens up with message

` ERROR StatusLogger No log4j2 configuration file found . Using default Configuration : logging only errors to console .

-----plus some other stacktrace which before I can infer , window closes ---------`

  1. On running

`ant jar

java -jar dist/susiserver.jar
`
Terminal Output :

`C:\Users\danchara\work\foss\susi_server>ant jar
Buildfile: C:\Users\danchara\work\foss\susi_server\build.xml

init:

build:
[delete] Deleting directory C:\Users\danchara\work\foss\susi_server\classes
[mkdir] Created dir: C:\Users\danchara\work\foss\susi_server\classes
[echo] loklak: C:\Users\danchara\work\foss\susi_server\build.xml
[javac] Compiling 121 source files to C:\Users\danchara\work\foss\susi_server\classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

jar:
[jar] Building jar: C:\Users\danchara\work\foss\susi_server\dist\susiserver.jar

BUILD SUCCESSFUL
Total time: 9 seconds

C:\Users\danchara\work\foss\susi_server>java -jar dist\susiserver.jar
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
java.io.FileNotFoundException: conf\susi\susi_cognition_boilerplate.json.example (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at com.google.common.io.Files$FileByteSource.openStream(Files.java:125)
at com.google.common.io.Files$FileByteSource.openStream(Files.java:115)
at com.google.common.io.ByteSource.copyTo(ByteSource.java:239)
at com.google.common.io.Files.copy(Files.java:305)
at org.loklak.data.DAO.init(DAO.java:105)
at org.loklak.SusiServer.main(SusiServer.java:215)

C:\Users\danchara\work\foss\susi_server>`

@charany1
Copy link
Contributor Author

charany1 commented Nov 2, 2016

Okay , so above error happened because I was on developent branch which indeed doesn't have susi_cognition_boilerplate.json.example , when I switched to master , and used

`ant jar

java -jar dist/susiserver.jar`

it worked , so I've server running at

http://127.0.0.1:4000/ .

Thanks @Orbiter , @sudheesh001 .

I'm closing this for now .

@charany1 charany1 closed this as completed Nov 2, 2016
@charany1 charany1 reopened this Nov 2, 2016
@charany1 charany1 closed this as completed Nov 2, 2016
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

4 participants