kohesive / solr-undertow

Solr / SolrCloud running in high performance server - tiny, fast startup, simple to configure, easy deployment without an application server.
Other
96 stars 14 forks source link

Undertow startup fails in Windows environment #9

Closed garrydias closed 10 years ago

garrydias commented 10 years ago

Hello,

I´m facing the following error during undertow startup: Illegal character in opaque part at index 11: jar:file:C:\Dev\servers\solr-undertow-1.0.14\example\solr-wars\solr-4.10.2.war

The cause is the \ char in the war URI. I think Undertow can´t handle it?

Bellow, follow the prompt logs: _C:\Dev\servers\solr-undertow-1.0.14>bin\solr-undertow.bat example/example.conf 2014-12-01 18:26:47,358 [main] WARN SolrServer - Solr + Undertow = small server, happy days, fast, and maybe other cool things. 2014-12-01 18:26:47,360 [main] WARN SolrServer - Starting SolrServer 2014-12-01 18:26:47,364 [main] INFO SolrServer - Validating configuration from: C:\Dev\servers\solr-undertow-1.0.14\example\example.conf 2014-12-01 18:26:47,574 [main] INFO SolrServer - === [ Config File settings from: C:\Dev\servers\solr-undertow-1.0.14\example\example.conf ] === 2014-12-01 18:26:47,574 [main] INFO SolrServer - zkRun: false 2014-12-01 18:26:47,575 [main] INFO SolrServer - zkHost: 2014-12-01 18:26:47,577 [main] INFO SolrServer - httpClusterPort: 8983 2014-12-01 18:26:47,579 [main] INFO SolrServer - httpHost: 0.0.0.0 2014-12-01 18:26:47,580 [main] INFO SolrServer - httpIoThreads: 0 (no setting, using default) 2014-12-01 18:26:47,582 [main] INFO SolrServer - httpWorkerThreads: 0 (no setting, using default) 2014-12-01 18:26:47,586 [main] INFO SolrServer - activeRequestLimits: 2014-12-01 18:26:47,586 [main] INFO SolrServer - solrHome: C:\Dev\servers\solr-4.10.2\solr-4.10.2 2014-12-01 18:26:47,587 [main] INFO SolrServer - solrLogs: C:\Dev\servers\solr-undertow-1.0.14\example.\solr-logs 2014-12-01 18:26:47,589 [main] INFO SolrServer - tempDir: C:\Dev\servers\solr-undertow-1.0.14\example.\solr-temp 2014-12-01 18:26:47,590 [main] INFO SolrServer - solrVersion: 4.10.2 2014-12-01 18:26:47,592 [main] INFO SolrServer - solrWarFile: C:\Dev\servers\solr-undertow-1.0.14\example.\solr-wars\solr-4.10.2.war 2014-12-01 18:26:47,595 [main] INFO SolrServer - solrContextPath: /solr 2014-12-01 18:26:47,596 [main] INFO SolrServer - === [ END CONFIG ] === 2014-12-01 18:26:47,598 [main] WARN SolrServer - Extracting WAR file: C:\Dev\servers\solr-undertow-1.0.14\example.\solr-wars\solr-4.10.2.war 2014-12-01 18:26:47,614 [main] ERROR SolrServer - Server unhandled exception during startup 'Illegal character in opaque part at index 11: jar:file:C:\Dev\servers\solr-undertow-1.0.14\example.\solr-w ars\solr-4.10.2.war' java.lang.IllegalArgumentException: Illegal character in opaque part at index 11: jar:file:C:\Dev\servers\solr-undertow-1.0.14\example.\solr-wars\solr-4.10.2.war at java.net.URI.create(URI.java:859) ~[na:1.7.0_11] at org.bremeld.solr.undertow.Server.deployWarFileToCache(SolrUndertow.kt:107) ~[solr-undertow-1.0.14.jar:na] at org.bremeld.solr.undertow.Server.run(SolrUndertow.kt:52) ~[solr-undertow-1.0.14.jar:na] at org.bremeld.solr.undertow.UndertowPackage$App$d7d28faa.main(App.kt:40) [solr-undertow-1.0.14.jar:na] at org.bremeld.solr.undertow.UndertowPackage.main(Unknown Source) [solr-undertow-1.0.14.jar:na] Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 11: jar:file:C:\Dev\servers\solr-undertow-1.0.14\example.\solr-wars\solr-4.10.2.war at java.net.URI$Parser.fail(URI.java:2829) ~[na:1.7.0_11] at java.net.URI$Parser.checkChars(URI.java:3002) ~[na:1.7.0_11] at java.net.URI$Parser.parse(URI.java:3039) ~[na:1.7.0_11] at java.net.URI.(URI.java:595) ~[na:1.7.0_11] at java.net.URI.create(URI.java:857) ~[na:1.7.011] ... 4 common frames omitted Server unhandled exception during startup 'Illegal character in opaque part at index 11: jar:file:C:\Dev\servers\solr-undertow-1.0.14\example.\solr-wars\solr-4.10.2.war'

Thanx

apatrida commented 10 years ago

This is likely an easy fix, I'm in the middle of updating the release so will check it soon. thanks for the report!

apatrida commented 10 years ago

Fixing now...

garrydias commented 10 years ago

Wow =)

Thanks for your help Jayson.

2014-12-01 19:39 GMT-02:00 Jayson Minard notifications@github.com:

Fixing now...

— Reply to this email directly or view it on GitHub https://github.com/bremeld/solr-undertow/issues/9#issuecomment-65139234.

"Não espero nada cair do céu. Derrubo logo!!

Garry Dias Rio de Janeiro, RJ, Brasil Contatos: Celular: 55 21 97135-8755 E-mails: garrydias@gmail.com

apatrida commented 10 years ago

Please try release v1.0.16 https://github.com/bremeld/solr-undertow/releases/tag/v1.0.16

(if it fails, I'll find a Windows VM to test, but it was the JAR URI that was the issue)

garrydias commented 10 years ago

Thanks again Jayson.

I´ll download the new version immediately.

2014-12-01 19:58 GMT-02:00 Jayson Minard notifications@github.com:

Closed #9 https://github.com/bremeld/solr-undertow/issues/9.

— Reply to this email directly or view it on GitHub https://github.com/bremeld/solr-undertow/issues/9#event-200879793.

"Não espero nada cair do céu. Derrubo logo!!

Garry Dias Rio de Janeiro, RJ, Brasil Contatos: Celular: 55 21 97135-8755 E-mails: garrydias@gmail.com

apatrida commented 10 years ago

great, I'll be around a few more hours and can work on it more if that last fix doesn't cover it. I have not tested on Windows, but there is no reason it should not be able to work. Simple issues if any.

apatrida commented 10 years ago

any news, did the fix work for you?

garrydias commented 10 years ago

There´s a new problem now... I have upgraded my JDK version to 7u71 but the problem persists... I´ll be running undertow in Linux while the windows issues aren´t fixed.

Follow the prompt log: C:\Dev\servers\solr-undertow-1.0.16>bin\solr-undertow.bat example/example.conf 2014-12-02 14:20:08,893 [main] WARN SolrServer - Solr + Undertow = small server, happy days, fast, and maybe other cool things. 2014-12-02 14:20:08,897 [main] WARN SolrServer - Starting SolrServer 2014-12-02 14:20:08,900 [main] INFO SolrServer - Validating configuration from: C:\Dev\servers\solr-undertow-1.0.16\example\example.conf 2014-12-02 14:20:08,909 [main] INFO SolrServer - === [ Config File settings from: C:\Dev\servers\solr-undertow-1.0.16\example\example.conf ] === 2014-12-02 14:20:08,910 [main] INFO SolrServer - zkRun: false 2014-12-02 14:20:08,910 [main] INFO SolrServer - zkHost: 2014-12-02 14:20:08,910 [main] INFO SolrServer - httpClusterPort: 8983 2014-12-02 14:20:08,911 [main] INFO SolrServer - httpHost: 0.0.0.0 2014-12-02 14:20:08,911 [main] INFO SolrServer - httpIoThreads: 0 (no setting, using default) 2014-12-02 14:20:08,911 [main] INFO SolrServer - httpWorkerThreads: 0 (no setting, using default) 2014-12-02 14:20:08,913 [main] INFO SolrServer - activeRequestLimits: 2014-12-02 14:20:08,913 [main] INFO SolrServer - solrHome: C:\Dev\servers\solr-4.10.2\solr-4.10.2 2014-12-02 14:20:08,913 [main] INFO SolrServer - solrLogs: C:\Dev\servers\solr-undertow-1.0.16\example.\solr-logs 2014-12-02 14:20:08,914 [main] INFO SolrServer - tempDir: C:\Dev\servers\solr-undertow-1.0.16\example.\solr-temp 2014-12-02 14:20:08,914 [main] INFO SolrServer - solrVersion: 4.10.2 2014-12-02 14:20:08,915 [main] INFO SolrServer - solrWarFile: C:\Dev\servers\solr-undertow-1.0.16\example\solr-wars\solr-4.10.2.war 2014-12-02 14:20:08,915 [main] INFO SolrServer - solrContextPath: /solr 2014-12-02 14:20:08,925 [main] INFO SolrServer - === [ END CONFIG ] === 2014-12-02 14:20:08,926 [main] WARN SolrServer - Extracting WAR file: C:\Dev\servers\solr-undertow-1.0.16\example\solr-wars\solr-4.10.2.war

_2014-12-02 14:20:08,941 [main] ERROR SolrServer - The WAR file C:\Dev\servers\solr-undertow-1.0.16\example\solr-wars\solr-4.10.2.war cannot be opened as a Zip file, due to 'URI is not hierarchical' java.lang.IllegalArgumentException: URI is not hierarchical at sun.nio.fs.WindowsUriSupport.fromUri(WindowsUriSupport.java:122) ~[na:1.7.0_71] at sun.nio.fs.WindowsFileSystemProvider.getPath(WindowsFileSystemProvider.java:92) ~[na:1.7.0_71] at java.nio.file.Paths.get(Paths.java:138) ~[na:1.7.0_71] at com.sun.nio.zipfs.ZipFileSystemProvider.uriToPath(ZipFileSystemProvider.java:85) ~[zipfs.jar:1.7.0_71] at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:107) ~[zipfs.jar:1.7.0_71] at java.nio.file.FileSystems.newFileSystem(FileSystems.java:322) ~[na:1.7.0_71] at java.nio.file.FileSystems.newFileSystem(FileSystems.java:272) ~[na:1.7.071] at org.bremeld.solr.undertow.Server.deployWarFileToCache(SolrUndertow.kt:110) [solr-undertow-1.0.16.jar:na] at org.bremeld.solr.undertow.Server.run(SolrUndertow.kt:51) [solr-undertow-1.0.16.jar:na] at org.bremeld.solr.undertow.UndertowPackage$App$d7d28faa.main(App.kt:40) [solr-undertow-1.0.16.jar:na] at org.bremeld.solr.undertow.UndertowPackage.main(Unknown Source) [solr-undertow-1.0.16.jar:na] WAR file failed to deploy, terminating server

Thanx for your attention.

[]s

apatrida commented 10 years ago

Ok, I will get a Windows VM running to look at it. The fun in "cross platform" file systems.

apatrida commented 10 years ago

Ok, the URI is created without a prefixing /D:/whatever so it thinks it is a relative path which is not allowed for the zip file system. I changed it in 1.1.0-RC2. If it works for you from there, I can back port it to 1.0.16.x although release candidate should be stable, I just haven't thoroughly tested that version of Undertow in production. Posting 1.1.0-RC2 now.

apatrida commented 10 years ago

(I'll still setup a VM to test when I get a trial copy of Windows downloaded)

apatrida commented 10 years ago

test release https://github.com/bremeld/solr-undertow/releases/tag/v1.1.0-RC2-B

apatrida commented 10 years ago

Ok, fixed, tested. v1.1.0-RC3 is the release you want. one moment while I upload.

Note for windows, if you modify the configuration file (example.conf) you will need to open with editor that can handle \n line endings, or you'll need to clean up the file with proper line endings for your editor. thankfully it is a small file.

apatrida commented 10 years ago

Ok, tested in a Windows 8 VM using example.conf as-is ... https://github.com/bremeld/solr-undertow/releases/tag/v1.1.0-RC3

apatrida commented 10 years ago

thanks for the report, glad I finally loaded a Windows VM to try it out. It's been a while since I have even seen Windows!

garrydias commented 10 years ago

I just arrived at the office.

I´ll try the v1.1.0-RC3 https://github.com/bremeld/solr-undertow/releases/tag/v1.1.0-RC3 version.

Thanx for the fixes.

2014-12-03 10:16 GMT-02:00 Jayson Minard notifications@github.com:

thanks for the report, glad I finally loaded a Windows VM to try it out. It's been a while since I have even seen Windows!

— Reply to this email directly or view it on GitHub https://github.com/bremeld/solr-undertow/issues/9#issuecomment-65398731.

"Não espero nada cair do céu. Derrubo logo!!

Garry Dias Rio de Janeiro, RJ, Brasil Contatos: Celular: 55 21 97135-8755 E-mails: garrydias@gmail.com

garrydias commented 10 years ago

Hi Jayson

this version fixed the problem. Undertow is now running fast and furious on Windows OS ;)

I had to remove the solr.solr.home environment variable because it was pointing to another Solr instance and disturbing Undertow startup.

Everything ok now

Thanx again for your great help

[]s

2014-12-03 13:51 GMT-02:00 Garry Dias garrydias@gmail.com:

I just arrived at the office.

I´ll try the v1.1.0-RC3 https://github.com/bremeld/solr-undertow/releases/tag/v1.1.0-RC3 version.

Thanx for the fixes.

2014-12-03 10:16 GMT-02:00 Jayson Minard notifications@github.com:

thanks for the report, glad I finally loaded a Windows VM to try it out. It's been a while since I have even seen Windows!

— Reply to this email directly or view it on GitHub https://github.com/bremeld/solr-undertow/issues/9#issuecomment-65398731 .

"Não espero nada cair do céu. Derrubo logo!!

Garry Dias Rio de Janeiro, RJ, Brasil Contatos: Celular: 55 21 97135-8755 E-mails: garrydias@gmail.com

"Não espero nada cair do céu. Derrubo logo!!

Garry Dias Rio de Janeiro, RJ, Brasil Contatos: Celular: 55 21 97135-8755 E-mails: garrydias@gmail.com

apatrida commented 10 years ago

Hmmm, the solrHome variable in the configuration should always override solr.solr.home environment variable. only -Dsolr.solr.home= would override it, or you can set -Dsolr.undertow.solrHome= which will win every time. I'm going to check unit tests on variables, because config file should win over environment, and only sol.undertow.* variables in -D should win over that.

thanks for the feedback, I'll create other issues if there are some with the environment variables.

apatrida commented 10 years ago

see #10, I will do a release fixing the variable overriding.

apatrida commented 10 years ago

Environment handling with fix for #10 is at https://github.com/bremeld/solr-undertow/releases/tag/v1.1.0-RC4

I will convert to full release soon.

apatrida commented 10 years ago

Now in final release 1.1.0

apatrida commented 10 years ago

Garry,

I hope all continues to be ok. I haven't tested on Windows, but Undertow has a good reputation on all platforms, so hopefully it holds up well for you. It's fast, lean, and I think more responsive than typical especially when running locally. If anything comes up, let me know, I'll see the bug report...

garrydias commented 9 years ago

Thanks again, Jayson.

Solr-Undertow rocks ;)

2014-12-04 22:31 GMT-02:00 Jayson Minard notifications@github.com:

Garry,

I hope all continues to be ok. I haven't tested on Windows, but Undertow has a good reputation on all platforms, so hopefully it holds up well for you. It's fast, lean, and I think more responsive than typical especially when running locally. If anything comes up, let me know, I'll see the bug report...

— Reply to this email directly or view it on GitHub https://github.com/bremeld/solr-undertow/issues/9#issuecomment-65729356.

"Não espero nada cair do céu. Derrubo logo!!

Garry Dias Rio de Janeiro, RJ, Brasil Contatos: Celular: 55 21 97135-8755 E-mails: garrydias@gmail.com

apatrida commented 9 years ago

Glad it is working for you, because Solr devs are starting to hide the WAR and are doing so before they have much of a replacement, they are using Jetty internally and the config files are still there, but not sure what it will look like in the end. https://issues.apache.org/jira/browse/SOLR-4792 ... If you are on Twitter, mention that you like it with @ApacheSolr in the tweet. Thanks!

apatrida commented 9 years ago

(quick advertisement: Solr-Undertow is written in Kotlin, which makes Java less painful, and is what Scala pretends to be) :-D