ERROR [JDBCExceptionReporter:101] Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException M

  • ERROR [JDBCExceptionReporter:101] Communications link failure due to underlying exception:
  • ** BEGIN NESTED EXCEPTION **
  • java.net.SocketException
  • MESSAGE: Broken pipe
  • This error always comes out to my logs, while liferay is up but the good thing is it doesn't have an effect at all. The reason is that the application is left idle after a few hours, then this error will come out.
  • To solve this kind of problem, you have to edit your portal-ext.properties file. In my case, i was connecting to MySQL 5 database and i want to share my settings of my portal-ext.properties file:
  • #The tcpKeepAlive and autoReconnect will do the trick...
  • jdbc.default.driverClassName=com.mysql.jdbc.Driver
  • jdbc.default.url=jdbc:mysql://localhost:3306/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false&tcpKeepAlive=true&autoReconnect=true
  • jdbc.default.username=root
  • jdbc.default.password=password
  • #This line will set the file upload size to unlimited######
  • dl.file.max.size=0
  • #This line will disable the displaying of "Terms of Use" page####
  • terms.of.use.required=false
  • #Set the following to true to enable programmatic configuration to let the Portlet
  • #TCK obtain a URL for each test. This should never be set to true unless you are #running
  • #the TCK tests.
  • #tck.url=false
  • tck.url=true
  • #Set this to false to disable all persistent cookies. Features like automatically #logging
  • #in will not work.
  • session.enable.persistent.cookies=false
  • #Set the auto-extend mode to true to avoid having to ask the user whether to ex-
  • #146 Advanced Liferay Configuration
  • #Advanced Liferay Configuration
  • #tend the session or not. Instead it will be automatically extended. The purpose of #this
  • #mode is to keep the session open as long as the user browser is open and with a #portal
  • #page loaded. It is recommended to use this setting along with a smaller #session.timeout,
  • #such as 5 minutes for better performance.
  • session.timeout.auto.extend=true
  • #Set the default logout page path for users relative to the server path. This is the
  • #page users are automatically redirected to after logging out. For example, if you #want
  • #the default logout page to be http://localhost:8080/web/guest/logout, set this to
  • #/web/guest/logout. To activate this feature, set auth.forward.by.last.path to true. #To customize
  • #the behavior, see com.liferay.portal.events.DefaultLogoutPageAction in the logout.
  • #events.post property above.
  • default.logout.page.path=/web/guest
  • #DEFAULT LANDING PAGE
  • #Set the default landing page path for logged in users relative to the server path.
  • #This is the page users are automatically redirected to after logging in. For #example, if
  • #you want the default landing page to be http://localhost:8080/web/guest/login, set
  • #this to /web/guest/login. To activate this feature, set auth.forward.by.last.path to
  • #true. To customize the behavior, see #com.liferay.portal.events.DefaultLandingPageAction
  • #in the login.events.post property above.
  • default.landing.page.path=/web/guest/home
  • #
  • # This sets the default home URL of the portal.
  • #
  • #
  • company.default.home.url=/web/guest/home
  • #
  • # This will disabled password reminder in first login of the user
  • #
  • users.reminder.queries.custom.question.enabled=false
  • # This is a test to hide/disable jsessionid in the URL
  • #
  • session.enable.url.with.session.id=false
  • # This will disable the password reminder
  • #
  • users.reminder.queries.enabled=false
  • users.reminder.queries.custom.question.enabled=false
  • # Once this configuration is set to true
  • # there are queries that will be logged in catalina.out
  • # hibernate.show_sql=true
  • #
  • # This part is for the Performance Improvement
  • #
  • # Set this property to true to load the theme's merged CSS files for faster
  • # loading for production. Set this property to false for easier debugging
  • # for development. You can also disable fast loading by setting the URL
  • # parameter "css_fast_load" to "0".
  • #
  • theme.css.fast.load=true
  • #
  • # Set this property to true to load the combined JavaScript files from the
  • # property "javascript.files" into one compacted file for faster loading for
  • # production. Set this property to false for easier debugging for
  • # development. You can also disable fast loading by setting the URL
  • # parameter "js_fast_load" to "0".
  • #
  • javascript.fast.load=true

1 comment:

Anonymous said...

Do you mind if I quote a
few of your posts as long as I provide credit and sources back to
your
webpage? My blog is in the very same niche as yours
and my users would truly benefit from some of the information you
present here. Please let me know if this ok with you. Thank you!


My web blog ... Go to my website
my web site > View my web page