These are chat archives for spring-cloud/spring-cloud

13th
Sep 2017
matin-reza
@matin-reza
Sep 13 2017 05:03
@dsyer Zuul in starter successfully on weblogic but when request is sended to it not rout the request.I put logback in the classes to seen the log for detecting the problem but Nothing log is seen in the log file.
Dave Syer
@dsyer
Sep 13 2017 05:48
If you mention me in a post like that, when it's not really a message specifically for me, I might not be here, and you might deter other people who could help from replying. You should stop doing that.
matin-reza
@matin-reza
Sep 13 2017 06:02
@dsyer How do i do ? How do i solve my problem?(OK i wont mention you in future)
Dave Syer
@dsyer
Sep 13 2017 06:03
You haven't really said what the problem is yet
"it doesn't work" doesn't tell us anything
I'm suspicious about what you said about context paths though. How do you know the context path for the gateway is "/"? How do you set that in WLS?
Have you tried deploying in a standalone Tomcat?
matin-reza
@matin-reza
Sep 13 2017 06:05
@dsyer I have a zuul that is work on tomcat successfully but i deploy it on weblogic,it is deployed successfully but it does not rout my request to mircroservices
Dave Syer
@dsyer
Sep 13 2017 06:06
You said that already, but you show no details. Have you tried deploying in a standalone Tomcat? How did you specify the context roots?
matin-reza
@matin-reza
Sep 13 2017 06:06
@dsyer server:
compression:
enabled: true
port: 8086
i run it with this command (java -jar myfile-jar)
matin-reza
@matin-reza
Sep 13 2017 06:25
@dsyer You said me to tell the details of it,there are not any log,even i put logback.xml in the classes of my project to see the log but there are not any exception into log, the last line of the log is:

<Sep 13, 2017, 4:15:09,990 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:8001 for protocols iiop, t3, ldap, snmp, http.>

<Sep 13, 2017, 4:15:09,990 AM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 0:0:0:0:0:0:0:1%lo:8001 for protocols iiop, t3, ldap, snmp, http.>

<Sep 13, 2017, 4:15:10,17 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
2017-09-13 04:18:32 INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization started
2017-09-13 04:18:32 INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization completed in 51 ms

Dave Syer
@dsyer
Sep 13 2017 06:49
You can stop @-ing me now
If you run with java -jar that is not a standalone tomcat (it is embedded in the jar)
How did you set the context roots? Did you enable DEBUG logging?
matin-reza
@matin-reza
Sep 13 2017 06:52
Yes if you see above link , i enable level='DEBUG' in the logback
Is it ok?
Dave Syer
@dsyer
Sep 13 2017 07:07
You only enable DEBUG for com.netflix
Most of the code in the gateway will not be in that logger
What do you see in the response from the client (HTTP headers, status etc)?
What do you see in the /trace endpoint?
matin-reza
@matin-reza
Sep 13 2017 07:15
The response of my request is:
<html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Wed Sep 13 07:13:46 UTC 2017</div><div>There was an unexpected error (type=Not Found, status=404).</div><div>No message available</div></body></html>
The header response:
Response headers (175 B)
Date
Wed, 13 Sep 2017 07:13:46 GMT
Content-Length
306
Content-Type
text/html
X-Application-Context
application:8086
Content-Language
en-US
Request headers (545 B)
Host
192.168.251.141:9091
User-Agent
Mozilla/5.0 (Windows NT 6.3; W…) Gecko/20100101 Firefox/55.0
Accept
text/html,application/xhtml+xm…plication/xml;q=0.9,/;q=0.8
Accept-Language
en-US,en;q=0.5
Accept-Encoding
gzip, deflate
Cookie
_ga=GA1.1.1664782047.148646136…XvSNCu8_LD_mgQUcsoN!812837252
Connection
keep-alive
Upgrade-Insecure-Requests
1
Dave Syer
@dsyer
Sep 13 2017 07:20
So it's a 404 (you could have said that from the beginning).
What makes you think you have the right URL? How about that context root?
What about /trace?
matin-reza
@matin-reza
Sep 13 2017 07:21
Where is /trace?
Where do i see /trace?(in the api-gateway?)
Do you see application.yml?I do not set context-root then the default of it is "/"
matin-reza
@matin-reza
Sep 13 2017 07:44
@dsyer If The URL does not true,Why it is routed in embeded tomcat
Dave Syer
@dsyer
Sep 13 2017 07:45
You can't use application.yml to set a context root in WLS.
And /trace is an Actuator feature, which you haven't enabled. Look it up.
matin-reza
@matin-reza
Sep 13 2017 07:46
Weblogic.xml
<wls:resource-path>/*</wls:resource-path>
Is it true if i want to set "/"?
Dave Syer
@dsyer
Sep 13 2017 07:47
I have no idea. You are the one running WLS.
matin-reza
@matin-reza
Sep 13 2017 07:48
At last what is your solution for me?How do i do?
Dave Syer
@dsyer
Sep 13 2017 07:50
Try it in Tomcat standalone first. Maybe you'll learn something useful?
Use the Actuator and look at the /trace
Enable DEBUG logs
matin-reza
@matin-reza
Sep 13 2017 07:58
No body that is here run zuul netflix on WLS?
michelzanini
@michelzanini
Sep 13 2017 10:01
Hi Guys,
I am trying to store a logback.xml file inside Spring Cloud Config and need to reference that file from logging.config application property.
This is my Cloud Config git layout:
/dev/application.properties (for all dev applications)
And I want to have:
/dev/logback.xml (for all dev applications)
And then reference the logback file from application.properties, something like:
logging.config=file:logback.xml (but this does not work)
Is there a way of referencing other plain files to be loaded from Cloud Config?
Tommy Ludwig
@shakuzen
Sep 13 2017 10:05
@michelzanini Best way I’m aware of would be to use the placeholders you expect to be available like:
logging.config=${spring.cloud.config.uri}/${spring.application.name}/${spring.profiles.active:default}/${spring.cloud.config.label:master}/logback-spring.xml
michelzanini
@michelzanini
Sep 13 2017 10:06
Thanks, will try that
dennisrojaspereira
@dennisrojaspereira
Sep 13 2017 11:43
Hi all, Do you know about a function of class or tool then list all active queries
in hibernate ?